Page 1 of 1

Filter with encoded input like mp3 or aac

Posted: Wed Jun 05, 2019 7:15 am
by turborirer
Hi at all,

I' m trying to change the playback speed of an mp3 or aac file. The documentation about the sonic filter says that it needs a wav input. So my question is: how the pipeline needs to look like?

Option 1: File reader -> mp3/aac decoder -> sonic -> i2s output
Option 2: File reader -> mp3/aac decoder -> wav encoder -> wav decoder -> sonic -> i2s output
Option 3: File reader -> mp3/aac decoder -> wav decoder -> sonic -> i2s output

The point is, that I don't understand what comes out of the mp3/aac decoder? That should be wav or not? I tried all 3 options without success. Maybe I'm missing some kind of buffer in between? Option 1 was doing something but the sound quality was bad and the speed was not adjusted.

Thanks for your help!
Kilian

Re: Filter with encoded input like mp3 or aac

Posted: Fri Jun 21, 2019 4:18 am
by houhaiyan
Do you use the `set_sonic_info` to set sonic samplerate and channel? If no use, please use `audio_elememt_getinfo` to gain the samplerate and channel of music, then use `set_sonic_info` to set samplerate and channel of sonic