diff options
Diffstat (limited to 'media/audio/audio_output_controller.cc')
-rw-r--r-- | media/audio/audio_output_controller.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/media/audio/audio_output_controller.cc b/media/audio/audio_output_controller.cc index 27938f9..45ad62c 100644 --- a/media/audio/audio_output_controller.cc +++ b/media/audio/audio_output_controller.cc @@ -13,6 +13,8 @@ static const uint32 kMaxHardwareBufferSize = 2 * kMegabytes; static const int kMaxChannels = 32; static const int kMaxBitsPerSample = 64; static const int kMaxSampleRate = 192000; +// Signal a pause in low-latency mode. +static const int kPauseMark = -1; // Return true if the parameters for creating an audio stream is valid. // Return false otherwise. @@ -239,6 +241,11 @@ void AudioOutputController::DoPause() { // TODO(hclam): Actually pause the audio device. stream_->Stop(); + if (LowLatencyMode()) { + // Send a special pause mark to the low-latency audio thread. + sync_reader_->UpdatePendingBytes(kPauseMark); + } + handler_->OnPaused(this); } |