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_MAC_AUDIO_INPUT_MAC_H_ | 5 #ifndef MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ |
6 #define MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ | 6 #define MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ |
7 | 7 |
8 #include <AudioToolbox/AudioFormat.h> | 8 #include <AudioToolbox/AudioFormat.h> |
9 #include <AudioToolbox/AudioQueue.h> | 9 #include <AudioToolbox/AudioQueue.h> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 // Implementation of AudioInputStream. | 31 // Implementation of AudioInputStream. |
32 virtual bool Open() override; | 32 virtual bool Open() override; |
33 virtual void Start(AudioInputCallback* callback) override; | 33 virtual void Start(AudioInputCallback* callback) override; |
34 virtual void Stop() override; | 34 virtual void Stop() override; |
35 virtual void Close() override; | 35 virtual void Close() override; |
36 virtual double GetMaxVolume() override; | 36 virtual double GetMaxVolume() override; |
37 virtual void SetVolume(double volume) override; | 37 virtual void SetVolume(double volume) override; |
38 virtual double GetVolume() override; | 38 virtual double GetVolume() override; |
39 virtual void SetAutomaticGainControl(bool enabled) override; | 39 virtual void SetAutomaticGainControl(bool enabled) override; |
40 virtual bool GetAutomaticGainControl() override; | 40 virtual bool GetAutomaticGainControl() override; |
| 41 virtual bool IsMuted() override; |
41 | 42 |
42 private: | 43 private: |
43 // Issue the OnError to |callback_|; | 44 // Issue the OnError to |callback_|; |
44 void HandleError(OSStatus err); | 45 void HandleError(OSStatus err); |
45 | 46 |
46 // Allocates and prepares the memory that will be used for recording. | 47 // Allocates and prepares the memory that will be used for recording. |
47 bool SetupBuffers(); | 48 bool SetupBuffers(); |
48 | 49 |
49 // Sends a buffer to the audio driver for recording. | 50 // Sends a buffer to the audio driver for recording. |
50 OSStatus QueueNextBuffer(AudioQueueBufferRef audio_buffer); | 51 OSStatus QueueNextBuffer(AudioQueueBufferRef audio_buffer); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 base::CancelableClosure deferred_start_cb_; | 86 base::CancelableClosure deferred_start_cb_; |
86 | 87 |
87 scoped_ptr<media::AudioBus> audio_bus_; | 88 scoped_ptr<media::AudioBus> audio_bus_; |
88 | 89 |
89 DISALLOW_COPY_AND_ASSIGN(PCMQueueInAudioInputStream); | 90 DISALLOW_COPY_AND_ASSIGN(PCMQueueInAudioInputStream); |
90 }; | 91 }; |
91 | 92 |
92 } // namespace media | 93 } // namespace media |
93 | 94 |
94 #endif // MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ | 95 #endif // MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ |
OLD | NEW |