Chromium Code Reviews| Index: media/audio/audio_device_thread.cc |
| diff --git a/media/audio/audio_device_thread.cc b/media/audio/audio_device_thread.cc |
| index edbdbd89cedd42f32d83fed4999114c06b609255..3159abc95e2d907f8fbffa6b5f35ea468e139090 100644 |
| --- a/media/audio/audio_device_thread.cc |
| +++ b/media/audio/audio_device_thread.cc |
| @@ -67,12 +67,12 @@ void AudioDeviceThread::ThreadMain() { |
| uint32_t buffer_index = 0; |
| while (true) { |
| - uint32_t pending_data = 0; |
| - size_t bytes_read = socket_.Receive(&pending_data, sizeof(pending_data)); |
| - if (bytes_read != sizeof(pending_data)) |
| + Packet packet = {0, 0}; |
| + size_t bytes_read = socket_.Receive(&packet, sizeof(packet)); |
| + if (bytes_read != sizeof(packet)) |
|
chcunningham
2016/10/21 18:19:47
Not sure if this is part of normal operation. Shou
Mikhail
2016/10/24 19:50:23
Done.
|
| break; |
| - // std::numeric_limits<uint32_t>::max() is a special signal which is |
| + // std::numeric_limits<int64_t>::max() is a special signal which is |
| // returned after the browser stops the output device in response to a |
| // renderer side request. |
| // |
| @@ -80,8 +80,10 @@ void AudioDeviceThread::ThreadMain() { |
| // the buffer index for synchronized buffers though. |
| // |
| // See comments in AudioOutputController::DoPause() for details on why. |
| - if (pending_data != std::numeric_limits<uint32_t>::max()) |
| - callback_->Process(pending_data); |
| + if (packet.pending_data != std::numeric_limits<int64_t>::max()) |
| + callback_->Process( |
| + packet.pending_data, |
| + base::TimeTicks::FromInternalValue(packet.data_timestamp_us)); |
|
miu
2016/10/23 01:19:15
ditto: Instead of FromInternalValue(), please use:
Mikhail
2016/10/24 19:50:23
Done.
|
| // The usage of synchronized buffers differs between input and output cases. |
| // |