Chromium Code Reviews| Index: media/audio/audio_output_resampler.h |
| diff --git a/media/audio/audio_output_resampler.h b/media/audio/audio_output_resampler.h |
| index da512e09ebc345934a326a8c367678f639678067..fb3d1c90119af8af88b213e5cb99ca4a42abd150 100644 |
| --- a/media/audio/audio_output_resampler.h |
| +++ b/media/audio/audio_output_resampler.h |
| @@ -7,6 +7,7 @@ |
| #include <map> |
| +#include "base/files/file_path.h" |
| #include "base/macros.h" |
| #include "base/time/time.h" |
| #include "base/timer/timer.h" |
| @@ -47,6 +48,10 @@ class MEDIA_EXPORT AudioOutputResampler : public AudioOutputDispatcher { |
| void StreamVolumeSet(AudioOutputProxy* stream_proxy, double volume) override; |
| void CloseStream(AudioOutputProxy* stream_proxy) override; |
| + // Controls debug recording. |
|
DaleCurtis
2017/01/24 01:12:02
It seems like this should just be something like S
|
| + void EnableDebugRecording(const base::FilePath& file_name); |
| + void DisableDebugRecording(); |
| + |
| private: |
| using CallbackMap = |
| std::map<AudioOutputProxy*, std::unique_ptr<OnMoreDataConverter>>; |
| @@ -64,6 +69,12 @@ class MEDIA_EXPORT AudioOutputResampler : public AudioOutputDispatcher { |
| // Stops the stream corresponding to the |item| in |callbacks_|. |
| void StopStreamInternal(const CallbackMap::value_type& item); |
| + // Helper function that conditionally starts debug recording. |
| + void MaybeStartDebugRecording(); |
| + |
| + // The AudioManager that creates us. |
| + AudioManager* audio_manager_; |
| + |
| // Dispatcher to proxy all AudioOutputDispatcher calls too. |
| std::unique_ptr<AudioOutputDispatcherImpl> dispatcher_; |
| @@ -90,6 +101,10 @@ class MEDIA_EXPORT AudioOutputResampler : public AudioOutputDispatcher { |
| // to a fake stream indefinitely for transient errors. |
| base::Timer reinitialize_timer_; |
| + // Used for audio debug recordings. The file name is stored when enabling to |
| + // be able to enable on new OnMoreDataConverters. |
| + base::FilePath debug_recording_file_name_; |
| + |
| base::WeakPtrFactory<AudioOutputResampler> weak_factory_; |
| DISALLOW_COPY_AND_ASSIGN(AudioOutputResampler); |
| }; |