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/browser/renderer_host/media/audio_sync_reader.h" | 5 #include "content/browser/renderer_host/media/audio_sync_reader.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
12 #include "content/public/common/content_switches.h" | 12 #include "content/public/common/content_switches.h" |
13 #include "media/audio/audio_buffers_state.h" | |
14 #include "media/audio/audio_parameters.h" | 13 #include "media/audio/audio_parameters.h" |
15 | 14 |
16 using media::AudioBus; | 15 using media::AudioBus; |
17 | 16 |
18 namespace content { | 17 namespace content { |
19 | 18 |
20 AudioSyncReader::AudioSyncReader(base::SharedMemory* shared_memory, | 19 AudioSyncReader::AudioSyncReader(base::SharedMemory* shared_memory, |
21 const media::AudioParameters& params) | 20 const media::AudioParameters& params) |
22 : shared_memory_(shared_memory), | 21 : shared_memory_(shared_memory), |
23 mute_audio_(CommandLine::ForCurrentProcess()->HasSwitch( | 22 mute_audio_(CommandLine::ForCurrentProcess()->HasSwitch( |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 base::TimeDelta::FromMilliseconds(1), | 146 base::TimeDelta::FromMilliseconds(1), |
148 base::TimeDelta::FromMilliseconds(1000), | 147 base::TimeDelta::FromMilliseconds(1000), |
149 50); | 148 50); |
150 return false; | 149 return false; |
151 } | 150 } |
152 | 151 |
153 return true; | 152 return true; |
154 } | 153 } |
155 | 154 |
156 } // namespace content | 155 } // namespace content |
OLD | NEW |