diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-10-31 23:40:12 +0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-12-20 03:52:54 +0400 |
commit | b2fe6756e34d1316d0fa799e8a5ace993059c407 (patch) | |
tree | 0fc8dea25140a8af90cdfb96af5b5d8f97560ab7 /libavresample/audio_convert.h | |
parent | 582368626188c070d4300913c6da5efa4c24cfb2 (diff) |
lavr: add option for dithering during sample format conversion to s16
Diffstat (limited to 'libavresample/audio_convert.h')
-rw-r--r-- | libavresample/audio_convert.h | 22 |
1 files changed, 16 insertions, 6 deletions
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. |