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

Side by Side Diff: media/audio/mac/audio_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/fake_audio_input_stream.cc ('k') | media/audio/mac/audio_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 #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
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
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_
OLDNEW
« no previous file with comments | « media/audio/fake_audio_input_stream.cc ('k') | media/audio/mac/audio_input_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698