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

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

Issue 645923002: Add support for audio input mute detection on all platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 6 years, 2 months 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
« no previous file with comments | « media/audio/mac/audio_input_mac.cc ('k') | media/audio/mac/audio_low_latency_input_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « media/audio/mac/audio_input_mac.cc ('k') | media/audio/mac/audio_low_latency_input_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698