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

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

Issue 9702019: Adds Analog Gain Control (AGC) to the WebRTC client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « media/audio/linux/alsa_input.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/AudioQueue.h> 8 #include <AudioToolbox/AudioQueue.h>
9 #include <AudioToolbox/AudioFormat.h> 9 #include <AudioToolbox/AudioFormat.h>
10 10
(...skipping 13 matching lines...) Expand all
24 virtual ~PCMQueueInAudioInputStream(); 24 virtual ~PCMQueueInAudioInputStream();
25 25
26 // Implementation of AudioInputStream. 26 // Implementation of AudioInputStream.
27 virtual bool Open() OVERRIDE; 27 virtual bool Open() OVERRIDE;
28 virtual void Start(AudioInputCallback* callback) OVERRIDE; 28 virtual void Start(AudioInputCallback* callback) OVERRIDE;
29 virtual void Stop() OVERRIDE; 29 virtual void Stop() OVERRIDE;
30 virtual void Close() OVERRIDE; 30 virtual void Close() OVERRIDE;
31 virtual double GetMaxVolume() OVERRIDE; 31 virtual double GetMaxVolume() OVERRIDE;
32 virtual void SetVolume(double volume) OVERRIDE; 32 virtual void SetVolume(double volume) OVERRIDE;
33 virtual double GetVolume() OVERRIDE; 33 virtual double GetVolume() OVERRIDE;
34 virtual void SetAutomaticGainControl(bool enabled) OVERRIDE;
35 virtual bool GetAutomaticGainControl() OVERRIDE;
34 36
35 private: 37 private:
36 // Issue the OnError to |callback_|; 38 // Issue the OnError to |callback_|;
37 void HandleError(OSStatus err); 39 void HandleError(OSStatus err);
38 40
39 // Allocates and prepares the memory that will be used for recording. 41 // Allocates and prepares the memory that will be used for recording.
40 bool SetupBuffers(); 42 bool SetupBuffers();
41 43
42 // Sends a buffer to the audio driver for recording. 44 // Sends a buffer to the audio driver for recording.
43 OSStatus QueueNextBuffer(AudioQueueBufferRef audio_buffer); 45 OSStatus QueueNextBuffer(AudioQueueBufferRef audio_buffer);
(...skipping 26 matching lines...) Expand all
70 AudioQueueRef audio_queue_; 72 AudioQueueRef audio_queue_;
71 // Size of each of the buffers in |audio_buffers_| 73 // Size of each of the buffers in |audio_buffers_|
72 uint32 buffer_size_bytes_; 74 uint32 buffer_size_bytes_;
73 // True iff Start() has been called successfully. 75 // True iff Start() has been called successfully.
74 bool started_; 76 bool started_;
75 77
76 DISALLOW_COPY_AND_ASSIGN(PCMQueueInAudioInputStream); 78 DISALLOW_COPY_AND_ASSIGN(PCMQueueInAudioInputStream);
77 }; 79 };
78 80
79 #endif // MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ 81 #endif // MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_
OLDNEW
« no previous file with comments | « media/audio/linux/alsa_input.cc ('k') | media/audio/mac/audio_input_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698