OLD | NEW |
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_AUDIO_MANAGER_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_H_ |
6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_ | 6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // with 0 suggesting that the implementation use a default value for that | 99 // with 0 suggesting that the implementation use a default value for that |
100 // platform. | 100 // platform. |
101 // Returns NULL if the combination of the parameters is not supported, or if | 101 // Returns NULL if the combination of the parameters is not supported, or if |
102 // we have reached some other platform specific limit. | 102 // we have reached some other platform specific limit. |
103 // | 103 // |
104 // Do not free the returned AudioInputStream. It is owned by AudioManager. | 104 // Do not free the returned AudioInputStream. It is owned by AudioManager. |
105 // When you are done with it, call |Stop()| and |Close()| to release it. | 105 // When you are done with it, call |Stop()| and |Close()| to release it. |
106 virtual AudioInputStream* MakeAudioInputStream( | 106 virtual AudioInputStream* MakeAudioInputStream( |
107 const AudioParameters& params, const std::string& device_id) = 0; | 107 const AudioParameters& params, const std::string& device_id) = 0; |
108 | 108 |
109 // Muting continues playback but effectively the volume is set to zero. | |
110 // Un-muting returns the volume to the previous level. | |
111 virtual void MuteAll() = 0; | |
112 virtual void UnMuteAll() = 0; | |
113 | |
114 // Used to determine if something else is currently making use of audio input. | 109 // Used to determine if something else is currently making use of audio input. |
115 virtual bool IsRecordingInProcess() = 0; | 110 virtual bool IsRecordingInProcess() = 0; |
116 | 111 |
117 // Returns message loop used for audio IO. | 112 // Returns message loop used for audio IO. |
118 virtual scoped_refptr<base::MessageLoopProxy> GetMessageLoop() = 0; | 113 virtual scoped_refptr<base::MessageLoopProxy> GetMessageLoop() = 0; |
119 | 114 |
120 protected: | 115 protected: |
121 AudioManager(); | 116 AudioManager(); |
122 | 117 |
123 // Called from Create() to initialize the instance. | 118 // Called from Create() to initialize the instance. |
124 virtual void Init() = 0; | 119 virtual void Init() = 0; |
125 | 120 |
126 private: | 121 private: |
127 DISALLOW_COPY_AND_ASSIGN(AudioManager); | 122 DISALLOW_COPY_AND_ASSIGN(AudioManager); |
128 }; | 123 }; |
129 | 124 |
130 } // namespace media | 125 } // namespace media |
131 | 126 |
132 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ | 127 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ |
OLD | NEW |