RE: help:loud noise in the madplay

"Matt Weber" <[email protected]> Thu, 10 Nov 2005 11:53:32 -0800
Newsgroups gmane.comp.audio.mad.devel
Message-ID <[email protected]>
Ah, yes I had that issue as well... output was big endian... using COOL EDIT
you can view little or big endian PCM. If that doesnt work... I had to write
a routine to write out samples the other way around... using fwrite(). SHARC
embedded processors have some quarks with regular C code.... it isnt exactly
"portable" as one might think. Whatever your platform is, my adivce is to
get a HEX viewer that allows you to see exactly what you are writing out to
a file... and compare that output to what you should be getting (maybe make
a windows implementation of minimad to compare to, as I did).  Its a battle
but it makes sense when you can see the data.  Good luck.

Matt

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Nigel Sinfield
Sent: 10-Nov-05 11:35 AM
To: 'Joe Drew'; feiye
Cc: [email protected]
Subject: RE: [mad-dev] help:loud noise in the madplay


When I had this problem it turned out to be an 'endian' issue.  mad output
the samples one way, but the audio hardware required the other.

-----Original Message-----
On Nov 8, 2005, at 1:12 AM, feiye wrote:

>    I have transplant madplay to embedded linux2.4.18. When I play
> the mp3,it has a loud noise in the music.
>     Has anybody met this before? Can anybody help?

I remember problems very much like this when I was first creating
mpg321, and IIRC the problem was a 'signed' issue. Perhaps 'char' is
signed on your platform, and your output needs unsigned?

I do remember the fix not making sense to me. PCM samples can be
negative, I think, but I believe that I had to change to using
unsigned char explicitly.

Hope this helps,

Joe


The contents of this email and any attachments are sent for the personal
attention
of the addressee(s) only and may be confidential.  If you are not the
intended
addressee, any use, disclosure or copying of this email and any attachments
is
unauthorised - please notify the sender by return and delete the message.
Any
representations or commitments expressed in this email are subject to
contract.

ntl Group Limited