|
Rockbox mail archiveSubject: Re: Gapless Playback EngineRe: Gapless Playback Engine
From: Björn Stenberg <bjorn_at_haxx.se>
Date: Mon, 25 Oct 2004 16:47:38 +0200 Spam Me wrote: > To me it seems natural to use this "opportunity" to make a > playback-engine for iRiver which support both gapless playback and > maybe even crossfading capabilities. We only have to adjust the current playback engine a little. Rockbox uses a single-buffer system which feeds mp3 data to the the hardware mp3 decoder. On devices with software decoders we need dual buffers: One to feed mp3 data to the decoder and one to feed the decoded pcm data to the DAC. Gapless playback is simply a matter of removing the blank samples from the end of the decoded mp3 data. The number of blank samples varies a bit between encoders. Some encoders (such as lame) stores this number in the file for us to use, but as a fallback if the file has no such information we can just remove up to X blank samples from the end. Crossfading is also not very complex. Instead of writing the files after each other in the pcm buffer, we mix the first few seconds of pcm data from track2 with the last few seconds of pcm data from track1 as it is delivered from the decoder. -- Björn _______________________________________________ http://cool.haxx.se/mailman/listinfo/rockboxReceived on 2004-10-25 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |