diff options
-rw-r--r-- | src/cubeb_resampler.cpp | 5 | ||||
-rw-r--r-- | src/cubeb_resampler_internal.h | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/cubeb_resampler.cpp b/src/cubeb_resampler.cpp index dc054d5..786d013 100644 --- a/src/cubeb_resampler.cpp +++ b/src/cubeb_resampler.cpp @@ -35,6 +35,11 @@ to_speex_quality(cubeb_resampler_quality q) } } +uint32_t min_buffered_audio_frame(uint32_t sample_rate) +{ + return sample_rate / 20; +} + template<typename T> passthrough_resampler<T>::passthrough_resampler(cubeb_stream * s, cubeb_data_callback cb, diff --git a/src/cubeb_resampler_internal.h b/src/cubeb_resampler_internal.h index b15bdba..ca08ec5 100644 --- a/src/cubeb_resampler_internal.h +++ b/src/cubeb_resampler_internal.h @@ -38,17 +38,13 @@ MOZ_END_STD_NAMESPACE #include <stdio.h> /* This header file contains the internal C++ API of the resamplers, for testing. */ -namespace { + // When dropping audio input frames to prevent building // an input delay, this function returns the number of frames // to keep in the buffer. // @parameter sample_rate The sample rate of the stream. // @return A number of frames to keep. -uint32_t min_buffered_audio_frame(uint32_t sample_rate) -{ - return sample_rate / 20; -} -} +uint32_t min_buffered_audio_frame(uint32_t sample_rate); int to_speex_quality(cubeb_resampler_quality q); |