Index: media/audio/mac/audio_low_latency_input_mac.h |
diff --git a/media/audio/mac/audio_low_latency_input_mac.h b/media/audio/mac/audio_low_latency_input_mac.h |
index 6b5c720345b18383332463b06e8858217d921ead..537eeb434b1bce9b9a0a0f9eb0f93168cc8c30a1 100644 |
--- a/media/audio/mac/audio_low_latency_input_mac.h |
+++ b/media/audio/mac/audio_low_latency_input_mac.h |
@@ -29,7 +29,7 @@ |
// - Calling Close() also leads to self destruction. |
// - The latency consists of two parts: |
// 1) Hardware latency, which includes Audio Unit latency, audio device |
-// latency; |
+// latency and audio stream latency; |
// 2) The delay between the actual recording instant and the time when the |
// data packet is provided as a callback. |
// |
@@ -61,6 +61,9 @@ class AUAudioInputStream : public AudioInputStream { |
virtual void Start(AudioInputCallback* callback) OVERRIDE; |
virtual void Stop() OVERRIDE; |
virtual void Close() OVERRIDE; |
+ virtual double GetMaxVolume() OVERRIDE; |
+ virtual void SetVolume(double volume) OVERRIDE; |
+ virtual double GetVolume() OVERRIDE; |
// Returns the current hardware sample rate for the default input device. |
static double HardwareSampleRate(); |
@@ -89,9 +92,16 @@ class AUAudioInputStream : public AudioInputStream { |
// Gets the current capture delay value. |
double GetCaptureLatency(const AudioTimeStamp* input_time_stamp); |
+ // Gets the number of channels for a stream of audio data. |
+ UInt32 GetNumberOfChannelsFromStream(); |
+ |
// Issues the OnError() callback to the |sink_|. |
void HandleError(OSStatus err); |
+ // Helper function to check if the volume control is avialable on specific |
+ // channel. |
+ bool IsVolumeSettableOnChannel(int channel); |
+ |
// Our creator, the audio manager needs to be notified when we close. |
AudioManagerMac* manager_; |
@@ -126,6 +136,10 @@ class AUAudioInputStream : public AudioInputStream { |
// Fixed capture hardware latency in frames. |
double hardware_latency_frames_; |
+ // The number of channels in each frame of audio data, which is used |
+ // when querying the volume of each channel. |
+ UInt32 number_of_channels_in_frame_; |
+ |
DISALLOW_COPY_AND_ASSIGN(AUAudioInputStream); |
}; |