Re: dual-thread libmad

john cooper <[email protected]> Fri, 07 Dec 2007 10:09:24 -0500
Newsgroups gmane.comp.audio.mad.user
Message-ID <[email protected]>
Steve Spano wrote:

> I have a simple RTOS which has two threads. Each thread starts lib mad=20
> with a dedicated mad_decoder buffer for each thread. I am now able to=20
> =93read=94 data correcting into the decoders (i.e. I don=92t see decodi=
ng=20
> errors streaming everywhere on the debug trace) but the output audio is=
=20
> mixed up. Meaning that the audio from the two threads is being mixed=20
> (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

--=20
[email protected]