Adding initial support for lock-less informing of muting
This CL adds the initial support for letting APM know when its output will be used or not. It also adds a new method for passing RuntimeInformation to APM that returns a bool indicating the success of the passing of information. Bug: b/177830919 Change-Id: Ic2e1b92c37241d74ca6394b785b91736ca7532aa Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206061 Commit-Queue: Per Åhgren <peah@webrtc.org> Reviewed-by: Alessio Bazzica <alessiob@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33201}
This commit is contained in:
@ -525,12 +525,18 @@ class RTC_EXPORT AudioProcessing : public rtc::RefCountInterface {
|
||||
// Set to true when the output of AudioProcessing will be muted or in some
|
||||
// other way not used. Ideally, the captured audio would still be processed,
|
||||
// but some components may change behavior based on this information.
|
||||
// Default false.
|
||||
// Default false. This method takes a lock. To achieve this in a lock-less
|
||||
// manner the PostRuntimeSetting can instead be used.
|
||||
virtual void set_output_will_be_muted(bool muted) = 0;
|
||||
|
||||
// Enqueue a runtime setting.
|
||||
// Enqueues a runtime setting.
|
||||
virtual void SetRuntimeSetting(RuntimeSetting setting) = 0;
|
||||
|
||||
// Enqueues a runtime setting. Returns a bool indicating whether the
|
||||
// enqueueing was successfull.
|
||||
// TODO(b/177830919): Change this to pure virtual.
|
||||
virtual bool PostRuntimeSetting(RuntimeSetting setting) { return false; }
|
||||
|
||||
// Accepts and produces a 10 ms frame interleaved 16 bit integer audio as
|
||||
// specified in |input_config| and |output_config|. |src| and |dest| may use
|
||||
// the same memory, if desired.
|
||||
|
||||
Reference in New Issue
Block a user