Changed the interface AudioMixer::RemoveSource to have a void return type.
In the AudioMixerImpl implementation, removing a source never fails
and the return value is always true (see audio_mixer/audio_mixer_impl.cc).
A return value of |false| signaled that removing a source failed for
some reason. We have come to the conclusion that
* we don't know how to handle a return value of |false|
* we can't think of why an alternative implementation would need to
signal failure when removing a stream.
To avoid having a status code that is never read, never acted upon and
probably never set to anything but |true|, we change ::RemoveSource to
not have a return value.
NOTRY=True
BUG=webrtc:6346
Review-Url: https://codereview.webrtc.org/2506173003
Cr-Commit-Position: refs/heads/master@{#15150}
diff --git a/webrtc/api/audio/audio_mixer.h b/webrtc/api/audio/audio_mixer.h
index dbb58ca..931f20e 100644
--- a/webrtc/api/audio/audio_mixer.h
+++ b/webrtc/api/audio/audio_mixer.h
@@ -51,12 +51,13 @@
virtual ~Source() {}
};
- // Returns true if adding/removing was successful. A source is never
- // added twice and removal is never attempted if a source has not
- // been successfully added to the mixer. Addition and removal can
- // happen on different threads.
+ // Returns true if adding was successful. A source is never added
+ // twice. Addition and removal can happen on different threads.
virtual bool AddSource(Source* audio_source) = 0;
- virtual bool RemoveSource(Source* audio_source) = 0;
+
+ // Removal is never attempted if a source has not been successfully
+ // added to the mixer.
+ virtual void RemoveSource(Source* audio_source) = 0;
// Performs mixing by asking registered audio sources for audio. The
// mixed result is placed in the provided AudioFrame. This method