The visualizer framerate is lower with FLAC than with MP3. This is
primarily a result of the firmware audio pipeline and FLAC decoder
architecture, and secondarily because of the size of FLAC frames. From
what I can tell, FLAC decompression itself doesn't put a greater load
on the SB2 CPU than MP3.

The decoding process and visualizer computation run on the same thread
in firmware. Visualizer frames are computed between invocations of the
decoder. Any single invocation of the FLAC decoder results in
decompression of a complete FLAC frame. The state machine within the
FLAC decoder doesn't allow for decompression of a partial FLAC frame -
as a result the thread effectively blocks till an entire frame has been
decoded. Because of the size of a FLAC frame (~1/10th of a second of
audio) this can take more time than the goal frame period of the
visualizer (30 fps = ~33ms). The SB2 CPU architecture allows for 8
concurrent threads, so several other processes, including screen
updates, network activity and audio processing (e.g. application of
gain) can occur during this period...just not visualizer computation. 

The MP3 decoder in the SB2 has a finer grained state machine and
smaller frame sizes - this results in a higher framerate. Neither
decoder comes even close to pegging the CPU.


-- 
vidurapparao
_______________________________________________
audiophiles mailing list
audiophiles@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/audiophiles

Reply via email to