From b2fe6756e34d1316d0fa799e8a5ace993059c407 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Wed, 31 Oct 2012 15:40:12 -0400 Subject: lavr: add option for dithering during sample format conversion to s16 --- libavresample/audio_convert.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'libavresample/audio_convert.h') diff --git a/libavresample/audio_convert.h b/libavresample/audio_convert.h index bc27223140..b8808f176d 100644 --- a/libavresample/audio_convert.h +++ b/libavresample/audio_convert.h @@ -54,16 +54,26 @@ void ff_audio_convert_set_func(AudioConvert *ac, enum AVSampleFormat out_fmt, /** * Allocate and initialize AudioConvert context for sample format conversion. * - * @param avr AVAudioResampleContext - * @param out_fmt output sample format - * @param in_fmt input sample format - * @param channels number of channels - * @return newly-allocated AudioConvert context + * @param avr AVAudioResampleContext + * @param out_fmt output sample format + * @param in_fmt input sample format + * @param channels number of channels + * @param sample_rate sample rate (used for dithering) + * @return newly-allocated AudioConvert context */ AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, - int channels); + int channels, int sample_rate); + +/** + * Free AudioConvert. + * + * The AudioConvert must have been previously allocated with ff_audio_convert_alloc(). + * + * @param ac AudioConvert struct + */ +void ff_audio_convert_free(AudioConvert **ac); /** * Convert audio data from one sample format to another. -- cgit v1.2.3