Index: media/audio/audio_output_device.cc |
diff --git a/media/audio/audio_output_device.cc b/media/audio/audio_output_device.cc |
index 0dcc76aca062b19bbdfb941088d053c1d1970ad3..fdc05876013fcfd130922a760ec299b084bd02b6 100644 |
--- a/media/audio/audio_output_device.cc |
+++ b/media/audio/audio_output_device.cc |
@@ -476,12 +476,23 @@ void AudioOutputDevice::AudioThreadCallback::Process(uint32_t pending_data) { |
<< " frames_delayed(pre-round):" << frames_delayed |
<< " frames_skipped:" << frames_skipped; |
+ output_bus_->set_is_raw_format(audio_parameters_.IsRawFormat()); |
DaleCurtis
2016/11/04 21:24:53
What happens if you output zeros when in bitstream
chcunningham
2017/06/14 20:03:08
Also curious about the meaning of zeroes.
|
+ if (audio_parameters_.IsRawFormat()) { |
+ // Reset the data size and frame count. |
+ // For compressed audio formats, the data size and frame count will be |
+ // updated by |render_callback_|. |
+ output_bus_->set_data_size(0); |
+ output_bus_->set_frames(audio_parameters_.frames_per_buffer()); |
+ ; |
+ } |
// Update the audio-delay measurement, inform about the number of skipped |
// frames, and ask client to render audio. Since |output_bus_| is wrapping |
// the shared memory the Render() call is writing directly into the shared |
// memory. |
render_callback_->Render(output_bus_.get(), std::round(frames_delayed), |
frames_skipped); |
+ buffer->params.frames = output_bus_->frames(); |
+ buffer->params.data_size = output_bus_->data_size(); |
} |
bool AudioOutputDevice::AudioThreadCallback:: |