Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/audio/audio_input_device.h" | 5 #include "media/audio/audio_input_device.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 332 } | 332 } |
| 333 last_buffer_id_ = buffer->params.id; | 333 last_buffer_id_ = buffer->params.id; |
| 334 | 334 |
| 335 // Use pre-allocated audio bus wrapping existing block of shared memory. | 335 // Use pre-allocated audio bus wrapping existing block of shared memory. |
| 336 media::AudioBus* audio_bus = audio_buses_[current_segment_id_]; | 336 media::AudioBus* audio_bus = audio_buses_[current_segment_id_]; |
| 337 | 337 |
| 338 // Deliver captured data to the client in floating point format and update | 338 // Deliver captured data to the client in floating point format and update |
| 339 // the audio delay measurement. | 339 // the audio delay measurement. |
| 340 capture_callback_->Capture( | 340 capture_callback_->Capture( |
| 341 audio_bus, | 341 audio_bus, |
| 342 buffer->params.hardware_delay_bytes / bytes_per_ms_, // Delay in ms | 342 buffer->params.hardware_delay_bytes / bytes_per_ms_, // Delay in ms |
|
chcunningham
2016/02/11 01:25:42
Another API expecing msec. Everyone OK to change t
Henrik Grunell
2016/02/12 17:47:01
sgtm
chcunningham
2016/02/17 01:56:51
Filed 587291. Added comment.
| |
| 343 buffer->params.volume, | 343 buffer->params.volume, buffer->params.key_pressed); |
| 344 buffer->params.key_pressed); | |
| 345 | 344 |
| 346 if (++current_segment_id_ >= total_segments_) | 345 if (++current_segment_id_ >= total_segments_) |
| 347 current_segment_id_ = 0; | 346 current_segment_id_ = 0; |
| 348 } | 347 } |
| 349 | 348 |
| 350 } // namespace media | 349 } // namespace media |
| OLD | NEW |