problems with my sound player software

eduardo
Attachment: player.c (2.16 KB)
I built a sound player to test my micro 2440 sound system.

It works fine on Ubuntu, I speak on mic and then listen recorded buffer on
headphones... but on micro it doesn't work.
I attached the c source code. Can anybody tells me if there's something
wrong?

Where can i find the "mp3 player" and "recorder" source code available on
qtopia applications or any other source code that could help me?


I have 2 other files (recorder.c and playfile.c). Using recorder.c i create
a file with the buffer after reading /dev/dsp.
With playfile.c i read the file created with recorder.c and i can heard
everything, like a music player (using ubuntu). 
When I try to open the same file on micro2440, using the "same executable"
(only difference is the cross compile for arm) i got the same sound, but
much more faster and virtually incomprehensible.
Seems that i have some problem with the play rate, but i don't have any
idea of how to fix that.

Anyone have a tip?

Thanks in advance

skip2816
Hi Eduardo,

its seams to the micro's sound has a problem with low sample rates. I
encountered a similar problem. Try with sample rates 11025 or higher, its
work (for my). For my application I need a sample rate of 8000. So I work
with 16000 and throw away every second sample. 
See http://friendlyarm.net/forum/topic/397?lang=en (no response).
But there is a difference, you use the sound chip on board, i use a sound
chip connected via USB.


skip