<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:www.nabble.com,2006:forum-2882</id>
	<title>Nabble - MAD</title>
	<updated>2008-07-12T13:07:04Z</updated>
	<link rel="self" type="application/atom+xml" href="http://www.nabble.com/MAD-f2882.xml" />
	<link rel="alternate" type="text/html" href="http://www.nabble.com/MAD-f2882.html" />
	<subtitle type="html">MAD is a high-quality MPEG audio decoder. It currently supports MPEG-1 and the MPEG-2 extension to lower sampling frequencies, as well as the de facto MPEG 2.5 format. All three audio layers — Layer I, Layer II, and Layer III (i.e. MP3) — are fully implemented. MAD home is &lt;a href=&quot;http://www.underbit.com/products/mad/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.</subtitle>
	
<entry>
	<id>tag:www.nabble.com,2006:post-18423268</id>
	<title>Re: Converting fixed point numbers</title>
	<published>2008-07-12T13:07:04Z</published>
	<updated>2008-07-12T13:07:04Z</updated>
	<author>
		<name>Rob Leslie</name>
	</author>
	<content type="html">On Jul 12, 2008, at 10:56 AM, Reiner wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; madplay uses the following in audio_linear_round
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /* quantize and scale */
&lt;br&gt;&amp;gt; return sample &amp;gt;&amp;gt; (MAD_F_FRACBITS + 1 - bits);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; if bits is 16 (unsigned short e,g) we will shift 13 bits, whats &amp;nbsp;
&lt;br&gt;&amp;gt; about the 3 MSB bits ???
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; With this I think only the first digit of the whole part is taken, &amp;nbsp;
&lt;br&gt;&amp;gt; what is with the sign and the other 2 digits from the whole part, &amp;nbsp;
&lt;br&gt;&amp;gt; are they never used?
&lt;/div&gt;&lt;br&gt;The whole part is used to represent samples that are above full scale &amp;nbsp;
&lt;br&gt;[-1.0, 1.0) but madplay clips these prior to scaling, so at this point &amp;nbsp;
&lt;br&gt;the whole part just contains copies of the sign bit.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Rob Leslie
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18423268&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rob@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---Dev-f503.html&quot; embed=&quot;fixTarget[503]&quot; target=&quot;_top&quot; &gt;Mad - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Converting-fixed-point-numbers-tp18422172p18423268.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18422172</id>
	<title>Converting fixed point numbers</title>
	<published>2008-07-12T10:56:50Z</published>
	<updated>2008-07-12T10:56:50Z</updated>
	<author>
		<name>Reiner-6</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;madplay uses the following in audio_linear_round
&lt;br&gt;&lt;br&gt;&amp;nbsp; /* quantize and scale */
&lt;br&gt;&amp;nbsp; return sample &amp;gt;&amp;gt; (MAD_F_FRACBITS + 1 - bits);
&lt;br&gt;&lt;br&gt;if bits is 16 (unsigned short e,g) we will shift 13 bits, whats about 
&lt;br&gt;the 3 MSB bits ???
&lt;br&gt;&lt;br&gt;With this I think only the first digit of the whole part is taken, what 
&lt;br&gt;is with the sign and the other 2 digits from the whole part, are they 
&lt;br&gt;never used?
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;&lt;br&gt;Reiner
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---Dev-f503.html&quot; embed=&quot;fixTarget[503]&quot; target=&quot;_top&quot; &gt;Mad - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Converting-fixed-point-numbers-tp18422172p18422172.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18166198</id>
	<title>Re: libmad newbie questions</title>
	<published>2008-06-27T17:17:34Z</published>
	<updated>2008-06-27T17:17:34Z</updated>
	<author>
		<name>john cooper-4</name>
	</author>
	<content type="html">Alan Wolfe wrote:
&lt;br&gt;&amp;gt; Heya!
&lt;br&gt;&lt;br&gt;First off, IANAL but more/less a casual observer. &amp;nbsp;I'd
&lt;br&gt;encourage you to secure professional legal advice to
&lt;br&gt;definitively answer your questions.
&lt;br&gt;&lt;br&gt;&amp;gt; I was wondering; since mp3 is a closed format that you need to pay 
&lt;br&gt;&amp;gt; royalties for, how does libmad get around this?
&lt;br&gt;&lt;br&gt;It doesn't. &amp;nbsp;Technically you are on the hook to reconcile
&lt;br&gt;your license liability with the holder of such in the
&lt;br&gt;geography your product will be marketed:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/MP3#Licensing_and_patent_issues&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/MP3#Licensing_and_patent_issues&lt;/a&gt;&lt;br&gt;&lt;br&gt;That said enforcement has been selective and you conceivably
&lt;br&gt;could choose your own comfortability level relative to your
&lt;br&gt;situation.
&lt;br&gt;&lt;br&gt;&amp;gt; Also I was looking at the libmad page and noticed it said this under 
&lt;br&gt;&amp;gt; licensing:
&lt;br&gt;&lt;br&gt;That is a separate license issue of Underbit's MAD decoder
&lt;br&gt;software. &amp;nbsp;In a nutshell if you GPL your MAD enabled
&lt;br&gt;application (possibly exposing your own IP) you may
&lt;br&gt;distribute the aggregate under the GPL. &amp;nbsp;Otherwise you'll
&lt;br&gt;need to contact the Underbit folks to negotiate an
&lt;br&gt;alternate license agreement.
&lt;br&gt;&lt;br&gt;&amp;gt; I am looking for a way to convert mp3 to wav in a product that is going 
&lt;br&gt;&amp;gt; to be released commercially and libmad really seems like the perfect 
&lt;br&gt;&amp;gt; fit, I just want to make sure I know what's up with licensing before 
&lt;br&gt;&amp;gt; commiting to this path.
&lt;br&gt;&lt;br&gt;If you are not bound to mp3 as a compression format, others
&lt;br&gt;such as Ogg/Vorbis (well Tremor) may interest being a
&lt;br&gt;license-free public domain format and offering compression/
&lt;br&gt;quality benefits beyond that available from mp3.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://vorbis.com/faq/#flic&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://vorbis.com/faq/#flic&lt;/a&gt;&lt;br&gt;&lt;br&gt;-john
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18166198&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;john.cooper@...&lt;/a&gt;
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---User-f504.html&quot; embed=&quot;fixTarget[504]&quot; target=&quot;_top&quot; &gt;Mad - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/libmad-newbie-questions-tp18165510p18166198.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18165510</id>
	<title>libmad newbie questions</title>
	<published>2008-06-27T15:45:56Z</published>
	<updated>2008-06-27T15:45:56Z</updated>
	<author>
		<name>Alan Wolfe</name>
	</author>
	<content type="html">&lt;div&gt;Heya!&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;I was wondering; since mp3 is a closed format that you need to pay royalties for, how does libmad get around this?&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Also I was looking at the libmad page and noticed it said this under licensing:&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;quot;MAD is available under the terms of the &lt;a href=&quot;http://www.underbit.com/resources/license/gpl/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;GNU General Public License, Version 2&lt;/a&gt;, for either permanent use or for evaluation prior to obtaining a commercial license.&amp;quot;&lt;br&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Just to be clear, if you use libmad commercially you can either do so with the GPL license (satisfying that license) or you can contact the owners of the library to talk about paying for a non GPL commercial license right?&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;I am looking for&amp;nbsp;a way to convert mp3 to wav in a product that is going to be released commercially and libmad really seems like the perfect fit, I just want to make sure I know what&amp;#39;s up&amp;nbsp;with licensing before commiting to this path.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Thanks a bunch!&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---User-f504.html&quot; embed=&quot;fixTarget[504]&quot; target=&quot;_top&quot; &gt;Mad - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/libmad-newbie-questions-tp18165510p18165510.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17734645</id>
	<title>libmad documentation project</title>
	<published>2008-06-09T07:46:21Z</published>
	<updated>2008-06-09T07:46:21Z</updated>
	<author>
		<name>Michelle Baert-2</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I recently started working on a small audio processing project. I chose
&lt;br&gt;to use mad library for dealing with mp3 files.
&lt;br&gt;&lt;br&gt;Since I needed to study it for getting enough understanding of it, and
&lt;br&gt;the package TODO file calls for contributors to documentation project, I
&lt;br&gt;tried to make my notes useful for the programmers community.
&lt;br&gt;&lt;br&gt;One thing I like in java programming is the documentation facility,
&lt;br&gt;which generates browseable API documentation directly from comments
&lt;br&gt;inserted in source files.
&lt;br&gt;&lt;br&gt;The same functionality is available for C/C++ and other languages, with
&lt;br&gt;Doxygen (open-source) program, so I decided to use it.
&lt;br&gt;&lt;br&gt;You'll find all details and files here:
&lt;br&gt;&lt;a href=&quot;http://m.baert.free.fr/contrib/docs/libmad/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://m.baert.free.fr/contrib/docs/libmad/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Your comments and suggestions are welcome.
&lt;br&gt;TIA for them.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;Best regards,
&lt;br&gt;Michelle Baert
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---Dev-f503.html&quot; embed=&quot;fixTarget[503]&quot; target=&quot;_top&quot; &gt;Mad - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/libmad-documentation-project-tp17734645p17734645.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17367492</id>
	<title>Re: madplayer cross-compile on ARM11 compilation error	&quot;impossible constraint in 'asm'&quot;</title>
	<published>2008-05-21T06:05:11Z</published>
	<updated>2008-05-21T06:05:11Z</updated>
	<author>
		<name>Jianfeng Li</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;

&lt;/head&gt;
&lt;body class='hmmessage'&gt;Thank you so much for your help, Rob!&lt;BR&gt;
&amp;nbsp;&lt;BR&gt;
Regards,&lt;BR&gt;
Jeff&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;

&lt;HR id=stopSpelling&gt;
&lt;BR&gt;
&amp;gt; From: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17367492&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rob@...&lt;/a&gt;&lt;div class='shrinkable-quote'&gt;&lt;BR&gt;&amp;gt; To: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17367492&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mad-dev@...&lt;/a&gt;&lt;BR&gt;&amp;gt; Date: Sun, 18 May 2008 19:40:12 -0700&lt;BR&gt;&amp;gt; Subject: Re: [mad-dev] madplayer cross-compile on ARM11 compilation error &quot;impossible constraint in 'asm'&quot;&lt;BR&gt;&amp;gt; &lt;BR&gt;&amp;gt; On May 18, 2008, at 12:33 AM, Jianfeng Li wrote:&lt;BR&gt;&amp;gt; &amp;gt; I am now trying to cross-compile the madplayer on an arm11 based &lt;BR&gt;&amp;gt; &amp;gt; embedded system. The compiler I am using is from montavista &lt;BR&gt;&amp;gt; &amp;gt; mobilinux 5.0.&lt;BR&gt;&amp;gt; &amp;gt;&lt;BR&gt;&amp;gt; &amp;gt; When I tried to build the madplay, for the file resample.c, I got 2 &lt;BR&gt;&amp;gt; &amp;gt; errors on line 89 and 104. The error information is &quot;impossible &lt;BR&gt;&amp;gt; &amp;gt; constraint in 'asm'. When I tried to build the libmad, I also met &lt;BR&gt;&amp;gt; &amp;gt; the same error. But it seems that during compilation if &quot;FPM-ARM&quot; &lt;BR&gt;&amp;gt; &amp;gt; option is enabled then the error is solved. But here I checked the &lt;BR&gt;&amp;gt; &amp;gt; Makefile, there is no such option of &quot;FPM&quot; as in the Makefile of &lt;BR&gt;&amp;gt; &amp;gt; libmad.&lt;BR&gt;&amp;gt; !
 &amp;gt;&lt;BR&gt;&amp;gt; &amp;gt; So can anybody help to tell me why this error happens, it is due to &lt;BR&gt;&amp;gt; &amp;gt; the compiler's constraint/requirement? How should I try to solve &lt;BR&gt;&amp;gt; &amp;gt; this error? Is &quot;trying to enable the FPM&quot; a good option to try?&lt;BR&gt;&amp;gt; &lt;BR&gt;&amp;gt; Running the libmad `configure' script is the usual way to cause an &lt;BR&gt;&amp;gt; appropriate FPM macro to be defined. You can force the selection using &lt;BR&gt;&amp;gt; the --enable-fpm option (e.g. --enable-fpm=arm) in case the &lt;BR&gt;&amp;gt; automatically chosen default is inappropriate for some reason.&lt;BR&gt;&amp;gt; &lt;BR&gt;&amp;gt; Note that the FPM selection is carried into the mad.h header file &lt;BR&gt;&amp;gt; which is used by madplay et al. When cross-compiling, the resulting &lt;BR&gt;&amp;gt; mad.h could be different from the build system's mad.h so it's &lt;BR&gt;&amp;gt; important to check your include paths.&lt;BR&gt;&amp;gt; &lt;BR&gt;&amp;gt; -- &lt;BR&gt;&amp;gt; Rob Leslie&lt;BR&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17367492&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rob@...&lt;/a&gt;&lt;BR&gt;&amp;gt; &lt;/div&gt;&lt;BR&gt;&lt;br /&gt;&lt;hr /&gt;Invite your mail contacts to join your friends list with Windows Live S!
 paces. It's easy! &lt;a href='http://spaces.live.com/spacesapi.aspx?wx_ac

tion=create&amp;wx_url=/friends.aspx&amp;mkt=en-us' target='_new' rel=&quot;nofollow&quot;&gt;Try it!&lt;/a&gt;&lt;/body&gt;
&lt;/html&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---Dev-f503.html&quot; embed=&quot;fixTarget[503]&quot; target=&quot;_top&quot; &gt;Mad - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/madplayer-cross-compile-on-ARM11-compilation-error-%22impossible-constraint-in-%27asm%27%22-tp17300052p17367492.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17367954</id>
	<title>Re: Stream Decode</title>
	<published>2008-05-21T05:58:24Z</published>
	<updated>2008-05-21T05:58:24Z</updated>
	<author>
		<name>john cooper-4</name>
	</author>
	<content type="html">Alexey V Paramonov wrote:
&lt;br&gt;&amp;gt; Hi!
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I have the following question - is it possible to decode a stream using 
&lt;br&gt;&amp;gt; MAD?
&lt;br&gt;&lt;br&gt;Yes, of course.
&lt;br&gt;&lt;br&gt;&amp;gt; For example: I have shoutcast stream and I read it in small portions
&lt;br&gt;&amp;gt; (say, 40960 bytes), decode it and encode back to mp3 using LAME
&lt;br&gt;&amp;gt; (chaning bitrate, samplerate, etc...).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The problem is that I have to call mad_stream_buffer with each piece of
&lt;br&gt;&amp;gt; stream data, decode/encode it and then if I listen the resulting mp3
&lt;br&gt;&amp;gt; file - I notice &amp;quot;noise&amp;quot; between theese small decoded pieces.
&lt;br&gt;&amp;gt; Seems like it happen not only with VBR files.
&lt;br&gt;&lt;br&gt;Haven't looked at madplay (etc..) in years but originally
&lt;br&gt;it was mmap()'ing an mp3 file into memory which works
&lt;br&gt;fine assuming the mmap() region could grow for as long as
&lt;br&gt;you need to decode the respective file.
&lt;br&gt;&lt;br&gt;If rather you are trying to decode into a fixed buffer
&lt;br&gt;you'll need to do some adjustment when your decode nears
&lt;br&gt;the end of the static buffer. &amp;nbsp;This means detecting when
&lt;br&gt;you don't have enough data left at the buffer tail to
&lt;br&gt;do a valid frame decode (ie: mad_frame_decode() returns
&lt;br&gt;MAD_ERROR_BUFLEN). &amp;nbsp;In that case you need to copy the
&lt;br&gt;partial frame at the buffer's tail, back at/near the head
&lt;br&gt;of the buffer (depending on your stream management logic)
&lt;br&gt;and readjust libmad's notion of where it is via a
&lt;br&gt;mad_stream_buffer() call.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Pseudo-code:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; while ( bytes = read(file_id, buff, SHOUT_BUFFER_LENGTH ) ) &amp;nbsp;{
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;mad_stream_buffer(&amp;stream, buff, bytes );
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;while(1){
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;mad_frame_decode(&amp;frame,&amp;stream)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;....
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;int ret = lame_encode_buffer( lameGlobalFlags,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;left,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;right,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;nsamples,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mp3Buf,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mp3Size );
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;// Play resulting mp3 data
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; }
&lt;/div&gt;&lt;br&gt;I really don't understand what you are trying to
&lt;br&gt;accomplish via the back-to-back decode/encode but
&lt;br&gt;I suppose that is unrelated to your question.
&lt;br&gt;&lt;br&gt;&amp;gt; Is it possible to decode a stream without theese &amp;quot;edge effects&amp;quot; ?
&lt;br&gt;&lt;br&gt;Yes but it can be a little tricky to get right in the
&lt;br&gt;case you allow a user to manipulate the stream pointer
&lt;br&gt;and perform arbitrary seeks within the stream.
&lt;br&gt;&lt;br&gt;&amp;gt; May be I should not re-initialize MAD buffer after each read in some way?
&lt;br&gt;&lt;br&gt;If you are altering the [memory address] seek point
&lt;br&gt;within the current buffer you'll need to reset the
&lt;br&gt;decoder's notion of decode location via a mad_stream_buffer()
&lt;br&gt;call.
&lt;br&gt;&lt;br&gt;-john
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17367954&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;john.cooper@...&lt;/a&gt;
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---User-f504.html&quot; embed=&quot;fixTarget[504]&quot; target=&quot;_top&quot; &gt;Mad - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Stream-Decode-tp17366454p17367954.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17366454</id>
	<title>Stream Decode</title>
	<published>2008-05-21T05:07:17Z</published>
	<updated>2008-05-21T05:07:17Z</updated>
	<author>
		<name>Alexey V Paramonov-2</name>
	</author>
	<content type="html">Hi!
&lt;br&gt;&lt;br&gt;I have the following question - is it possible to decode a stream using MAD?
&lt;br&gt;For example: I have shoutcast stream and I read it in small portions
&lt;br&gt;(say, 40960 bytes), decode it and encode back to mp3 using LAME
&lt;br&gt;(chaning bitrate, samplerate, etc...).
&lt;br&gt;&lt;br&gt;The problem is that I have to call mad_stream_buffer with each piece of
&lt;br&gt;stream data, decode/encode it and then if I listen the resulting mp3
&lt;br&gt;file - I notice &amp;quot;noise&amp;quot; between theese small decoded pieces.
&lt;br&gt;Seems like it happen not only with VBR files.
&lt;br&gt;&lt;br&gt;Pseudo-code:
&lt;br&gt;&lt;br&gt;while ( bytes = read(file_id, buff, SHOUT_BUFFER_LENGTH ) ) &amp;nbsp;{
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; mad_stream_buffer(&amp;stream, buff, bytes );
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; while(1){
&lt;br&gt;&amp;nbsp; &amp;nbsp; mad_frame_decode(&amp;frame,&amp;stream)
&lt;br&gt;&amp;nbsp; &amp;nbsp; ....
&lt;br&gt;&amp;nbsp; &amp;nbsp; int ret = lame_encode_buffer( lameGlobalFlags,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; left,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; right,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nsamples,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mp3Buf,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mp3Size );
&lt;br&gt;&amp;nbsp; &amp;nbsp; // Play resulting mp3 data
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Is it possible to decode a stream without theese &amp;quot;edge effects&amp;quot; ? May be
&lt;br&gt;I should not re-initialize MAD buffer after each read in some way?
&lt;br&gt;Please help.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---User-f504.html&quot; embed=&quot;fixTarget[504]&quot; target=&quot;_top&quot; &gt;Mad - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Stream-Decode-tp17366454p17366454.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17346254</id>
	<title>Stream Decode</title>
	<published>2008-05-20T10:29:20Z</published>
	<updated>2008-05-20T10:29:20Z</updated>
	<author>
		<name>Alexey V Paramonov-2</name>
	</author>
	<content type="html">Hi!
&lt;br&gt;&lt;br&gt;I have the following question - is it possible to decode a stream using MAD?
&lt;br&gt;For example: I have shoutcast stream and I read it in small portions 
&lt;br&gt;(say, 40960 bytes), decode it and encode back to mp3 using LAME
&lt;br&gt;(chaning bitrate, samplerate, etc...).
&lt;br&gt;&lt;br&gt;The problem is that I have to call mad_stream_buffer with each piece of 
&lt;br&gt;stream data, decode/encode it and then if I listen the resulting mp3 
&lt;br&gt;file - I notice &amp;quot;noise&amp;quot; between theese small decoded pieces.
&lt;br&gt;Seems like it happen not only with VBR files.
&lt;br&gt;&lt;br&gt;Pseudo-code:
&lt;br&gt;&lt;br&gt;while ( bytes = read(file_id, buff, SHOUT_BUFFER_LENGTH ) ) &amp;nbsp;{
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; mad_stream_buffer(&amp;stream, buff, bytes );
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; while(1){
&lt;br&gt;&amp;nbsp; &amp;nbsp; mad_frame_decode(&amp;frame,&amp;stream)
&lt;br&gt;&amp;nbsp; &amp;nbsp; ....
&lt;br&gt;&amp;nbsp; &amp;nbsp; int ret = lame_encode_buffer( lameGlobalFlags,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; left,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; right,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nsamples,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mp3Buf,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mp3Size );
&lt;br&gt;&amp;nbsp; &amp;nbsp; // Play resulting mp3 data
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Is it possible to decode a stream without theese &amp;quot;edge effects&amp;quot; ? May be 
&lt;br&gt;I should not re-initialize MAD buffer after each read in some way?
&lt;br&gt;Please help.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---Dev-f503.html&quot; embed=&quot;fixTarget[503]&quot; target=&quot;_top&quot; &gt;Mad - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Stream-Decode-tp17346254p17346254.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17310474</id>
	<title>Re: madplayer cross-compile on ARM11 compilation error &quot;impossible constraint in 'asm'&quot;</title>
	<published>2008-05-18T19:40:12Z</published>
	<updated>2008-05-18T19:40:12Z</updated>
	<author>
		<name>Rob Leslie</name>
	</author>
	<content type="html">On May 18, 2008, at 12:33 AM, Jianfeng Li wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I am now trying to cross-compile the madplayer on an arm11 based &amp;nbsp;
&lt;br&gt;&amp;gt; embedded system. &amp;nbsp;The compiler I am using is from montavista &amp;nbsp;
&lt;br&gt;&amp;gt; mobilinux 5.0.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; When I tried to build the madplay, for the file resample.c, I got 2 &amp;nbsp;
&lt;br&gt;&amp;gt; errors on line 89 and 104. &amp;nbsp;The error information is &amp;quot;impossible &amp;nbsp;
&lt;br&gt;&amp;gt; constraint in 'asm'. &amp;nbsp;When I tried to build the libmad, I also met &amp;nbsp;
&lt;br&gt;&amp;gt; the same error. &amp;nbsp;But it seems that during compilation if &amp;quot;FPM-ARM&amp;quot; &amp;nbsp;
&lt;br&gt;&amp;gt; option is enabled then the error is solved. &amp;nbsp;But here I checked the &amp;nbsp;
&lt;br&gt;&amp;gt; Makefile, there is no such option of &amp;quot;FPM&amp;quot; as in the Makefile of &amp;nbsp;
&lt;br&gt;&amp;gt; libmad.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So can anybody help to tell me why this error happens, it is due to &amp;nbsp;
&lt;br&gt;&amp;gt; the compiler's constraint/requirement? &amp;nbsp;How should I try to solve &amp;nbsp;
&lt;br&gt;&amp;gt; this error? &amp;nbsp;Is &amp;quot;trying to enable the FPM&amp;quot; a good option to try?
&lt;/div&gt;&lt;br&gt;Running the libmad `configure' script is the usual way to cause an &amp;nbsp;
&lt;br&gt;appropriate FPM macro to be defined. You can force the selection using &amp;nbsp;
&lt;br&gt;the --enable-fpm option (e.g. --enable-fpm=arm) in case the &amp;nbsp;
&lt;br&gt;automatically chosen default is inappropriate for some reason.
&lt;br&gt;&lt;br&gt;Note that the FPM selection is carried into the mad.h header file &amp;nbsp;
&lt;br&gt;which is used by madplay et al. When cross-compiling, the resulting &amp;nbsp;
&lt;br&gt;mad.h could be different from the build system's mad.h so it's &amp;nbsp;
&lt;br&gt;important to check your include paths.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Rob Leslie
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17310474&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rob@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---Dev-f503.html&quot; embed=&quot;fixTarget[503]&quot; target=&quot;_top&quot; &gt;Mad - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/madplayer-cross-compile-on-ARM11-compilation-error-%22impossible-constraint-in-%27asm%27%22-tp17300052p17310474.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17300052</id>
	<title>madplayer cross-compile on ARM11 compilation error &quot;impossible constraint in 'asm'&quot;</title>
	<published>2008-05-18T00:33:50Z</published>
	<updated>2008-05-18T00:33:50Z</updated>
	<author>
		<name>Jianfeng Li</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;

&lt;/head&gt;
&lt;body class='hmmessage'&gt;Hi, All,&lt;BR&gt;
&amp;nbsp;&lt;BR&gt;
I am now trying to cross-compile the madplayer on an arm11 based embedded system.&amp;nbsp; The compiler I am using is from montavista mobilinux 5.0.&lt;BR&gt;
&amp;nbsp;&lt;BR&gt;
When I tried to build the madplay, for the file resample.c, I got 2 errors on line 89 and 104.&amp;nbsp; The error information is &quot;impossible constraint in 'asm'.&amp;nbsp; When I tried to build the libmad, I also met the same error.&amp;nbsp; But it seems that during compilation if &quot;FPM-ARM&quot; option is enabled then the error is solved.&amp;nbsp; But here I checked the Makefile, there is no such option of &quot;FPM&quot; as in the Makefile of libmad.&amp;nbsp; &lt;BR&gt;
&amp;nbsp;&lt;BR&gt;
So can anybody help to tell me why this error happens, it is due to the compiler's constraint/requirement?&amp;nbsp; How should I try to solve this error?&amp;nbsp; Is &quot;trying to enable the FPM&quot; a good option to try?&lt;BR&gt;
&amp;nbsp;&lt;BR&gt;
Many thanks in advance!&lt;BR&gt;
&amp;nbsp;&lt;BR&gt;
Regards,&lt;BR&gt;
Jeffen&lt;BR&gt;
&amp;nbsp;&lt;BR&gt;&lt;br /&gt;&lt;hr /&gt;Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! &lt;a href='http://spaces.live.com/spacesapi.aspx?wx_action=create&amp;wx_url=/friends.aspx&amp;mkt=en-us' target='_new' rel=&quot;nofollow&quot;&gt;Try it!&lt;/a&gt;&lt;/body&gt;
&lt;/html&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---Dev-f503.html&quot; embed=&quot;fixTarget[503]&quot; target=&quot;_top&quot; &gt;Mad - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/madplayer-cross-compile-on-ARM11-compilation-error-%22impossible-constraint-in-%27asm%27%22-tp17300052p17300052.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-16801809</id>
	<title>decoding error while using minimad.c</title>
	<published>2008-04-20T19:16:35Z</published>
	<updated>2008-04-20T19:16:35Z</updated>
	<author>
		<name>王斐斐</name>
	</author>
	<content type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;div style=&quot;font-family:times new roman, new york, times, serif;font-size:12pt&quot;&gt;&lt;DIV&gt;Hello !&lt;/DIV&gt;
&lt;DIV&gt;I just got started using libmad.&amp;nbsp; I need to write an application to decode an mp3 file.I tried to run minimad.c, some errors like that:&lt;/DIV&gt;
&lt;DIV&gt;decoding error 0x0101(lost synchronization)at byte offset 0&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;decoding error 0x0101(lost synchronization)at byte offset 5539905&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;my soundcard info:&lt;/DIV&gt;
&lt;DIV&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 02)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;Subsystem: Ensoniq Creative Sound Blaster AudioPCI64V, AudioPCI128&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;Flags: bus master, ?? devsel, latency 64, IRQ 18&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;I/O ports at 1400 [size=64]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;my&amp;nbsp;kernal system( running in VMware workstation)&amp;nbsp;info:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA&quot;&gt;2.6.15&lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA&quot;&gt;-1.2054_FC5 i686 athlon i386&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA&quot;&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA&quot;&gt;something in /etc/modprobe.conf is:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN lang=EN-US&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA&quot;&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;alias eth0 pcnet32&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;alias scsi_hostadapter BusLogic&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;alias snd-card-0 snd-ens1371&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;options snd-card-0 index=0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;options snd-ens1371 index=0 &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;remove snd-ens1371 { /usr/sbin/alsactl store 0 &amp;gt;/dev/null 2&amp;gt;&amp;amp;1 || : ; }; /sbin/modprobe -r --ignore-remove snd-ens1371&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;Can anyone please help me? Thank you!!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;SPAN lang=EN-US&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feifei.wang&lt;BR&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0cm 0cm 0pt&quot;&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/div&gt;&lt;br&gt;


      &lt;hr size=1&gt;&lt;a href=&quot;http://cn.mail.yahoo.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt; 雅虎邮箱，您的终生邮箱！&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---User-f504.html&quot; embed=&quot;fixTarget[504]&quot; target=&quot;_top&quot; &gt;Mad - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/decoding-error-while-using-minimad.c-tp16801809p16801809.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15709389</id>
	<title>Minimad.c</title>
	<published>2008-02-27T01:00:07Z</published>
	<updated>2008-02-27T01:00:07Z</updated>
	<author>
		<name>Sebastiaan Heunis</name>
	</author>
	<content type="html">Hi
&lt;br&gt;&lt;br&gt;I just got started using libmad. &amp;nbsp;I need to write an application to
&lt;br&gt;decode an mp3 and write the contents to a data file for FM modulation
&lt;br&gt;in Gnuradio. &amp;nbsp;I tried to compile minimad.c using g++ -c minimad.c
&lt;br&gt;-lmad, but I can't get it to work. &amp;nbsp;I get the following errors. &amp;nbsp;Can
&lt;br&gt;anyone please help me?
&lt;br&gt;&lt;br&gt;minimad.c: In function ���int main(int, char**)���:
&lt;br&gt;minimad.c:56: error: invalid conversion from ���void*��� to ���const
&lt;br&gt;unsigned char*���
&lt;br&gt;minimad.c:56: error: &amp;nbsp; initializing argument 1 of ���int decode(const
&lt;br&gt;unsigned char*, long unsigned int)���
&lt;br&gt;minimad.c: In function ���mad_flow input(void*, mad_stream*)���:
&lt;br&gt;minimad.c:87: error: invalid conversion from ���void*��� to ���buffer*���
&lt;br&gt;minimad.c: In function ���mad_flow error(void*, mad_stream*, mad_frame*)���:
&lt;br&gt;minimad.c:175: error: invalid conversion from ���void*��� to ���buffer*���
&lt;br&gt;&lt;br&gt;Thank you
&lt;br&gt;&lt;br&gt;Sebastiaan
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---User-f504.html&quot; embed=&quot;fixTarget[504]&quot; target=&quot;_top&quot; &gt;Mad - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Minimad.c-tp15709389p15709389.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15181479</id>
	<title>Re: Initite loop bug in libid3tag-0.15.0b</title>
	<published>2008-01-30T04:18:22Z</published>
	<updated>2008-01-30T04:18:22Z</updated>
	<author>
		<name>john cooper-4</name>
	</author>
	<content type="html">Rahul Banerjee wrote:
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; I am new to the usage of this mad library. I have a question regarding 
&lt;br&gt;&amp;gt; this. Is the fast forward playback of mp3 is supported with this library?
&lt;br&gt;&lt;br&gt;Well yes, sort of. &amp;nbsp;libmad will simply decode a stream.
&lt;br&gt;The burden is placed on the user however to direct the
&lt;br&gt;decoder to whatever bits you'd like to decode. &amp;nbsp;So to
&lt;br&gt;implement fast fwd, trick play, etc.. you'll need to
&lt;br&gt;point the decoder at the bits you'd like to render which
&lt;br&gt;say constitute snippets of audio to be rendered from a
&lt;br&gt;stream in fast forward.
&lt;br&gt;&lt;br&gt;This requires repositioning the stream pointer ahead in
&lt;br&gt;the stream and rendering frames until you have an
&lt;br&gt;error free decode and are synchronized. &amp;nbsp;Render as much
&lt;br&gt;of decoded output to the audio device for a single hop,
&lt;br&gt;reposition the decoder in the stream and repeat.
&lt;br&gt;&lt;br&gt;-john
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=15181479&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;john.cooper@...&lt;/a&gt;
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---Dev-f503.html&quot; embed=&quot;fixTarget[503]&quot; target=&quot;_top&quot; &gt;Mad - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Initite-loop-bug-in-libid3tag-0.15.0b-tp14782955p15181479.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15174609</id>
	<title>Re: Initite loop bug in libid3tag-0.15.0b</title>
	<published>2008-01-29T18:49:36Z</published>
	<updated>2008-01-29T18:49:36Z</updated>
	<author>
		<name>Rahul Banerjee-2</name>
	</author>
	<content type="html">&lt;div&gt;Hi,&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;I am new to the usage of this mad library. I have a question regarding this. Is the fast forward playback of mp3 is supported with this library?&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Thanks and Regards,&lt;/div&gt;
&lt;div&gt;Rahul Banerjee&lt;br&gt;&lt;br&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span class=&quot;gmail_quote&quot;&gt;On 1/13/08, &lt;b class=&quot;gmail_sendername&quot;&gt;Kentaro Oda&lt;/b&gt; &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=15174609&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;odaken@...&lt;/a&gt;&amp;gt; wrote:&lt;/span&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid&quot;&gt;Hi, for the maintainer libid3tag.&lt;br&gt;&lt;br&gt;I found an infinite loop bug in libid3tag-0.15.0b library, which&lt;br&gt;
causes memory overflow.&lt;br&gt;&lt;br&gt;The problem occurs when parsing an ID3_FIELD_TYPE_STRINGLIST field,&lt;br&gt;specifically when data to be parsed is ended with &amp;#39;\0&amp;#39;.&lt;br&gt;In this case, **ptr == 0, but the condition end - *ptr is 1 so loop&lt;br&gt;
continues infinitely.&lt;br&gt;&lt;br&gt;&lt;br&gt;*** field.c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2003-04-19 09:14:33.000000000 +0900&lt;br&gt;--- field-patched.c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2008-01-13 16:08:22.000000000 +0900&lt;br&gt;***************&lt;br&gt;*** 291,297 ****&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end = *ptr + length;&lt;br&gt;
&lt;br&gt;!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (end - *ptr &amp;gt; 0) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ucs4 = id3_parse_string(ptr, end - *ptr, *encoding, 0);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ucs4 == 0)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; goto fail;&lt;br&gt;--- 291,297 ----&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end = *ptr + length;&lt;br&gt;&lt;br&gt;!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (end - *ptr &amp;gt; 0 &amp;amp;&amp;amp; **ptr != &amp;#39;\0&amp;#39;) {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ucs4 = id3_parse_string(ptr, end - *ptr, *encoding, 0);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ucs4 == 0)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; goto fail;&lt;br&gt;&lt;br&gt;&lt;br&gt;--&lt;br&gt;Kentaro Oda&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---Dev-f503.html&quot; embed=&quot;fixTarget[503]&quot; target=&quot;_top&quot; &gt;Mad - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Initite-loop-bug-in-libid3tag-0.15.0b-tp14782955p15174609.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-14782955</id>
	<title>Initite loop bug in libid3tag-0.15.0b</title>
	<published>2008-01-12T23:17:36Z</published>
	<updated>2008-01-12T23:17:36Z</updated>
	<author>
		<name>Kentaro Oda</name>
	</author>
	<content type="html">Hi, for the maintainer libid3tag.
&lt;br&gt;&lt;br&gt;I found an infinite loop bug in libid3tag-0.15.0b library, which
&lt;br&gt;causes memory overflow.
&lt;br&gt;&lt;br&gt;The problem occurs when parsing an ID3_FIELD_TYPE_STRINGLIST field,
&lt;br&gt;specifically when data to be parsed is ended with '\0'.
&lt;br&gt;In this case, **ptr == 0, but the condition end - *ptr is 1 so loop
&lt;br&gt;continues infinitely.
&lt;br&gt;&lt;br&gt;&lt;br&gt;*** field.c	2003-04-19 09:14:33.000000000 +0900
&lt;br&gt;--- field-patched.c	2008-01-13 16:08:22.000000000 +0900
&lt;br&gt;***************
&lt;br&gt;*** 291,297 ****
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end = *ptr + length;
&lt;br&gt;&lt;br&gt;! &amp;nbsp; &amp;nbsp; &amp;nbsp; while (end - *ptr &amp;gt; 0) {
&lt;br&gt;&amp;nbsp; 	ucs4 = id3_parse_string(ptr, end - *ptr, *encoding, 0);
&lt;br&gt;&amp;nbsp; 	if (ucs4 == 0)
&lt;br&gt;&amp;nbsp; 	 &amp;nbsp;goto fail;
&lt;br&gt;--- 291,297 ----
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end = *ptr + length;
&lt;br&gt;&lt;br&gt;! &amp;nbsp; &amp;nbsp; &amp;nbsp; while (end - *ptr &amp;gt; 0 &amp;&amp; **ptr != '\0') {
&lt;br&gt;&amp;nbsp; 	ucs4 = id3_parse_string(ptr, end - *ptr, *encoding, 0);
&lt;br&gt;&amp;nbsp; 	if (ucs4 == 0)
&lt;br&gt;&amp;nbsp; 	 &amp;nbsp;goto fail;
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Kentaro Oda
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---Dev-f503.html&quot; embed=&quot;fixTarget[503]&quot; target=&quot;_top&quot; &gt;Mad - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Initite-loop-bug-in-libid3tag-0.15.0b-tp14782955p14782955.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-14695714</id>
	<title>madplay: How to select a specific ALSA card</title>
	<published>2008-01-08T10:13:45Z</published>
	<updated>2008-01-08T10:13:45Z</updated>
	<author>
		<name>Thomas Reitmayr-2</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;I just started using madplay a short while ago and I was wondering
&lt;br&gt;whether it is possible to select an ALSA card different from the default
&lt;br&gt;one for audio output.
&lt;br&gt;&amp;gt;From looking at the code it seems like the PATH part of --output is
&lt;br&gt;used, however
&lt;br&gt;&amp;nbsp; madplay --output=alsa:plughw:1 myfile.mp3
&lt;br&gt;chokes as the TYPE alsa does not exist (in audio.c).
&lt;br&gt;&lt;br&gt;Did I miss something in the command line or is this a bug / missing
&lt;br&gt;feature (for which I could provide a patch)?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;-Thomas
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---Dev-f503.html&quot; embed=&quot;fixTarget[503]&quot; target=&quot;_top&quot; &gt;Mad - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/madplay%3A-How-to-select-a-specific-ALSA-card-tp14695714p14695714.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-14695715</id>
	<title>[mad-dev] madplay: How to select a specific ALSA card</title>
	<published>2008-01-08T10:13:45Z</published>
	<updated>2008-01-08T10:13:45Z</updated>
	<author>
		<name>Thomas Reitmayr-2</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;I just started using madplay a short while ago and I was wondering
&lt;br&gt;whether it is possible to select an ALSA card different from the default
&lt;br&gt;one for audio output.
&lt;br&gt;&amp;gt;From looking at the code it seems like the PATH part of --output is
&lt;br&gt;used, however
&lt;br&gt;&amp;nbsp; madplay --output=alsa:plughw:1 myfile.mp3
&lt;br&gt;chokes as the TYPE alsa does not exist (in audio.c).
&lt;br&gt;&lt;br&gt;Did I miss something in the command line or is this a bug / missing
&lt;br&gt;feature (for which I could provide a patch)?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;-Thomas
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---User-f504.html&quot; embed=&quot;fixTarget[504]&quot; target=&quot;_top&quot; &gt;Mad - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-mad-dev--madplay%3A-How-to-select-a-specific-ALSA-card-tp14695715p14695715.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-14605950</id>
	<title>(no subject)</title>
	<published>2008-01-03T13:09:15Z</published>
	<updated>2008-01-03T13:09:15Z</updated>
	<author>
		<name>Jens Lippmann</name>
	</author>
	<content type="html">&lt;font style=&quot;font-family: arial,helvetica,sans-serif;&quot; size=&quot;2&quot;&gt;unsubscribe&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;


&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---User-f504.html&quot; embed=&quot;fixTarget[504]&quot; target=&quot;_top&quot; &gt;Mad - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/%28no-subject%29-tp14605950p14605950.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-14599203</id>
	<title>madplay: How to select a specific ALSA card</title>
	<published>2008-01-03T07:22:21Z</published>
	<updated>2008-01-03T07:22:21Z</updated>
	<author>
		<name>Thomas Reitmayr-2</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;I just started using madplay a short while ago and I was wondering
&lt;br&gt;whether it is possible to select an ALSA card different from the default
&lt;br&gt;one for audio output.
&lt;br&gt;&amp;gt;From looking at the code it seems like the PATH part of --output is
&lt;br&gt;used, however
&lt;br&gt;&amp;nbsp; madplay --output=alsa:plughw:1 myfile.mp3
&lt;br&gt;chokes as the TYPE alsa does not exist (in audio.c).
&lt;br&gt;&lt;br&gt;Did I miss something in the command line or is this a bug / missing
&lt;br&gt;feature (for which I could provide a patch)?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;-Thomas
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---User-f504.html&quot; embed=&quot;fixTarget[504]&quot; target=&quot;_top&quot; &gt;Mad - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/madplay%3A-How-to-select-a-specific-ALSA-card-tp14599203p14599203.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-14234346</id>
	<title>Re: dual-thread libmad</title>
	<published>2007-12-08T16:12:52Z</published>
	<updated>2007-12-08T16:12:52Z</updated>
	<author>
		<name>Steve Spano</name>
	</author>
	<content type="html">Hi John
&lt;br&gt;&lt;br&gt;Thanks for the reply.
&lt;br&gt;&lt;br&gt;I actually don't want any mixing at all. I want MP3(A) to be played on
&lt;br&gt;channel A and MP3(B) to be played on channel B. Something is occurring,
&lt;br&gt;which appears to be towards the output stage of my libmad, that is
&lt;br&gt;causing the A and B samples to mix together. So I am looking for some
&lt;br&gt;global buffer that is being using by both A and B or something like that
&lt;br&gt;which the RTOS is mixing between both threads.
&lt;br&gt;&lt;br&gt;Steve Spano, President
&lt;br&gt;Finger Lakes Engineering
&lt;br&gt;&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: john cooper [mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=14234346&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;john.cooper@...&lt;/a&gt;] 
&lt;br&gt;Sent: Saturday, December 08, 2007 9:04 AM
&lt;br&gt;To: Steve Spano
&lt;br&gt;Cc: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=14234346&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mad-user@...&lt;/a&gt;
&lt;br&gt;Subject: Re: [mad-user] dual-thread libmad
&lt;br&gt;&lt;br&gt;Steve Spano wrote:
&lt;br&gt;&amp;gt; Hi John,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks for the reply.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I did more tracking into this, the mad_decoder_buffer creates the
&lt;br&gt;&amp;gt; instances on the frame/stream/sync data. I already created two
&lt;br&gt;instances
&lt;br&gt;&amp;gt; of the mad_decoder_buffer so I could link them to each RTOS thread.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It looks like the samples are getting mixed up at the output stage. It
&lt;br&gt;&amp;gt; turns out that one of the MP3s playing is a 1-channel and the other
&lt;br&gt;MP3
&lt;br&gt;&amp;gt; is a 2-channel. Any thoughts perhaps on how mixing of sample data,
&lt;br&gt;&amp;gt; between RTOS tasks, could occur on the output stages? 
&lt;br&gt;&lt;br&gt;You'll need to make output the data rates agree potentially
&lt;br&gt;converting one to the other. &amp;nbsp;And you will need to
&lt;br&gt;synchronize and mix the two streams before they hit the
&lt;br&gt;audio device. &amp;nbsp;This should be relatively straightforward
&lt;br&gt;but you may need to scale the data to avoid clipping during
&lt;br&gt;the mix operation.
&lt;br&gt;&lt;br&gt;-john
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I figured this part out, that it is occurring at the output stage,
&lt;br&gt;&amp;gt; Friday ~ 5pm. I have to look at it some more.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Steve Spano, President
&lt;br&gt;&amp;gt; Finger Lakes Engineering
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: john cooper [mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=14234346&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;john.cooper@...&lt;/a&gt;] 
&lt;br&gt;&amp;gt; Sent: Friday, December 07, 2007 10:09 AM
&lt;br&gt;&amp;gt; To: Steve Spano
&lt;br&gt;&amp;gt; Cc: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=14234346&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mad-user@...&lt;/a&gt;; john cooper
&lt;br&gt;&amp;gt; Subject: Re: [mad-user] dual-thread libmad
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Steve Spano wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; I have a simple RTOS which has two threads. Each thread starts lib
&lt;/div&gt;mad
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; with a dedicated mad_decoder buffer for each thread. I am now able to
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;read&amp;quot; data correcting into the decoders (i.e. I don't see decoding 
&lt;br&gt;&amp;gt;&amp;gt; errors streaming everywhere on the debug trace) but the output audio
&lt;br&gt;&amp;gt; is 
&lt;br&gt;&amp;gt;&amp;gt; mixed up. Meaning that the audio from the two threads is being mixed 
&lt;br&gt;&amp;gt;&amp;gt; (actually shuffled) during playback.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It is built into the API. &amp;nbsp;You'll need to keep separate
&lt;br&gt;&amp;gt; frame/stream/synth data structures for each instance of
&lt;br&gt;&amp;gt; a decode operation. &amp;nbsp;Sounds like you are rendering to the
&lt;br&gt;&amp;gt; same set of structures multiplexed by the task scheduler.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -john
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=14234346&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;john.cooper@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---User-f504.html&quot; embed=&quot;fixTarget[504]&quot; target=&quot;_top&quot; &gt;Mad - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/dual-thread-libmad-tp14212850p14234346.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-14228762</id>
	<title>Re: dual-thread libmad</title>
	<published>2007-12-08T06:04:13Z</published>
	<updated>2007-12-08T06:04:13Z</updated>
	<author>
		<name>john cooper-4</name>
	</author>
	<content type="html">Steve Spano wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi John,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks for the reply.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I did more tracking into this, the mad_decoder_buffer creates the
&lt;br&gt;&amp;gt; instances on the frame/stream/sync data. I already created two instances
&lt;br&gt;&amp;gt; of the mad_decoder_buffer so I could link them to each RTOS thread.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It looks like the samples are getting mixed up at the output stage. It
&lt;br&gt;&amp;gt; turns out that one of the MP3s playing is a 1-channel and the other MP3
&lt;br&gt;&amp;gt; is a 2-channel. Any thoughts perhaps on how mixing of sample data,
&lt;br&gt;&amp;gt; between RTOS tasks, could occur on the output stages? 
&lt;/div&gt;&lt;br&gt;You'll need to make output the data rates agree potentially
&lt;br&gt;converting one to the other. &amp;nbsp;And you will need to
&lt;br&gt;synchronize and mix the two streams before they hit the
&lt;br&gt;audio device. &amp;nbsp;This should be relatively straightforward
&lt;br&gt;but you may need to scale the data to avoid clipping during
&lt;br&gt;the mix operation.
&lt;br&gt;&lt;br&gt;-john
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I figured this part out, that it is occurring at the output stage,
&lt;br&gt;&amp;gt; Friday ~ 5pm. I have to look at it some more.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Steve Spano, President
&lt;br&gt;&amp;gt; Finger Lakes Engineering
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: john cooper [mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=14228762&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;john.cooper@...&lt;/a&gt;] 
&lt;br&gt;&amp;gt; Sent: Friday, December 07, 2007 10:09 AM
&lt;br&gt;&amp;gt; To: Steve Spano
&lt;br&gt;&amp;gt; Cc: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=14228762&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mad-user@...&lt;/a&gt;; john cooper
&lt;br&gt;&amp;gt; Subject: Re: [mad-user] dual-thread libmad
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Steve Spano wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; I have a simple RTOS which has two threads. Each thread starts lib mad
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; with a dedicated mad_decoder buffer for each thread. I am now able to 
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;read&amp;quot; data correcting into the decoders (i.e. I don't see decoding 
&lt;br&gt;&amp;gt;&amp;gt; errors streaming everywhere on the debug trace) but the output audio
&lt;br&gt;&amp;gt; is 
&lt;br&gt;&amp;gt;&amp;gt; mixed up. Meaning that the audio from the two threads is being mixed 
&lt;br&gt;&amp;gt;&amp;gt; (actually shuffled) during playback.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It is built into the API. &amp;nbsp;You'll need to keep separate
&lt;br&gt;&amp;gt; frame/stream/synth data structures for each instance of
&lt;br&gt;&amp;gt; a decode operation. &amp;nbsp;Sounds like you are rendering to the
&lt;br&gt;&amp;gt; same set of structures multiplexed by the task scheduler.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -john
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=14228762&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;john.cooper@...&lt;/a&gt;
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---User-f504.html&quot; embed=&quot;fixTarget[504]&quot; target=&quot;_top&quot; &gt;Mad - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/dual-thread-libmad-tp14212850p14228762.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-14225127</id>
	<title>Re: dual-thread libmad</title>
	<published>2007-12-07T19:23:23Z</published>
	<updated>2007-12-07T19:23:23Z</updated>
	<author>
		<name>Steve Spano</name>
	</author>
	<content type="html">Hi John,
&lt;br&gt;&lt;br&gt;Thanks for the reply.
&lt;br&gt;&lt;br&gt;I did more tracking into this, the mad_decoder_buffer creates the
&lt;br&gt;instances on the frame/stream/sync data. I already created two instances
&lt;br&gt;of the mad_decoder_buffer so I could link them to each RTOS thread.
&lt;br&gt;&lt;br&gt;It looks like the samples are getting mixed up at the output stage. It
&lt;br&gt;turns out that one of the MP3s playing is a 1-channel and the other MP3
&lt;br&gt;is a 2-channel. Any thoughts perhaps on how mixing of sample data,
&lt;br&gt;between RTOS tasks, could occur on the output stages? 
&lt;br&gt;&lt;br&gt;I figured this part out, that it is occurring at the output stage,
&lt;br&gt;Friday ~ 5pm. I have to look at it some more.
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;&lt;br&gt;Steve Spano, President
&lt;br&gt;Finger Lakes Engineering
&lt;br&gt;&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: john cooper [mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=14225127&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;john.cooper@...&lt;/a&gt;] 
&lt;br&gt;Sent: Friday, December 07, 2007 10:09 AM
&lt;br&gt;To: Steve Spano
&lt;br&gt;Cc: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=14225127&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mad-user@...&lt;/a&gt;; john cooper
&lt;br&gt;Subject: Re: [mad-user] dual-thread libmad
&lt;br&gt;&lt;br&gt;Steve Spano wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; I have a simple RTOS which has two threads. Each thread starts lib mad
&lt;br&gt;&lt;br&gt;&amp;gt; with a dedicated mad_decoder buffer for each thread. I am now able to 
&lt;br&gt;&amp;gt; &amp;quot;read&amp;quot; data correcting into the decoders (i.e. I don't see decoding 
&lt;br&gt;&amp;gt; errors streaming everywhere on the debug trace) but the output audio
&lt;br&gt;is 
&lt;br&gt;&amp;gt; mixed up. Meaning that the audio from the two threads is being mixed 
&lt;br&gt;&amp;gt; (actually shuffled) during playback.
&lt;br&gt;&lt;br&gt;It is built into the API. &amp;nbsp;You'll need to keep separate
&lt;br&gt;frame/stream/synth data structures for each instance of
&lt;br&gt;a decode operation. &amp;nbsp;Sounds like you are rendering to the
&lt;br&gt;same set of structures multiplexed by the task scheduler.
&lt;br&gt;&lt;br&gt;-john
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=14225127&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;john.cooper@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---User-f504.html&quot; embed=&quot;fixTarget[504]&quot; target=&quot;_top&quot; &gt;Mad - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/dual-thread-libmad-tp14212850p14225127.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-14214955</id>
	<title>Re: dual-thread libmad</title>
	<published>2007-12-07T07:09:24Z</published>
	<updated>2007-12-07T07:09:24Z</updated>
	<author>
		<name>john cooper-4</name>
	</author>
	<content type="html">Steve Spano wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; I have a simple RTOS which has two threads. Each thread starts lib mad 
&lt;br&gt;&amp;gt; with a dedicated mad_decoder buffer for each thread. I am now able to 
&lt;br&gt;&amp;gt; “read” data correcting into the decoders (i.e. I don’t see decoding 
&lt;br&gt;&amp;gt; errors streaming everywhere on the debug trace) but the output audio is 
&lt;br&gt;&amp;gt; mixed up. Meaning that the audio from the two threads is being mixed 
&lt;br&gt;&amp;gt; (actually shuffled) during playback.
&lt;br&gt;&lt;br&gt;It is built into the API. &amp;nbsp;You'll need to keep separate
&lt;br&gt;frame/stream/synth data structures for each instance of
&lt;br&gt;a decode operation. &amp;nbsp;Sounds like you are rendering to the
&lt;br&gt;same set of structures multiplexed by the task scheduler.
&lt;br&gt;&lt;br&gt;-john
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=14214955&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;john.cooper@...&lt;/a&gt;
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---User-f504.html&quot; embed=&quot;fixTarget[504]&quot; target=&quot;_top&quot; &gt;Mad - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/dual-thread-libmad-tp14212850p14214955.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-14212850</id>
	<title>dual-thread libmad</title>
	<published>2007-12-07T05:07:05Z</published>
	<updated>2007-12-07T05:07:05Z</updated>
	<author>
		<name>Steve Spano</name>
	</author>
	<content type="html">&lt;html&gt;

&lt;head&gt;
&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=us-ascii&quot;&gt;


&lt;meta name=Generator content=&quot;Microsoft Word 10 (filtered)&quot;&gt;



&lt;/head&gt;

&lt;body lang=EN-US link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;I have made a lot of progress working with libmad and trying
to get two instances running.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;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 &amp;#8220;read&amp;#8221; data correcting into the decoders (i.e. I
don&amp;#8217;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.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;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?&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:
10.0pt;font-family:Arial;color:navy'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:
10.0pt;font-family:Arial;color:navy'&gt;Thanks&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:
10.0pt;font-family:Arial;color:navy'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoAutoSig&gt;&lt;font size=3 color=navy face=&quot;Times New Roman&quot;&gt;&lt;span style='font-size:12.0pt;color:navy'&gt;Steve Spano&lt;/span&gt;&lt;/font&gt;&lt;font color=navy&gt;&lt;span style='color:navy'&gt;, President&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoAutoSig&gt;&lt;font size=3 color=navy face=&quot;Times New Roman&quot;&gt;&lt;span style='font-size:12.0pt;color:navy'&gt;Finger Lakes&lt;/span&gt;&lt;/font&gt;&lt;font color=navy&gt;&lt;span style='color:navy'&gt; Engineering&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=3 face=&quot;Times New Roman&quot;&gt;&lt;span style='font-size:
12.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---User-f504.html&quot; embed=&quot;fixTarget[504]&quot; target=&quot;_top&quot; &gt;Mad - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/dual-thread-libmad-tp14212850p14212850.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-12918198</id>
	<title>Re: memory leaking in mad_layer_III?</title>
	<published>2007-09-27T03:50:40Z</published>
	<updated>2007-09-27T03:50:40Z</updated>
	<author>
		<name>Niels Roosen</name>
	</author>
	<content type="html">Rob Leslie wrote:
&lt;br&gt;&amp;gt; On Sep 26, 2007, at 2:55 PM, Niels Roosen wrote:
&lt;br&gt;&amp;gt;&amp;gt; I will post the relevant code tomorrow, should I do that as attachment
&lt;br&gt;&amp;gt;&amp;gt; or inline?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Either is fine unless it's long, in which case attachment is probably
&lt;br&gt;&amp;gt; preferred.
&lt;br&gt;&lt;br&gt;You're not going to believe this, but I seem to have solved the problem.
&lt;br&gt;&amp;nbsp;While scrutinizing the relevant code for posting I discovered a rather
&lt;br&gt;odd construct in my code (don't know why I didn't see that before) and
&lt;br&gt;after some more investigation I discovered that I was lying earlier. In
&lt;br&gt;the initialization function (which is also responsible for calling the
&lt;br&gt;mad_*_finish() functions if necessary) the condition for actually
&lt;br&gt;calling the cleanup functions was not working at all! This was because I
&lt;br&gt;mixed up something during development and clearly never tested this
&lt;br&gt;properly. So I fixed that and didn't get -any- references to lost memory
&lt;br&gt;in libmad anymore \o/.
&lt;br&gt;&lt;br&gt;Anyway, to summarize: yet another case of tunnel vision, so you try to
&lt;br&gt;explain your problem to someone else and during that process find out
&lt;br&gt;what is going wrong. So thanks nevertheless, I guess I needed this :-)
&lt;br&gt;&lt;br&gt;So I humbly apologize for being such a retard. Nevertheless, mad rocks
&lt;br&gt;my socks, it is fast and reliable unlike the mpg123 decoder which often
&lt;br&gt;fails to synchronize frames, miserably failing to decode an entire
&lt;br&gt;stream... :-)
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;Niels
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&amp;quot;One of the most frightening things about your true nerd, for many
&lt;br&gt;people, is not that he's socially inept - because everybody's been there
&lt;br&gt;- but rather his complete lack of embarrassment about it.&amp;quot; - Randy
&lt;br&gt;Waterhouse in Cryptonomicon
&lt;br&gt;&lt;br&gt;n: Arnie / Arnicus &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | e: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=12918198&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;niels@...&lt;/a&gt;
&lt;br&gt;w: &lt;a href=&quot;http://okkernoot.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://okkernoot.net/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;|
&lt;br&gt;irc: irc.okkernoot.net #geek | icq: 31817478
&lt;br&gt;aim: arniea a arniea &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | msn: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=12918198&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;arnie@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://jungletrain.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://jungletrain.net/&lt;/a&gt;&amp;nbsp;- 24/7 Drum and Bass Internet Radio
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---Dev-f503.html&quot; embed=&quot;fixTarget[503]&quot; target=&quot;_top&quot; &gt;Mad - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/memory-leaking-in-mad_layer_III--tp12898410p12918198.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-12911698</id>
	<title>Re: memory leaking in mad_layer_III?</title>
	<published>2007-09-26T16:53:11Z</published>
	<updated>2007-09-26T16:53:11Z</updated>
	<author>
		<name>Rob Leslie</name>
	</author>
	<content type="html">On Sep 26, 2007, at 2:55 PM, Niels Roosen wrote:
&lt;br&gt;&amp;gt; I will post the relevant code tomorrow, should I do that as &amp;nbsp;
&lt;br&gt;&amp;gt; attachment or inline?
&lt;br&gt;&lt;br&gt;Either is fine unless it's long, in which case attachment is probably &amp;nbsp;
&lt;br&gt;preferred.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Rob Leslie
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=12911698&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rob@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---Dev-f503.html&quot; embed=&quot;fixTarget[503]&quot; target=&quot;_top&quot; &gt;Mad - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/memory-leaking-in-mad_layer_III--tp12898410p12911698.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-12910886</id>
	<title>Re: memory leaking in mad_layer_III?</title>
	<published>2007-09-26T15:55:04Z</published>
	<updated>2007-09-26T15:55:04Z</updated>
	<author>
		<name>Niels Roosen</name>
	</author>
	<content type="html">Rob Leslie wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Sep 26, 2007, at 3:40 AM, Niels Roosen wrote:
&lt;br&gt;&amp;gt;&amp;gt; Am I missing something or could it be that using mad this way hasn't
&lt;br&gt;&amp;gt;&amp;gt; been tested excessively enough and is it true that the memory
&lt;br&gt;&amp;gt;&amp;gt; alllocated in mad_layer_III() on lines 2530 and 2538 (libmad version
&lt;br&gt;&amp;gt;&amp;gt; 0.15.1b) is not freed properly? I would be delighted to either get
&lt;br&gt;&amp;gt;&amp;gt; confirmation on this or some advice on how to solve this issue.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The memory allocated in mad_layer_III() is freed in mad_frame_finish()
&lt;br&gt;&amp;gt; and mad_stream_finish(); you should make sure these are definitely being
&lt;br&gt;&amp;gt; called on the same structures you pass to mad_frame_decode().
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Since you say you are making these calls, I'm at a loss to offer any
&lt;br&gt;&amp;gt; specific advice without seeing your code.
&lt;/div&gt;&lt;br&gt;What I do is initialize the decoder, decode incoming data per frame
&lt;br&gt;until the client disconnects, and then, when another client connects,
&lt;br&gt;run the mad_stream_finish() and mad_frame_finish() on the pointers to
&lt;br&gt;the relevant structures before running the initialization functions
&lt;br&gt;again, in order to clean up any remaining data in the decoder. I took
&lt;br&gt;this from some example code but unfortunately don't know what any more,
&lt;br&gt;but I suppose that is how it should be done.
&lt;br&gt;&lt;br&gt;I will post the relevant code tomorrow, should I do that as attachment
&lt;br&gt;or inline?
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;Niels
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&amp;quot;One of the most frightening things about your true nerd, for many
&lt;br&gt;people, is not that he's socially inept - because everybody's been there
&lt;br&gt;- but rather his complete lack of embarrassment about it.&amp;quot; - Randy
&lt;br&gt;Waterhouse in Cryptonomicon
&lt;br&gt;&lt;br&gt;n: Arnie / Arnicus &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | e: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=12910886&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;niels@...&lt;/a&gt;
&lt;br&gt;w: &lt;a href=&quot;http://okkernoot.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://okkernoot.net/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;|
&lt;br&gt;irc: irc.okkernoot.net #geek | icq: 31817478
&lt;br&gt;aim: arniea a arniea &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | msn: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=12910886&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;arnie@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://jungletrain.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://jungletrain.net/&lt;/a&gt;&amp;nbsp;- 24/7 Drum and Bass Internet Radio
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---Dev-f503.html&quot; embed=&quot;fixTarget[503]&quot; target=&quot;_top&quot; &gt;Mad - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/memory-leaking-in-mad_layer_III--tp12898410p12910886.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-12904510</id>
	<title>Re: memory leaking in mad_layer_III?</title>
	<published>2007-09-26T10:03:51Z</published>
	<updated>2007-09-26T10:03:51Z</updated>
	<author>
		<name>Rob Leslie</name>
	</author>
	<content type="html">On Sep 26, 2007, at 3:40 AM, Niels Roosen wrote:
&lt;br&gt;&amp;gt; Am I missing something or could it be that using mad this way &amp;nbsp;
&lt;br&gt;&amp;gt; hasn't been tested excessively enough and is it true that the &amp;nbsp;
&lt;br&gt;&amp;gt; memory alllocated in mad_layer_III() on lines 2530 and 2538 (libmad &amp;nbsp;
&lt;br&gt;&amp;gt; version 0.15.1b) is not freed properly? I would be delighted to &amp;nbsp;
&lt;br&gt;&amp;gt; either get confirmation on this or some advice on how to solve this &amp;nbsp;
&lt;br&gt;&amp;gt; issue.
&lt;br&gt;&lt;br&gt;The memory allocated in mad_layer_III() is freed in mad_frame_finish 
&lt;br&gt;() and mad_stream_finish(); you should make sure these are definitely &amp;nbsp;
&lt;br&gt;being called on the same structures you pass to mad_frame_decode().
&lt;br&gt;&lt;br&gt;Since you say you are making these calls, I'm at a loss to offer any &amp;nbsp;
&lt;br&gt;specific advice without seeing your code.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Rob Leslie
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=12904510&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rob@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---Dev-f503.html&quot; embed=&quot;fixTarget[503]&quot; target=&quot;_top&quot; &gt;Mad - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/memory-leaking-in-mad_layer_III--tp12898410p12904510.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-12898410</id>
	<title>memory leaking in mad_layer_III?</title>
	<published>2007-09-26T04:40:27Z</published>
	<updated>2007-09-26T04:40:27Z</updated>
	<author>
		<name>Niels Roosen</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;In the past while I have been rounding up development for a streaming
&lt;br&gt;server for the radio station I am part of. However, during the last
&lt;br&gt;stress testing phase I noticed that memory usage slowly increases as
&lt;br&gt;streaming clients disconnect and connect. At first I was convinced it
&lt;br&gt;was some leak in my own code but valgrind didn't confirm that this was
&lt;br&gt;happening. However, I noticed that there was quite some lost memory
&lt;br&gt;originating in the mad_layer_III() function in layer3.c:
&lt;br&gt;&lt;br&gt;==5957== 7,701 bytes in 3 blocks are definitely lost in loss record 68 of 85
&lt;br&gt;==5957== &amp;nbsp; &amp;nbsp;at 0x481B72C: malloc (in
&lt;br&gt;/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
&lt;br&gt;==5957== &amp;nbsp; &amp;nbsp;by 0x485F1C1: mad_layer_III (in /usr/lib/libmad.so.0.2.1)
&lt;br&gt;==5957== &amp;nbsp; &amp;nbsp;by 0x485429A: mad_frame_decode (in /usr/lib/libmad.so.0.2.1)
&lt;br&gt;==5957== &amp;nbsp; &amp;nbsp;by 0x7775: decode_data (server.c:318)
&lt;br&gt;==5957== &amp;nbsp; &amp;nbsp;by 0x9387: server (server.c:980)
&lt;br&gt;==5957== &amp;nbsp; &amp;nbsp;by 0x4874164: pthread_start_thread (in /lib/libpthread-0.10.so)
&lt;br&gt;==5957== &amp;nbsp; &amp;nbsp;by 0x4A176E9: clone (in /lib/libc-2.3.6.so)
&lt;br&gt;&lt;br&gt;==5957== 13,824 bytes in 3 blocks are definitely lost in loss record 71
&lt;br&gt;of 85
&lt;br&gt;==5957== &amp;nbsp; &amp;nbsp;at 0x481CE9E: calloc (in
&lt;br&gt;/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
&lt;br&gt;==5957== &amp;nbsp; &amp;nbsp;by 0x485F215: mad_layer_III (in /usr/lib/libmad.so.0.2.1)
&lt;br&gt;==5957== &amp;nbsp; &amp;nbsp;by 0x485429A: mad_frame_decode (in /usr/lib/libmad.so.0.2.1)
&lt;br&gt;==5957== &amp;nbsp; &amp;nbsp;by 0x7775: decode_data (server.c:318)
&lt;br&gt;==5957== &amp;nbsp; &amp;nbsp;by 0x9387: server (server.c:980)
&lt;br&gt;==5957== &amp;nbsp; &amp;nbsp;by 0x4874164: pthread_start_thread (in /lib/libpthread-0.10.so)
&lt;br&gt;==5957== &amp;nbsp; &amp;nbsp;by 0x4A176E9: clone (in /lib/libc-2.3.6.so)
&lt;br&gt;&lt;br&gt;One would assume this is just caused by memory not being free()'d up
&lt;br&gt;when the program exits, but the longer the server has run, the more
&lt;br&gt;memory was definitely lost, indicating that the memory loss originates here.
&lt;br&gt;&lt;br&gt;I use the mad library in such a way that I manually line up data and
&lt;br&gt;decode this data per frame, which is required to ensure certain
&lt;br&gt;functionality of the streaming server. I made sure that when I
&lt;br&gt;reinitialize the decoder every time I run the mad_*_finish() operations
&lt;br&gt;on all the structs I use before running mad_*_init() again. However, I
&lt;br&gt;suspect that not all allocated memory is freed as it should.
&lt;br&gt;&lt;br&gt;Am I missing something or could it be that using mad this way hasn't
&lt;br&gt;been tested excessively enough and is it true that the memory alllocated
&lt;br&gt;in mad_layer_III() on lines 2530 and 2538 (libmad version 0.15.1b) is
&lt;br&gt;not freed properly? I would be delighted to either get confirmation on
&lt;br&gt;this or some advice on how to solve this issue. If more information is
&lt;br&gt;required I will do my best to provide this.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;Niels Roosen
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&amp;quot;One of the most frightening things about your true nerd, for many
&lt;br&gt;people, is not that he's socially inept - because everybody's been there
&lt;br&gt;- but rather his complete lack of embarrassment about it.&amp;quot; - Randy
&lt;br&gt;Waterhouse in Cryptonomicon
&lt;br&gt;&lt;br&gt;n: Arnie / Arnicus &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | e: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=12898410&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;niels@...&lt;/a&gt;
&lt;br&gt;w: &lt;a href=&quot;http://okkernoot.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://okkernoot.net/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;|
&lt;br&gt;irc: irc.okkernoot.net #geek | icq: 31817478
&lt;br&gt;aim: arniea a arniea &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | msn: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=12898410&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;arnie@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://jungletrain.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://jungletrain.net/&lt;/a&gt;&amp;nbsp;- 24/7 Drum and Bass Internet Radio
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---Dev-f503.html&quot; embed=&quot;fixTarget[503]&quot; target=&quot;_top&quot; &gt;Mad - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/memory-leaking-in-mad_layer_III--tp12898410p12898410.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-12560343</id>
	<title>Re: mad decoder sample rates</title>
	<published>2007-09-07T11:39:04Z</published>
	<updated>2007-09-07T11:39:04Z</updated>
	<author>
		<name>Steve Spano</name>
	</author>
	<content type="html">Hi Rob,
&lt;br&gt;&lt;br&gt;Great - thanks! I see the call, something like set sample rate. It just
&lt;br&gt;goes to a debug trace and I see it decoding a file at 22050. So we will
&lt;br&gt;hook that into the silicon oscillator setup.
&lt;br&gt;&lt;br&gt;We are also going to run MAD on the Xilinx Microblaze later this month
&lt;br&gt;as well.
&lt;br&gt;&lt;br&gt;I have another issue with compiling with the FPM_ARM; but I am working
&lt;br&gt;on resolving that. Right now I am using FPM_DEFAULT.
&lt;br&gt;&lt;br&gt;So I may ask a few other questions. For the STR912 implementation, we
&lt;br&gt;actually want to run two instances of MAD, in mono mode, and then have
&lt;br&gt;one MP3 goto the left channel and the other the right; assuming the
&lt;br&gt;sample rates match.
&lt;br&gt;&lt;br&gt;It doesn't look like MAD performs on the fly resampling; which is fine.
&lt;br&gt;We may add it later.
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;&lt;br&gt;Steve Spano
&lt;br&gt;FLE
&lt;br&gt;&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=12560343&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mad-user-bounces@...&lt;/a&gt;
&lt;br&gt;[mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=12560343&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mad-user-bounces@...&lt;/a&gt;] On Behalf Of Rob Leslie
&lt;br&gt;Sent: Friday, September 07, 2007 1:14 PM
&lt;br&gt;To: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=12560343&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mad-user@...&lt;/a&gt;
&lt;br&gt;Subject: Re: [mad-user] mad decoder sample rates
&lt;br&gt;&lt;br&gt;On Sep 7, 2007, at 9:57 AM, Steve Spano wrote:
&lt;br&gt;&amp;gt; I want to be able to run 8Khz to 48KHz MP3s. Is there anything in &amp;nbsp;
&lt;br&gt;&amp;gt; the mad decoder that would prevent decoding MP3s within this range? &amp;nbsp;
&lt;br&gt;&amp;gt; We don't have a sample issue with our hardware since we can set any &amp;nbsp;
&lt;br&gt;&amp;gt; sample rate we want.
&lt;br&gt;&lt;br&gt;MAD supports all MPEG audio sampling frequencies, namely &amp;nbsp;
&lt;br&gt;8000/11025/12000 (MPEG 2.5), 16000/22050/24000 (MPEG-2 LSF), and &amp;nbsp;
&lt;br&gt;32000/44100/48000 (MPEG-1) Hz.
&lt;br&gt;&lt;br&gt;Keep in mind the bitstream determines the sample rate you get from &amp;nbsp;
&lt;br&gt;MAD. If you want to output PCM at some other rate, you'll have to &amp;nbsp;
&lt;br&gt;resample it first.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Rob Leslie
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=12560343&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rob@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---User-f504.html&quot; embed=&quot;fixTarget[504]&quot; target=&quot;_top&quot; &gt;Mad - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/mad-decoder-sample-rates-tp12559891p12560343.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-12560010</id>
	<title>Re: mad decoder sample rates</title>
	<published>2007-09-07T11:14:19Z</published>
	<updated>2007-09-07T11:14:19Z</updated>
	<author>
		<name>Rob Leslie</name>
	</author>
	<content type="html">On Sep 7, 2007, at 9:57 AM, Steve Spano wrote:
&lt;br&gt;&amp;gt; I want to be able to run 8Khz to 48KHz MP3s. Is there anything in &amp;nbsp;
&lt;br&gt;&amp;gt; the mad decoder that would prevent decoding MP3s within this range? &amp;nbsp;
&lt;br&gt;&amp;gt; We don’t have a sample issue with our hardware since we can set any &amp;nbsp;
&lt;br&gt;&amp;gt; sample rate we want.
&lt;br&gt;&lt;br&gt;MAD supports all MPEG audio sampling frequencies, namely &amp;nbsp;
&lt;br&gt;8000/11025/12000 (MPEG 2.5), 16000/22050/24000 (MPEG-2 LSF), and &amp;nbsp;
&lt;br&gt;32000/44100/48000 (MPEG-1) Hz.
&lt;br&gt;&lt;br&gt;Keep in mind the bitstream determines the sample rate you get from &amp;nbsp;
&lt;br&gt;MAD. If you want to output PCM at some other rate, you'll have to &amp;nbsp;
&lt;br&gt;resample it first.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Rob Leslie
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=12560010&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rob@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---User-f504.html&quot; embed=&quot;fixTarget[504]&quot; target=&quot;_top&quot; &gt;Mad - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/mad-decoder-sample-rates-tp12559891p12560010.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-12559891</id>
	<title>mad decoder sample rates</title>
	<published>2007-09-07T10:57:04Z</published>
	<updated>2007-09-07T10:57:04Z</updated>
	<author>
		<name>Steve Spano</name>
	</author>
	<content type="html">&lt;html&gt;

&lt;head&gt;
&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=us-ascii&quot;&gt;


&lt;meta name=Generator content=&quot;Microsoft Word 10 (filtered)&quot;&gt;



&lt;/head&gt;

&lt;body lang=EN-US link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;Hi Folks,&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;We have the mad library running on the new STR912 processor;
96MHz ARM9 core.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;We are using a small CPLD to bridge between the SSP serial
port and a CS4431 stereo dac.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;We have an I2C silicon oscillator being used so we can set
any sample rate we want. Currently, its working at 22.05KHz. We haven&amp;#8217;t change
the sample rate yet.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;I want to be able to run 8Khz to 48KHz MP3s. Is there
anything in the mad decoder that would prevent decoding MP3s within this range?
We don&amp;#8217;t have a sample issue with our hardware since we can set any
sample rate we want.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;Thanks&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='margin-left:.5in'&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial'&gt;Steve Spano&lt;/span&gt;&lt;/font&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial'&gt;, President&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='margin-left:.5in'&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial'&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=12559891&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;steve@...&lt;/a&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='margin-left:.5in'&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial'&gt;Finger Lakes&lt;/span&gt;&lt;/font&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial'&gt; Engineering&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='margin-left:.5in'&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial'&gt;607-277-1614 x223&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='margin-left:.5in'&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial'&gt;&lt;a href=&quot;http://www.fl-eng.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;www.fl-eng.com&lt;/a&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='margin-left:.5in'&gt;&lt;font size=3 face=&quot;Times New Roman&quot;&gt;&lt;span style='font-size:12.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=3 face=&quot;Times New Roman&quot;&gt;&lt;span style='font-size:
12.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---User-f504.html&quot; embed=&quot;fixTarget[504]&quot; target=&quot;_top&quot; &gt;Mad - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/mad-decoder-sample-rates-tp12559891p12559891.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-12552330</id>
	<title>Re: Calculation error</title>
	<published>2007-09-07T03:33:33Z</published>
	<updated>2007-09-07T03:33:33Z</updated>
	<author>
		<name>Harri Haataja-2</name>
	</author>
	<content type="html">On Fri, Aug 24, 2007 at 12:16:12PM +0200, Tim Dylla wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; I did some testing on my own implementation of mp3, and used MAD as 
&lt;br&gt;&amp;gt; reference.
&lt;br&gt;&amp;gt; Therefore I generated a sine-sweep from 0Hz to 22kHz ( as far as this is 
&lt;br&gt;&amp;gt; possible ;) ) at 0dBFS, and 48kHz Samplerate. Then I encoded it with 
&lt;br&gt;&amp;gt; Lame for a single Channel MPEG-1 Layer III Bitstream, 48kHz Samplerate, 
&lt;br&gt;&amp;gt; 320kbps Bitrate. (I don't know the exact Lame-version and optionstring 
&lt;br&gt;&amp;gt; anymore, but I didn't use anything weird)
&lt;br&gt;&lt;br&gt;&amp;gt; I'm not a friend of posting large files on a mailing list without any 
&lt;br&gt;&amp;gt; agreement with the moderator, so if someone is interested in the 
&lt;br&gt;&amp;gt; bitstream and the resulting raw file, pleas feel free to send me a message.
&lt;br&gt;&lt;br&gt;Could the generation be done with common software? (sox? clm? nyqvist?)
&lt;br&gt;That could make a sort of full automatic test system if scripted.
&lt;br&gt;&lt;br&gt;Also, a file like that might find a home on Wikimedia or Internet Archive.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;To know what you prefer, instead of humbly saying Amen
&lt;br&gt;to what the world tells you you ought to prefer,
&lt;br&gt;is to have kept your soul alive.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -- Robert Louis Stevenson
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Mad---Dev-f503.html&quot; embed=&quot;fixTarget[503]&quot; target=&quot;_top&quot; &gt;Mad - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Calculation-error-tp12310023p12552330.html" />
</entry>

</feed>
