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

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: implemented suggested changes by tkchin_webrtc Created 4 years, 1 month 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
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..65fc1fa503c5fd6f70e53ce8654f6689325e25bf 100644
--- a/webrtc/sdk/objc/Framework/Classes/RTCAudioSource.mm
+++ b/webrtc/sdk/objc/Framework/Classes/RTCAudioSource.mm
@@ -38,6 +38,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 {

Powered by Google App Engine
This is Rietveld 408576698