| 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 #ifndef MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_ | 5 #ifndef MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_ |
| 6 #define MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_ | 6 #define MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "media/audio/audio_manager_base.h" | 10 #include "media/audio/audio_manager_base.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 // Returns a PCMWaveInAudioInputStream instance or NULL on failure. | 73 // Returns a PCMWaveInAudioInputStream instance or NULL on failure. |
| 74 // This method converts MMDevice-style device ID to WaveIn-style device ID if | 74 // This method converts MMDevice-style device ID to WaveIn-style device ID if |
| 75 // necessary. | 75 // necessary. |
| 76 // (Please see device_enumeration_win.h for more info about the two kinds of | 76 // (Please see device_enumeration_win.h for more info about the two kinds of |
| 77 // device IDs.) | 77 // device IDs.) |
| 78 AudioInputStream* CreatePCMWaveInAudioInputStream( | 78 AudioInputStream* CreatePCMWaveInAudioInputStream( |
| 79 const AudioParameters& params, | 79 const AudioParameters& params, |
| 80 const std::string& device_id); | 80 const std::string& device_id); |
| 81 | 81 |
| 82 // Helper methods for constructing AudioDeviceListenerWin on the audio thread. | 82 // Helper methods for performing expensive initialization tasks on the audio |
| 83 void CreateDeviceListener(); | 83 // thread instead of on the UI thread which AudioManager is constructed on. |
| 84 void DestroyDeviceListener(); | 84 void InitializeOnAudioThread(); |
| 85 void ShutdownOnAudioThread(); |
| 85 | 86 |
| 86 void GetAudioDeviceNamesImpl(bool input, AudioDeviceNames* device_names); | 87 void GetAudioDeviceNamesImpl(bool input, AudioDeviceNames* device_names); |
| 87 | 88 |
| 88 // Listen for output device changes. | 89 // Listen for output device changes. |
| 89 scoped_ptr<AudioDeviceListenerWin> output_device_listener_; | 90 scoped_ptr<AudioDeviceListenerWin> output_device_listener_; |
| 90 | 91 |
| 91 DISALLOW_COPY_AND_ASSIGN(AudioManagerWin); | 92 DISALLOW_COPY_AND_ASSIGN(AudioManagerWin); |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 } // namespace media | 95 } // namespace media |
| 95 | 96 |
| 96 #endif // MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_ | 97 #endif // MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_ |
| OLD | NEW |