On 02/01/14 16:14, Florian Iragne wrote: > Hi, > > I've some code that basically open an audio file, demux it, resample it > to mono/44100Hz and mux/write the result into a wav file. > > it works. > > Now, i want to avoid the muxing/writing part and obtain a buffer > containing "raw" audio samples (after resampling) into double values. I > must have this double buffer to conform with other process that expect a > double buffer as input (currently, libsndfile is providing this). > > I have two major problems: > * conceptual: how is it possible to encode the variety of audio samples > with only one uint8_t?
uint8_t means raw data, by convention AVFrame uses that doesn't matter what is the actual content. > * technical: For the double buffer output, i shunt my process when i > obtain the ouput AVFrame and use it's data. Is it the recommended way? if you feed the avframe to the avresample yes, otherwise you should treat that data as quasi-opaque. > BTW, is there a recommended way to do what i want? demux -> decode -> resample -> your application That should be enough. lu _______________________________________________ libav-api mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-api
