Chromium Code Reviews| Index: media/base/audio_converter.h |
| diff --git a/media/base/audio_converter.h b/media/base/audio_converter.h |
| index 88e003104975dfce72521ed970cdcd1c50a2b9f9..783e4b72d5f7ce7ed7df1d0aa234b713d4b8230c 100644 |
| --- a/media/base/audio_converter.h |
| +++ b/media/base/audio_converter.h |
| @@ -56,8 +56,9 @@ class MEDIA_EXPORT AudioConverter { |
| // volume level of the provided audio data. If a volume level of zero is |
| // returned no further processing will be done on the provided data, else |
| // the volume level will be used to scale the provided audio data. |
| + // |frames_delayed| is given in terms of the input sample rate. |
| virtual double ProvideInput(AudioBus* audio_bus, |
| - base::TimeDelta buffer_delay) = 0; |
| + uint32_t frames_delayed) = 0; |
| protected: |
| virtual ~InputCallback() {} |
| @@ -74,10 +75,11 @@ class MEDIA_EXPORT AudioConverter { |
| bool disable_fifo); |
| ~AudioConverter(); |
| - // Converts audio from all inputs into the |dest|. If an |initial_delay| is |
| - // specified, it will be propagated to each input. |
| + // Converts audio from all inputs into the |dest|. If |initial_frames_delayed| |
|
Henrik Grunell
2016/05/25 14:48:38
initial_frames_delayed or frames_delayed?
chcunningham
2016/05/25 18:21:15
Fixed - frames_delayed.
|
| + // is specified, it will be propagated to each input. Count of frames must be |
| + // given in terms of the output sample rate. |
|
Henrik Grunell
2016/05/25 14:48:38
Nit: last sentence is implicit, you could skip it.
chcunningham
2016/05/25 18:21:15
Ha, I know you're right, but I always have to paus
|
| void Convert(AudioBus* dest); |
| - void ConvertWithDelay(const base::TimeDelta& initial_delay, AudioBus* dest); |
| + void ConvertWithDelay(uint32_t frames_dealyed, AudioBus* dest); |
|
Henrik Grunell
2016/05/25 14:48:38
Spelling.
chcunningham
2016/05/25 18:21:15
Done.
|
| // Adds or removes an input from the converter. RemoveInput() will call |
| // Reset() if no inputs remain after the specified input is removed. |
| @@ -133,10 +135,9 @@ class MEDIA_EXPORT AudioConverter { |
| bool downmix_early_; |
| // Used to calculate buffer delay information for InputCallbacks. |
| - base::TimeDelta input_frame_duration_; |
| - base::TimeDelta output_frame_duration_; |
| - base::TimeDelta initial_delay_; |
| - int resampler_frame_delay_; |
| + uint32_t initial_frames_delayed_; |
| + uint32_t resampler_frames_delayed_; |
| + const double io_sample_rate_ratio_; |
| // Number of channels of input audio data. Set during construction via the |
| // value from the input AudioParameters class. Preserved to recreate internal |