[Libav-user] libswresample- audio
gmxubuntu at yahoo.de
Mon Oct 15 14:42:27 CEST 2012
Hi, I need to resample audio data from 44,1KHz to 48KHz,
I have read some examples and I decide to use libswresample
for this issue.
Some code for the resample is this:
SwrContext *ctx = NULL;
ctx = swr_alloc_set_opts(ctx,AV_CH_LAYOUT_STEREO,AV_SAMPLE_FMT_16,48000,
if(swr_init(ctx) < 0)
int resample_samples = swr_convert(ctx,(uint8_t**)&pcmBuffer,resamplesize,
When I play the pcm data in the with the new sample rate, I can here the sound with the
right speed, but there is another noise like a buzz. Has somebody an idea, how can I
resample correctly without another sounds, should I use a filter?, If so, where is an example.
I would be really helpfull. And sorry, I dont know if this is the right mailing list for this issue.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user