OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_output.h" | 11 #include "media/audio/audio_output.h" |
12 | 12 |
13 class PCMWaveOutAudioOutputStream; | 13 class PCMWaveOutAudioOutputStream; |
14 class AudioOutputStreamMockWin; | |
15 | 14 |
16 // Windows implementation of the AudioManager singleton. This class is internal | 15 // 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 | 16 // to the audio output and only internal users can call methods not exposed by |
18 // the AudioManager class. | 17 // the AudioManager class. |
19 class AudioManagerWin : public AudioManager { | 18 class AudioManagerWin : public AudioManager { |
20 public: | 19 public: |
21 AudioManagerWin() {} | 20 AudioManagerWin() {} |
22 // Implementation of AudioManager. | 21 // Implementation of AudioManager. |
23 virtual bool HasAudioDevices(); | 22 virtual bool HasAudioDevices(); |
24 virtual AudioOutputStream* MakeAudioStream(Format format, int channels, | 23 virtual AudioOutputStream* MakeAudioStream(Format format, int channels, |
25 int sample_rate, | 24 int sample_rate, |
26 char bits_per_sample); | 25 char bits_per_sample); |
27 virtual void MuteAll(); | 26 virtual void MuteAll(); |
28 virtual void UnMuteAll(); | 27 virtual void UnMuteAll(); |
29 virtual const void* GetLastMockBuffer(); | |
30 | 28 |
31 // Windows-only methods to free a stream created in MakeAudioStream. These | 29 // Windows-only methods to free a stream created in MakeAudioStream. These |
32 // are called internally by the audio stream when it has been closed. | 30 // are called internally by the audio stream when it has been closed. |
33 void ReleaseStream(PCMWaveOutAudioOutputStream* stream); | 31 void ReleaseStream(PCMWaveOutAudioOutputStream* stream); |
34 void ReleaseStream(AudioOutputStreamMockWin* stream); | |
35 | 32 |
36 private: | 33 private: |
37 friend void DestroyAudioManagerWin(void *); | 34 friend void DestroyAudioManagerWin(void *); |
38 virtual ~AudioManagerWin(); | 35 virtual ~AudioManagerWin(); |
39 DISALLOW_COPY_AND_ASSIGN(AudioManagerWin); | 36 DISALLOW_COPY_AND_ASSIGN(AudioManagerWin); |
40 }; | 37 }; |
41 | 38 |
42 #endif // MEDIA_AUDIO_AUDIO_MANAGER_WIN_H_ | 39 #endif // MEDIA_AUDIO_AUDIO_MANAGER_WIN_H_ |
OLD | NEW |