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

Unified Diff: webrtc/modules/audio_device/ios/voice_processing_audio_unit.h

Issue 1945563003: Provide isAudioEnabled flag to control audio unit. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix some bluetooth issue. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_device/ios/voice_processing_audio_unit.h
diff --git a/webrtc/modules/audio_device/ios/voice_processing_audio_unit.h b/webrtc/modules/audio_device/ios/voice_processing_audio_unit.h
index 2f881e77fcdcbb963a95e0a75846cd8bc807090b..73f1f71b5ffb487a32b4d152f15fbc4826f73016 100644
--- a/webrtc/modules/audio_device/ios/voice_processing_audio_unit.h
+++ b/webrtc/modules/audio_device/ios/voice_processing_audio_unit.h
@@ -33,6 +33,9 @@ class VoiceProcessingAudioUnitObserver {
UInt32 num_frames,
AudioBufferList* io_data) = 0;
+ // Callback function called when the sample rate changes.
+ virtual void OnSampleRateChange(float sample_rate) = 0;
+
protected:
~VoiceProcessingAudioUnitObserver() {}
};
@@ -107,6 +110,11 @@ class VoiceProcessingAudioUnit {
UInt32 bus_number,
UInt32 num_frames,
AudioBufferList* io_data);
+ static void OnSampleRateChange(void* in_ref_con,
+ AudioUnit audio_unit,
+ AudioUnitPropertyID property_id,
+ AudioUnitScope scope,
+ AudioUnitElement element);
// Notifies observer that samples are needed for playback.
OSStatus NotifyGetPlayoutData(AudioUnitRenderActionFlags* flags,
@@ -120,6 +128,11 @@ class VoiceProcessingAudioUnit {
UInt32 bus_number,
UInt32 num_frames,
AudioBufferList* io_data);
+ // Notifies observer that sample rate has changed.
+ void NotifySampleRateChange(AudioUnit audio_unit,
+ AudioUnitPropertyID property_id,
+ AudioUnitScope scope,
+ AudioUnitElement element);
// Returns the predetermined format with a specific sample rate. See
// implementation file for details on format.

Powered by Google App Engine
This is Rietveld 408576698