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 "content/renderer/media/audio_hardware.h" | 5 #include "content/renderer/media/audio_hardware.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/common/view_messages.h" | 8 #include "content/common/view_messages.h" |
9 #include "content/renderer/render_thread_impl.h" | 9 #include "content/renderer/render_thread_impl.h" |
10 | 10 |
| 11 using media::ChannelLayout; |
| 12 using media::CHANNEL_LAYOUT_NONE; |
| 13 |
11 static int output_sample_rate = 0; | 14 static int output_sample_rate = 0; |
12 static int input_sample_rate = 0; | 15 static int input_sample_rate = 0; |
13 static size_t output_buffer_size = 0; | 16 static size_t output_buffer_size = 0; |
14 static ChannelLayout input_channel_layout = CHANNEL_LAYOUT_NONE; | 17 static ChannelLayout input_channel_layout = CHANNEL_LAYOUT_NONE; |
15 | 18 |
16 namespace audio_hardware { | 19 namespace audio_hardware { |
17 | 20 |
18 int GetOutputSampleRate() { | 21 int GetOutputSampleRate() { |
19 DCHECK(RenderThreadImpl::current() != NULL); | 22 DCHECK(RenderThreadImpl::current() != NULL); |
20 | 23 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 void ResetCache() { | 67 void ResetCache() { |
65 DCHECK(RenderThreadImpl::current() != NULL); | 68 DCHECK(RenderThreadImpl::current() != NULL); |
66 | 69 |
67 output_sample_rate = 0.0; | 70 output_sample_rate = 0.0; |
68 input_sample_rate = 0.0; | 71 input_sample_rate = 0.0; |
69 output_buffer_size = 0; | 72 output_buffer_size = 0; |
70 input_channel_layout = CHANNEL_LAYOUT_NONE; | 73 input_channel_layout = CHANNEL_LAYOUT_NONE; |
71 } | 74 } |
72 | 75 |
73 } // namespace audio_hardware | 76 } // namespace audio_hardware |
OLD | NEW |