From 5a4c68e9f33ef2ddafd78db7f0ddffdf2a5c3b01 Mon Sep 17 00:00:00 2001 From: kthelgason Date: Tue, 28 Mar 2017 04:35:58 -0700 Subject: [PATCH] Minor Cleanup of RTCAudioSource. This CL fixes a comment that has the wrong format, and takes over ownership of an orphaned todo. It also removes some unneeded code from ObjC classes and moves them to a style more fitting the rest of the codebase. BUG=None Review-Url: https://codereview.webrtc.org/2777453003 Cr-Commit-Position: refs/heads/master@{#17416} --- webrtc/sdk/objc/Framework/Classes/RTCAudioSource.mm | 8 +------- webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioSource.h | 8 ++++---- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/webrtc/sdk/objc/Framework/Classes/RTCAudioSource.mm b/webrtc/sdk/objc/Framework/Classes/RTCAudioSource.mm index 2b9c6b92d2..764445b9b6 100644 --- a/webrtc/sdk/objc/Framework/Classes/RTCAudioSource.mm +++ b/webrtc/sdk/objc/Framework/Classes/RTCAudioSource.mm @@ -13,10 +13,10 @@ #include "webrtc/base/checks.h" @implementation RTCAudioSource { - rtc::scoped_refptr _nativeAudioSource; } @synthesize volume = _volume; +@synthesize nativeAudioSource = _nativeAudioSource; - (instancetype)initWithNativeAudioSource: (rtc::scoped_refptr)nativeAudioSource { @@ -45,10 +45,4 @@ _nativeAudioSource->SetVolume(volume); } -#pragma mark - Private - -- (rtc::scoped_refptr)nativeAudioSource { - return _nativeAudioSource; -} - @end diff --git a/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioSource.h b/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioSource.h index 3ce859e4b3..3db31573cb 100644 --- a/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioSource.h +++ b/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioSource.h @@ -20,11 +20,11 @@ RTC_EXPORT - (instancetype)init NS_UNAVAILABLE; -// Sets the volume for the RTCMediaSource. |volume] is a gain value in the range +// Sets the volume for the RTCMediaSource. |volume| is a gain value in the range // [0, 10]. -// Temporary fix to be able to modify volume of remote audio tracks -// TODO: property stays here temporarily until a proper volume-api is avaialble -// on the surface exposed by webrtc +// Temporary fix to be able to modify volume of remote audio tracks. +// TODO(kthelgason): Property stays here temporarily until a proper volume-api +// is available on the surface exposed by webrtc. @property(nonatomic, assign) double volume; @end