dual-thread libmad
"Steve Spano" <[email protected]> Fri, 7 Dec 2007 08:07:05 -0500
| Newsgroups | gmane.comp.audio.mad.user |
|---|---|
| Message-ID | <003501c838d2$13d912e0$0201a8c0@flelaptop1> |
This is a multi-part message in MIME format.
------=_NextPart_000_0036_01C838A8.2B030AE0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
I have made a lot of progress working with libmad and trying to get two
instances running.
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.
Seems like there may be another global buffer being used somewhere that
I have to split out onto two threads or something. Can anyone help with
ideas on how to have two threads, play two different MP3s, using libmad?
Thanks
Steve Spano, President
Finger Lakes Engineering
------=_NextPart_000_0036_01C838A8.2B030AE0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle17
{font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I have made a lot of progress working with libmad and =
trying
to get two instances running.</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>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.</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Seems like there may be another global buffer being =
used
somewhere that I have to split out onto two threads or something. Can =
anyone
help with ideas on how to have two threads, play two different MP3s, =
using libmad?</span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Thanks</span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=3DMsoAutoSig><font size=3D3 color=3Dnavy face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:navy'>Steve Spano</span></font><font =
color=3Dnavy><span
style=3D'color:navy'>, President</span></font></p>
<p class=3DMsoAutoSig><font size=3D3 color=3Dnavy face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:navy'>Finger Lakes</span></font><font
color=3Dnavy><span style=3D'color:navy'> Engineering</span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'> </span></font></p>
</div>
</body>
</html>
------=_NextPart_000_0036_01C838A8.2B030AE0--