Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: media/audio/win/audio_manager_win.h

Issue 8491044: Link things together and enable the device selection for linux and mac. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: fixing unittests Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <windows.h> 8 #include <windows.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "media/audio/audio_manager_base.h" 12 #include "media/audio/audio_manager_base.h"
13 13
14 class PCMWaveInAudioInputStream; 14 class PCMWaveInAudioInputStream;
15 class PCMWaveOutAudioOutputStream; 15 class PCMWaveOutAudioOutputStream;
16 16
17 // Windows implementation of the AudioManager singleton. This class is internal 17 // Windows implementation of the AudioManager singleton. This class is internal
18 // to the audio output and only internal users can call methods not exposed by 18 // to the audio output and only internal users can call methods not exposed by
19 // the AudioManager class. 19 // the AudioManager class.
20 class AudioManagerWin : public AudioManagerBase { 20 class AudioManagerWin : public AudioManagerBase {
21 public: 21 public:
22 AudioManagerWin(); 22 AudioManagerWin();
23 // Implementation of AudioManager. 23 // Implementation of AudioManager.
24 virtual bool HasAudioOutputDevices() OVERRIDE; 24 virtual bool HasAudioOutputDevices() OVERRIDE;
25 virtual bool HasAudioInputDevices() OVERRIDE; 25 virtual bool HasAudioInputDevices() OVERRIDE;
26 virtual AudioOutputStream* MakeAudioOutputStream( 26 virtual AudioOutputStream* MakeAudioOutputStream(
27 const AudioParameters& params) OVERRIDE; 27 const AudioParameters& params) OVERRIDE;
28 virtual AudioInputStream* MakeAudioInputStream( 28 virtual AudioInputStream* MakeAudioInputStream(
29 const AudioParameters& params) OVERRIDE; 29 const AudioParameters& params, const std::string& device_uid) OVERRIDE;
30 virtual void MuteAll() OVERRIDE; 30 virtual void MuteAll() OVERRIDE;
31 virtual void UnMuteAll() OVERRIDE; 31 virtual void UnMuteAll() OVERRIDE;
32 virtual string16 GetAudioInputDeviceModel() OVERRIDE; 32 virtual string16 GetAudioInputDeviceModel() OVERRIDE;
33 virtual bool CanShowAudioInputSettings() OVERRIDE; 33 virtual bool CanShowAudioInputSettings() OVERRIDE;
34 virtual void ShowAudioInputSettings() OVERRIDE; 34 virtual void ShowAudioInputSettings() OVERRIDE;
35 virtual void GetAudioInputDeviceNames(media::AudioDeviceNames* device_names) 35 virtual void GetAudioInputDeviceNames(media::AudioDeviceNames* device_names)
36 OVERRIDE; 36 OVERRIDE;
37 37
38 // Windows-only methods to free a stream created in MakeAudioStream. These 38 // Windows-only methods to free a stream created in MakeAudioStream. These
39 // are called internally by the audio stream when it has been closed. 39 // are called internally by the audio stream when it has been closed.
40 void ReleaseOutputStream(PCMWaveOutAudioOutputStream* stream); 40 void ReleaseOutputStream(PCMWaveOutAudioOutputStream* stream);
41 41
42 // Called internally by the audio stream when it has been closed. 42 // Called internally by the audio stream when it has been closed.
43 void ReleaseInputStream(AudioInputStream* stream); 43 void ReleaseInputStream(AudioInputStream* stream);
44 44
45 private: 45 private:
46 virtual ~AudioManagerWin(); 46 virtual ~AudioManagerWin();
47 47
48 // Number of currently open output streams. 48 // Number of currently open output streams.
49 int num_output_streams_; 49 int num_output_streams_;
50 50
51 DISALLOW_COPY_AND_ASSIGN(AudioManagerWin); 51 DISALLOW_COPY_AND_ASSIGN(AudioManagerWin);
52 }; 52 };
53 53
54 #endif // MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_ 54 #endif // MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698