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

Unified Diff: media/audio/mac/audio_output_mac.h

Issue 10583009: Revert 142862 - Change the way we are stopping audio stream on Mac once again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | « media/audio/audio_output_mixer.cc ('k') | media/audio/mac/audio_output_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_output_mac.h
===================================================================
--- media/audio/mac/audio_output_mac.h (revision 142884)
+++ media/audio/mac/audio_output_mac.h (working copy)
@@ -51,11 +51,6 @@
// Check and move channels if surround sound layout needs adjusted.
bool CheckForAdjustedLayout(Channels input_channel, Channels output_channel);
- // Callback we are installing to find out when the stream is stopped.
- static void IsRunningCallback(void* p_this,
- AudioQueueRef queue,
- AudioQueuePropertyID inID);
-
// The OS calls back here when an audio buffer has been processed.
static void RenderCallback(void* p_this, AudioQueueRef queue,
AudioQueueBufferRef buffer);
@@ -103,13 +98,11 @@
bool should_down_mix_;
// Event used for synchronization when stopping the stream.
- // Callback sets it after stream is fully stopped.
+ // Callback sets it after stream is stopped.
base::WaitableEvent stopped_event_;
- // Flag set by rendering callback when it asks OS to stop the stream.
- // All subsequent renderer callbacks calls just exit immediately, they
- // are called to release the buffer (and we do it when closing the stream,
- // not in the callback).
- bool stop_requested_;
+ // When stopping we keep track of number of buffers in flight and
+ // signal "stop completed" from the last buffer's callback.
+ int num_buffers_left_;
DISALLOW_COPY_AND_ASSIGN(PCMQueueOutAudioOutputStream);
};
« no previous file with comments | « media/audio/audio_output_mixer.cc ('k') | media/audio/mac/audio_output_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698