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

Unified Diff: webrtc/modules/utility/include/audio_frame_operations.h

Issue 1810413002: Avoid clicks when muting/unmuting a voe::Channel. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: undo loop unrolling Created 4 years, 9 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
Index: webrtc/modules/utility/include/audio_frame_operations.h
diff --git a/webrtc/modules/utility/include/audio_frame_operations.h b/webrtc/modules/utility/include/audio_frame_operations.h
index 1551d8689422f50760ca5e5bcc53027bcfc22473..e12e3e561be8d439fe5a59709149a875fc2b0509 100644
--- a/webrtc/modules/utility/include/audio_frame_operations.h
+++ b/webrtc/modules/utility/include/audio_frame_operations.h
@@ -45,8 +45,13 @@ class AudioFrameOperations {
// not stereo.
static void SwapStereoChannels(AudioFrame* frame);
- // Zeros out the audio and sets |frame.energy| to zero.
- static void Mute(AudioFrame& frame);
+ // Conditionally zero out contents of |frame| for implementing audio mute:
+ // |previous_frame_muted| && |current_frame_muted| - Zero out whole frame.
+ // |previous_frame_muted| && !|current_frame_muted| - Fade-in at frame start.
+ // !|previous_frame_muted| && |current_frame_muted| - Fade-out at frame end.
+ // !|previous_frame_muted| && !|current_frame_muted| - Leave frame untouched.
+ static void Mute(AudioFrame* frame, bool previous_frame_muted,
+ bool current_frame_muted);
static int Scale(float left, float right, AudioFrame& frame);
« no previous file with comments | « webrtc/modules/include/module_common_types.h ('k') | webrtc/modules/utility/source/audio_frame_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698