On Wed, May 9, 2012 at 3:23 PM, Anton Khirnov <[email protected]> wrote: > > On Wed, 09 May 2012 10:09:29 -0400, Justin Ruggles <[email protected]> > wrote: >> On 05/09/2012 03:13 AM, Anton Khirnov wrote: >> > --- >> > libavutil/samplefmt.c | 17 +++++++++++++++++ >> > libavutil/samplefmt.h | 13 +++++++++++++ >> > 2 files changed, 30 insertions(+) >> [...] >> > +/** >> > + * Fill an audio buffer with a constant value. >> > + * >> > + * @param audio_data array of pointers to data planes >> > + * @param byte to fill the data with >> > + * @param offset offset in samples at which to start filling >> > + * @param nb_samples number of samples to fill >> > + * @param nb_channels number of audio channels >> > + * @param sample_fmt audio sample format >> > + */ >> > +int av_samples_set(uint8_t **audio_data, int b, int offset, int >> > nb_samples, >> > + int nb_channels, enum AVSampleFormat sample_fmt); >> >> Is there really a need to set multiple samples to a single value other >> than (logical) 0? Since it works with different sample formats, I don't >> see how giving it a byte value is even useful for anything else other >> than 0 or 128. Why not just have the function set samples to zero and >> handle the 0x00 vs 0x80 internally based on sample format? >> > > Yeah, I suppose you're right.
What about float audio? _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
