Trying to Trace Error... need some help

"Matt Weber" <[email protected]> Fri, 29 Jul 2005 16:34:06 -0700
Newsgroups gmane.comp.audio.mad.devel
Message-ID <[email protected]>
Hi all,

Thanks for your previous help Rob and others. So here's my situation. I've
managed to get a working example of minimad going under MSVC6 which decodes
very nicely... I was just doing this so I could have something to compare my
other project to. My other project is a minimad example which I am trying to
port to a SHARC DSP. In any case, after making some minor modification to
the code (replacing some functions in minimad that were unavailable in my
DSP's library's) I found that the output pcm was not correct. (I'm inputting
a simple kHz sine wave and the output looks like a gradually expanding
amplitude sine wave with some randomness..) I have set all the necessary
pre-processor defines for my architecture... ex FPM_DEFAULT for now until I
write my own asm routine.

What I would like to be able to do is see exactly how each individual input
sample is being decoded and stored as pcm   (pcm->samples[]).  My problem is
that I can't see where the code is outputting to the pcm->samples location.
I'm a relatively inexperienced programmer, but would like to think I can
manage to figure things out given time. What I imagine is happening is that
these locations aren't being filled directly, but being passed an address
somehow.

Sorry for this lame question, but I have spent hours stepping through the
code and still cannot see how the pcm->samples are being filled. I believe
the problem that I am having is related to some of the math which is
performed on each sample. Seeing how each sample is being treated and
comparing it with a working example should help me figure out a fix for
this.

If anyone has any tips I would be extremely grateful.

Matt