[mad-user] dual-thread libmad
john cooper
john.cooper at third-harmonic.com
Fri Dec 7 07:09:24 PST 2007
Steve Spano wrote:
> I have a simple RTOS which has two threads. Each thread starts lib mad
> with a dedicated mad_decoder buffer for each thread. I am now able to
> “read” data correcting into the decoders (i.e. I don’t see decoding
> errors streaming everywhere on the debug trace) but the output audio is
> mixed up. Meaning that the audio from the two threads is being mixed
> (actually shuffled) during playback.
It is built into the API. You'll need to keep separate
frame/stream/synth data structures for each instance of
a decode operation. Sounds like you are rendering to the
same set of structures multiplexed by the task scheduler.
-john
--
john.cooper at third-harmonic.com
More information about the mad-user
mailing list