Index: media/audio/win/audio_low_latency_input_win.h |
diff --git a/media/audio/win/audio_low_latency_input_win.h b/media/audio/win/audio_low_latency_input_win.h |
index 09aeaf9976520f012abe79822ef3d7b0eb5619d5..94307ade840cd2a734a7a2d06e944c9714f8b340 100644 |
--- a/media/audio/win/audio_low_latency_input_win.h |
+++ b/media/audio/win/audio_low_latency_input_win.h |
@@ -82,6 +82,7 @@ namespace media { |
class AudioBus; |
class AudioManagerWin; |
+class MultiChannelResampler; |
// AudioInputStream implementation using Windows Core Audio APIs. |
class MEDIA_EXPORT WASAPIAudioInputStream |
@@ -125,6 +126,10 @@ class MEDIA_EXPORT WASAPIAudioInputStream |
HRESULT InitializeAudioEngine(); |
void ReportOpenResult() const; |
+ // Provides input to the MultiChannelResampler. Called by the resampler when |
+ // more data is necessary. |
+ void ProvideInput(int resampler_frame_delay, AudioBus* audio_bus); |
+ |
// Used to track down where we fail during initialization which at the |
// moment seems to be happening frequently and we're not sure why. |
// The reason might be expected (e.g. trying to open "default" on a machine |
@@ -146,7 +151,8 @@ class MEDIA_EXPORT WASAPIAudioInputStream |
OPEN_RESULT_SET_EVENT_HANDLE = 11, |
OPEN_RESULT_NO_CAPTURE_CLIENT = 12, |
OPEN_RESULT_NO_AUDIO_VOLUME = 13, |
- OPEN_RESULT_MAX = OPEN_RESULT_NO_AUDIO_VOLUME |
+ OPEN_RESULT_OK_WITH_RESAMPLING = 14, |
+ OPEN_RESULT_MAX = OPEN_RESULT_OK_WITH_RESAMPLING |
}; |
// Our creator, the audio manager needs to be notified when we close. |
@@ -243,6 +249,11 @@ class MEDIA_EXPORT WASAPIAudioInputStream |
// indicates that we need to unmute the system audio when stopping capturing. |
bool mute_done_ = false; |
+ // If the caller requires resampling (should only be in exceptional cases and |
+ // ideally, never), we support using a MultiChannelResampler. |
+ std::unique_ptr<MultiChannelResampler> resampler_; |
+ std::unique_ptr<AudioBus> resample_bus_; |
+ |
DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream); |
}; |