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

Side by Side Diff: media/audio/mac/audio_manager_mac.h

Issue 9570014: Move some generic functions to AudioManagerBase to be inherited by platform-specific AudioManager*** (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: changed the GetMaxOutputStreamsAllowed Created 8 years, 9 months 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_MAC_AUDIO_MANAGER_MAC_H_ 5 #ifndef MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_
6 #define MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ 6 #define MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "media/audio/audio_manager_base.h" 10 #include "media/audio/audio_manager_base.h"
11 11
12 // Mac OS X implementation of the AudioManager singleton. This class is internal 12 // Mac OS X implementation of the AudioManager singleton. This class is internal
13 // to the audio output and only internal users can call methods not exposed by 13 // to the audio output and only internal users can call methods not exposed by
14 // the AudioManager class. 14 // the AudioManager class.
15 class AudioManagerMac : public AudioManagerBase { 15 class AudioManagerMac : public AudioManagerBase {
16 public: 16 public:
17 AudioManagerMac(); 17 AudioManagerMac();
18 18
19 // Implementation of AudioManager. 19 // Implementation of AudioManager.
20 virtual bool HasAudioOutputDevices() OVERRIDE; 20 virtual bool HasAudioOutputDevices() OVERRIDE;
21 virtual bool HasAudioInputDevices() OVERRIDE; 21 virtual bool HasAudioInputDevices() OVERRIDE;
22 virtual void GetAudioInputDeviceNames(media::AudioDeviceNames* device_names) 22 virtual void GetAudioInputDeviceNames(media::AudioDeviceNames* device_names)
23 OVERRIDE; 23 OVERRIDE;
24 virtual AudioOutputStream* MakeAudioOutputStream(
25 const AudioParameters& params) OVERRIDE;
26 virtual AudioInputStream* MakeAudioInputStream(
27 const AudioParameters& params, const std::string& device_id) OVERRIDE;
28 virtual void MuteAll() OVERRIDE; 24 virtual void MuteAll() OVERRIDE;
29 virtual void UnMuteAll() OVERRIDE; 25 virtual void UnMuteAll() OVERRIDE;
30 26
31 // Mac-only method to free the streams created by above facoty methods. 27 // Implementation of AudioManagerBase.
32 // They are called internally by the respective audio stream when it has 28 virtual AudioOutputStream* MakeLinearOutputStream(
33 // been closed. 29 const AudioParameters& params) OVERRIDE;
34 void ReleaseOutputStream(AudioOutputStream* stream); 30 virtual AudioOutputStream* MakeLowLatencyOutputStream(
35 void ReleaseInputStream(AudioInputStream* stream); 31 const AudioParameters& params) OVERRIDE;
32 virtual AudioInputStream* MakeLinearInputStream(
33 const AudioParameters& params, const std::string& device_id) OVERRIDE;
34 virtual AudioInputStream* MakeLowLatencyInputStream(
35 const AudioParameters& params, const std::string& device_id) OVERRIDE;
36 36
37 protected: 37 protected:
38 virtual ~AudioManagerMac(); 38 virtual ~AudioManagerMac();
39 39
40 private: 40 private:
41
42 // Number of currently open output streams.
43 size_t num_output_streams_;
44
45 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); 41 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac);
46 }; 42 };
47 43
48 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ 44 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698