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 // Implementation of AudioInputStream for Mac OS X using the special AUHAL | 5 // Implementation of AudioInputStream for Mac OS X using the special AUHAL |
6 // input Audio Unit present in OS 10.4 and later. | 6 // input Audio Unit present in OS 10.4 and later. |
7 // The AUHAL input Audio Unit is for low-latency audio I/O. | 7 // The AUHAL input Audio Unit is for low-latency audio I/O. |
8 // | 8 // |
9 // Overview of operation: | 9 // Overview of operation: |
10 // | 10 // |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 virtual ~AUAudioInputStream(); | 65 virtual ~AUAudioInputStream(); |
66 | 66 |
67 // Implementation of AudioInputStream. | 67 // Implementation of AudioInputStream. |
68 virtual bool Open() override; | 68 virtual bool Open() override; |
69 virtual void Start(AudioInputCallback* callback) override; | 69 virtual void Start(AudioInputCallback* callback) override; |
70 virtual void Stop() override; | 70 virtual void Stop() override; |
71 virtual void Close() override; | 71 virtual void Close() override; |
72 virtual double GetMaxVolume() override; | 72 virtual double GetMaxVolume() override; |
73 virtual void SetVolume(double volume) override; | 73 virtual void SetVolume(double volume) override; |
74 virtual double GetVolume() override; | 74 virtual double GetVolume() override; |
| 75 virtual bool IsMuted() override; |
75 | 76 |
76 // Returns the current hardware sample rate for the default input device. | 77 // Returns the current hardware sample rate for the default input device. |
77 MEDIA_EXPORT static int HardwareSampleRate(); | 78 MEDIA_EXPORT static int HardwareSampleRate(); |
78 | 79 |
79 bool started() const { return started_; } | 80 bool started() const { return started_; } |
80 AudioUnit audio_unit() { return audio_unit_; } | 81 AudioUnit audio_unit() { return audio_unit_; } |
81 AudioBufferList* audio_buffer_list() { return &audio_buffer_list_; } | 82 AudioBufferList* audio_buffer_list() { return &audio_buffer_list_; } |
82 | 83 |
83 private: | 84 private: |
84 // AudioOutputUnit callback. | 85 // AudioOutputUnit callback. |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 154 |
154 // Used to defer Start() to workaround http://crbug.com/160920. | 155 // Used to defer Start() to workaround http://crbug.com/160920. |
155 base::CancelableClosure deferred_start_cb_; | 156 base::CancelableClosure deferred_start_cb_; |
156 | 157 |
157 DISALLOW_COPY_AND_ASSIGN(AUAudioInputStream); | 158 DISALLOW_COPY_AND_ASSIGN(AUAudioInputStream); |
158 }; | 159 }; |
159 | 160 |
160 } // namespace media | 161 } // namespace media |
161 | 162 |
162 #endif // MEDIA_AUDIO_MAC_AUDIO_LOW_LATENCY_INPUT_MAC_H_ | 163 #endif // MEDIA_AUDIO_MAC_AUDIO_LOW_LATENCY_INPUT_MAC_H_ |
OLD | NEW |