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

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

Issue 5350003: Move audio output number limit to AudioManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed compilation on mac. Created 10 years 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) 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_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 "media/audio/audio_manager_base.h" 9 #include "media/audio/audio_manager_base.h"
10 10
11 class PCMQueueInAudioInputStream; 11 class PCMQueueInAudioInputStream;
12 class PCMQueueOutAudioOutputStream; 12 class PCMQueueOutAudioOutputStream;
13 13
14 // Mac OS X implementation of the AudioManager singleton. This class is internal 14 // 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 15 // to the audio output and only internal users can call methods not exposed by
16 // the AudioManager class. 16 // the AudioManager class.
17 class AudioManagerMac : public AudioManagerBase { 17 class AudioManagerMac : public AudioManagerBase {
18 public: 18 public:
19 AudioManagerMac() {}; 19 AudioManagerMac();
20 20
21 // Implementation of AudioManager. 21 // Implementation of AudioManager.
22 virtual bool HasAudioOutputDevices(); 22 virtual bool HasAudioOutputDevices();
23 virtual bool HasAudioInputDevices(); 23 virtual bool HasAudioInputDevices();
24 virtual AudioOutputStream* MakeAudioOutputStream(AudioParameters params); 24 virtual AudioOutputStream* MakeAudioOutputStream(AudioParameters params);
25 virtual AudioInputStream* MakeAudioInputStream(AudioParameters params); 25 virtual AudioInputStream* MakeAudioInputStream(AudioParameters params);
26 virtual void MuteAll(); 26 virtual void MuteAll();
27 virtual void UnMuteAll(); 27 virtual void UnMuteAll();
28 28
29 // Mac-only method to free the streams created by above facoty methods. 29 // Mac-only method to free the streams created by above facoty methods.
30 // They are called internally by the respective audio stream when it has 30 // They are called internally by the respective audio stream when it has
31 // been closed. 31 // been closed.
32 void ReleaseOutputStream(PCMQueueOutAudioOutputStream* stream); 32 void ReleaseOutputStream(PCMQueueOutAudioOutputStream* stream);
33 void ReleaseInputStream(PCMQueueInAudioInputStream* stream); 33 void ReleaseInputStream(PCMQueueInAudioInputStream* stream);
34 34
35 private: 35 private:
36 friend void DestroyAudioManagerMac(void*);
37 virtual ~AudioManagerMac() {}; 36 virtual ~AudioManagerMac() {};
scherkus (not reviewing) 2010/11/29 22:42:13 nit: can you move this impl to .cc file?
Sergey Ulanov 2010/11/29 22:58:12 Done.
37
38 // Number of currently open output streams.
39 int num_output_streams_;
40
41 // Maximum allowed number of open output streams.
42 int max_output_streams_;
43
38 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); 44 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac);
39 }; 45 };
40 46
41 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ 47 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698