| OLD | NEW |
| 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_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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/string16.h" | 9 #include "base/string16.h" |
| 10 #include "base/task.h" | 10 #include "base/task.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // |bits_per_sample| can be any value supported by the platform. | 86 // |bits_per_sample| can be any value supported by the platform. |
| 87 // |samples_per_packet| is in hertz as well and can be 0 to |sample_rate|, | 87 // |samples_per_packet| is in hertz as well and can be 0 to |sample_rate|, |
| 88 // with 0 suggesting that the implementation use a default value for that | 88 // with 0 suggesting that the implementation use a default value for that |
| 89 // platform. | 89 // platform. |
| 90 // Returns NULL if the combination of the parameters is not supported, or if | 90 // Returns NULL if the combination of the parameters is not supported, or if |
| 91 // we have reached some other platform specific limit. | 91 // we have reached some other platform specific limit. |
| 92 // | 92 // |
| 93 // Do not free the returned AudioInputStream. It is owned by AudioManager. | 93 // Do not free the returned AudioInputStream. It is owned by AudioManager. |
| 94 // When you are done with it, call |Stop()| and |Close()| to release it. | 94 // When you are done with it, call |Stop()| and |Close()| to release it. |
| 95 virtual AudioInputStream* MakeAudioInputStream( | 95 virtual AudioInputStream* MakeAudioInputStream( |
| 96 const AudioParameters& params) = 0; | 96 const AudioParameters& params, const std::string& device_id) = 0; |
| 97 | 97 |
| 98 // Muting continues playback but effectively the volume is set to zero. | 98 // Muting continues playback but effectively the volume is set to zero. |
| 99 // Un-muting returns the volume to the previous level. | 99 // Un-muting returns the volume to the previous level. |
| 100 virtual void MuteAll() = 0; | 100 virtual void MuteAll() = 0; |
| 101 virtual void UnMuteAll() = 0; | 101 virtual void UnMuteAll() = 0; |
| 102 | 102 |
| 103 // Used to determine if something else is currently making use of audio input. | 103 // Used to determine if something else is currently making use of audio input. |
| 104 virtual bool IsRecordingInProcess() = 0; | 104 virtual bool IsRecordingInProcess() = 0; |
| 105 | 105 |
| 106 // Returns message loop used for audio IO. | 106 // Returns message loop used for audio IO. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 122 private: | 122 private: |
| 123 static void Destroy(void*); | 123 static void Destroy(void*); |
| 124 | 124 |
| 125 // Called by GetAudioManager() to create platform-specific audio manager. | 125 // Called by GetAudioManager() to create platform-specific audio manager. |
| 126 static AudioManager* CreateAudioManager(); | 126 static AudioManager* CreateAudioManager(); |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 DISABLE_RUNNABLE_METHOD_REFCOUNT(AudioManager); | 129 DISABLE_RUNNABLE_METHOD_REFCOUNT(AudioManager); |
| 130 | 130 |
| 131 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ | 131 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ |
| OLD | NEW |