Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: FS#11232: software mixer

Re: FS#11232: software mixer

From: Jeff Goode <jeffg7_at_gmail.com>
Date: Sat, 01 May 2010 15:36:19 -0400

A further update:

I'm having difficulty making this work in the simulator. It appears to
be a problem with the way the SDL audio code operates. No matter what I
request for the audio buffer size, it opens a 44112 byte buffer, and
expects it to be filled on every callback. This isn't a problem with
normal playback, but the mixer expects a callback every time the mix
buffer runs out. The mix buffer is only 4096 bytes, so it can't fill
the SDL buffer on each call. Therefore, the SDL callback produces
another mixer callback immediately, before the mix buffer has a chance
to get more data. Then playback starves and restarts as soon as more
mix input appears. This stutters playback terribly.

I think this behavior will not occur on target since the callback should
only occur when the (very small )hardware buffer is starved. This
prevents the double callback and playback stop.

I'd like to know if there's some way to force SDL to behave like a
target, with a very small FIFO buffer rather than its own large playback
buffer, or at least not always insist on its being full. Ideas?

Jeff
Received on 2010-05-01


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa