| Index: media/audio/mac/audio_output_mac.h
|
| ===================================================================
|
| --- media/audio/mac/audio_output_mac.h (revision 142757)
|
| +++ media/audio/mac/audio_output_mac.h (working copy)
|
| @@ -51,6 +51,11 @@
|
| // 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);
|
| @@ -98,11 +103,13 @@
|
| bool should_down_mix_;
|
|
|
| // Event used for synchronization when stopping the stream.
|
| - // Callback sets it after stream is stopped.
|
| + // Callback sets it after stream is fully stopped.
|
| base::WaitableEvent stopped_event_;
|
| - // 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_;
|
| + // 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_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(PCMQueueOutAudioOutputStream);
|
| };
|
|
|