Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Unified Diff: webrtc/sdk/objc/Framework/Classes/RTCAudioSource.mm

Issue 2534843002: Added support for changing the volume of RTCAudioSource as discussed in BUG=webrtc:6533 (Closed)
Patch Set: added manual @syntheziser for volume-property Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioSource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/objc/Framework/Classes/RTCAudioSource.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/RTCAudioSource.mm b/webrtc/sdk/objc/Framework/Classes/RTCAudioSource.mm
index 897565244044e41433b4c05b053fb90d7fc87289..2b9c6b92d27e218459201e81ce8e4e3cdc2c99a2 100644
--- a/webrtc/sdk/objc/Framework/Classes/RTCAudioSource.mm
+++ b/webrtc/sdk/objc/Framework/Classes/RTCAudioSource.mm
@@ -16,6 +16,8 @@ @implementation RTCAudioSource {
rtc::scoped_refptr<webrtc::AudioSourceInterface> _nativeAudioSource;
}
+@synthesize volume = _volume;
+
- (instancetype)initWithNativeAudioSource:
(rtc::scoped_refptr<webrtc::AudioSourceInterface>)nativeAudioSource {
RTC_DCHECK(nativeAudioSource);
@@ -38,6 +40,11 @@ - (NSString *)description {
return [NSString stringWithFormat:@"RTCAudioSource( %p ): %@", self, stateString];
}
+- (void)setVolume:(double)volume {
+ _volume = volume;
+ _nativeAudioSource->SetVolume(volume);
+}
+
#pragma mark - Private
- (rtc::scoped_refptr<webrtc::AudioSourceInterface>)nativeAudioSource {
« no previous file with comments | « AUTHORS ('k') | webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698