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> |
| 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" |
8 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
9 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
10 #include "base/threading/thread_restrictions.h" | 13 #include "base/threading/thread_restrictions.h" |
11 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "build/build_config.h" |
12 #include "media/audio/audio_manager_base.h" | 16 #include "media/audio/audio_manager_base.h" |
13 #include "media/base/audio_bus.h" | 17 #include "media/base/audio_bus.h" |
14 | 18 |
15 namespace media { | 19 namespace media { |
16 | 20 |
17 // The number of shared memory buffer segments indicated to browser process | 21 // The number of shared memory buffer segments indicated to browser process |
18 // in order to avoid data overwriting. This number can be any positive number, | 22 // in order to avoid data overwriting. This number can be any positive number, |
19 // dependent how fast the renderer process can pick up captured data from | 23 // dependent how fast the renderer process can pick up captured data from |
20 // shared memory. | 24 // shared memory. |
21 static const int kRequestedSharedMemoryCount = 10; | 25 static const int kRequestedSharedMemoryCount = 10; |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 audio_bus, | 340 audio_bus, |
337 buffer->params.hardware_delay_bytes / bytes_per_ms_, // Delay in ms | 341 buffer->params.hardware_delay_bytes / bytes_per_ms_, // Delay in ms |
338 buffer->params.volume, | 342 buffer->params.volume, |
339 buffer->params.key_pressed); | 343 buffer->params.key_pressed); |
340 | 344 |
341 if (++current_segment_id_ >= total_segments_) | 345 if (++current_segment_id_ >= total_segments_) |
342 current_segment_id_ = 0; | 346 current_segment_id_ = 0; |
343 } | 347 } |
344 | 348 |
345 } // namespace media | 349 } // namespace media |
OLD | NEW |