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

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

Issue 11344005: Handle audio device changes on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 8 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
« no previous file with comments | « media/audio/mac/audio_low_latency_output_mac.cc ('k') | media/audio/mac/audio_manager_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_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 namespace media { 12 namespace media {
13 13
14 class AudioDeviceListenerMac;
15
14 // Mac OS X implementation of the AudioManager singleton. This class is internal 16 // Mac OS X implementation of the AudioManager singleton. This class is internal
15 // 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
16 // the AudioManager class. 18 // the AudioManager class.
17 class MEDIA_EXPORT AudioManagerMac : public AudioManagerBase { 19 class MEDIA_EXPORT AudioManagerMac : public AudioManagerBase {
18 public: 20 public:
19 AudioManagerMac(); 21 AudioManagerMac();
20 22
21 // Implementation of AudioManager. 23 // Implementation of AudioManager.
22 virtual bool HasAudioOutputDevices() OVERRIDE; 24 virtual bool HasAudioOutputDevices() OVERRIDE;
23 virtual bool HasAudioInputDevices() OVERRIDE; 25 virtual bool HasAudioInputDevices() OVERRIDE;
24 virtual void GetAudioInputDeviceNames(media::AudioDeviceNames* device_names) 26 virtual void GetAudioInputDeviceNames(media::AudioDeviceNames* device_names)
25 OVERRIDE; 27 OVERRIDE;
26 28
27 // Implementation of AudioManagerBase. 29 // Implementation of AudioManagerBase.
28 virtual AudioOutputStream* MakeLinearOutputStream( 30 virtual AudioOutputStream* MakeLinearOutputStream(
29 const AudioParameters& params) OVERRIDE; 31 const AudioParameters& params) OVERRIDE;
30 virtual AudioOutputStream* MakeLowLatencyOutputStream( 32 virtual AudioOutputStream* MakeLowLatencyOutputStream(
31 const AudioParameters& params) OVERRIDE; 33 const AudioParameters& params) OVERRIDE;
32 virtual AudioInputStream* MakeLinearInputStream( 34 virtual AudioInputStream* MakeLinearInputStream(
33 const AudioParameters& params, const std::string& device_id) OVERRIDE; 35 const AudioParameters& params, const std::string& device_id) OVERRIDE;
34 virtual AudioInputStream* MakeLowLatencyInputStream( 36 virtual AudioInputStream* MakeLowLatencyInputStream(
35 const AudioParameters& params, const std::string& device_id) OVERRIDE; 37 const AudioParameters& params, const std::string& device_id) OVERRIDE;
36 38
37 protected: 39 protected:
38 virtual ~AudioManagerMac(); 40 virtual ~AudioManagerMac();
39 41
42 // Implementation of AudioManager.
43 virtual void InitializeOnAudioThread() OVERRIDE;
44
40 private: 45 private:
46 void DestructOnAudioThread();
47
48 // Listens for output device changes.
49 scoped_ptr<AudioDeviceListenerMac> output_device_listener_;
50
41 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); 51 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac);
42 }; 52 };
43 53
44 } // namespace media 54 } // namespace media
45 55
46 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ 56 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_
OLDNEW
« no previous file with comments | « media/audio/mac/audio_low_latency_output_mac.cc ('k') | media/audio/mac/audio_manager_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698