| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_AUDIO_MANAGER_WIN_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_WIN_H_ |
| 6 #define MEDIA_AUDIO_AUDIO_MANAGER_WIN_H_ | 6 #define MEDIA_AUDIO_AUDIO_MANAGER_WIN_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "media/audio/audio_manager_base.h" | 11 #include "media/audio/audio_manager_base.h" |
| 12 | 12 |
| 13 class PCMWaveInAudioInputStream; | 13 class PCMWaveInAudioInputStream; |
| 14 class PCMWaveOutAudioOutputStream; | 14 class PCMWaveOutAudioOutputStream; |
| 15 | 15 |
| 16 // Windows implementation of the AudioManager singleton. This class is internal | 16 // Windows implementation of the AudioManager singleton. This class is internal |
| 17 // to the audio output and only internal users can call methods not exposed by | 17 // to the audio output and only internal users can call methods not exposed by |
| 18 // the AudioManager class. | 18 // the AudioManager class. |
| 19 class AudioManagerWin : public AudioManagerBase { | 19 class AudioManagerWin : public AudioManagerBase { |
| 20 public: | 20 public: |
| 21 AudioManagerWin() {} | 21 AudioManagerWin(); |
| 22 // Implementation of AudioManager. | 22 // Implementation of AudioManager. |
| 23 virtual bool HasAudioOutputDevices(); | 23 virtual bool HasAudioOutputDevices(); |
| 24 virtual bool HasAudioInputDevices(); | 24 virtual bool HasAudioInputDevices(); |
| 25 virtual AudioOutputStream* MakeAudioOutputStream(AudioParameters params); | 25 virtual AudioOutputStream* MakeAudioOutputStream(AudioParameters params); |
| 26 virtual AudioInputStream* MakeAudioInputStream(AudioParameters params); | 26 virtual AudioInputStream* MakeAudioInputStream(AudioParameters params); |
| 27 virtual void MuteAll(); | 27 virtual void MuteAll(); |
| 28 virtual void UnMuteAll(); | 28 virtual void UnMuteAll(); |
| 29 virtual string16 GetAudioInputDeviceModel(); | 29 virtual string16 GetAudioInputDeviceModel(); |
| 30 | 30 |
| 31 // Windows-only methods to free a stream created in MakeAudioStream. These | 31 // Windows-only methods to free a stream created in MakeAudioStream. These |
| 32 // are called internally by the audio stream when it has been closed. | 32 // are called internally by the audio stream when it has been closed. |
| 33 void ReleaseOutputStream(PCMWaveOutAudioOutputStream* stream); | 33 void ReleaseOutputStream(PCMWaveOutAudioOutputStream* stream); |
| 34 | 34 |
| 35 // Called internally by the audio stream when it has been closed. | 35 // Called internally by the audio stream when it has been closed. |
| 36 void ReleaseInputStream(PCMWaveInAudioInputStream* stream); | 36 void ReleaseInputStream(PCMWaveInAudioInputStream* stream); |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 friend void DestroyAudioManagerWin(void *); | |
| 40 virtual ~AudioManagerWin(); | 39 virtual ~AudioManagerWin(); |
| 40 |
| 41 // Number of currently open output streams. |
| 42 int num_output_streams_; |
| 43 |
| 41 DISALLOW_COPY_AND_ASSIGN(AudioManagerWin); | 44 DISALLOW_COPY_AND_ASSIGN(AudioManagerWin); |
| 42 }; | 45 }; |
| 43 | 46 |
| 44 #endif // MEDIA_AUDIO_AUDIO_MANAGER_WIN_H_ | 47 #endif // MEDIA_AUDIO_AUDIO_MANAGER_WIN_H_ |
| OLD | NEW |