| 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 // Audio rendering unit utilizing audio output stream provided by browser | 5 // Audio rendering unit utilizing audio output stream provided by browser |
| 6 // process through IPC. | 6 // process through IPC. |
| 7 // | 7 // |
| 8 // Relationship of classes. | 8 // Relationship of classes. |
| 9 // | 9 // |
| 10 // AudioOutputController AudioOutputDevice | 10 // AudioOutputController AudioOutputDevice |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 153 |
| 154 // Our audio thread callback class. See source file for details. | 154 // Our audio thread callback class. See source file for details. |
| 155 class AudioThreadCallback; | 155 class AudioThreadCallback; |
| 156 | 156 |
| 157 // In order to avoid a race between OnStreamCreated and Stop(), we use this | 157 // In order to avoid a race between OnStreamCreated and Stop(), we use this |
| 158 // guard to control stopping and starting the audio thread. | 158 // guard to control stopping and starting the audio thread. |
| 159 base::Lock audio_thread_lock_; | 159 base::Lock audio_thread_lock_; |
| 160 AudioDeviceThread audio_thread_; | 160 AudioDeviceThread audio_thread_; |
| 161 scoped_ptr<AudioOutputDevice::AudioThreadCallback> audio_callback_; | 161 scoped_ptr<AudioOutputDevice::AudioThreadCallback> audio_callback_; |
| 162 | 162 |
| 163 // Temporary hack to ignore OnStreamCreated() due to the user calling Stop() |
| 164 // so we don't start the audio thread pointing to a potentially freed |
| 165 // |callback_|. |
| 166 // |
| 167 // TODO(scherkus): Replace this by changing AudioRendererSink to either accept |
| 168 // the callback via Start(). See http://crbug.com/151051 for details. |
| 169 bool stopping_hack_; |
| 170 |
| 163 DISALLOW_COPY_AND_ASSIGN(AudioOutputDevice); | 171 DISALLOW_COPY_AND_ASSIGN(AudioOutputDevice); |
| 164 }; | 172 }; |
| 165 | 173 |
| 166 } // namespace media | 174 } // namespace media |
| 167 | 175 |
| 168 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_ | 176 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_ |
| OLD | NEW |