I'm working on my mp3 player recently, but I have no experience with audio programming before, so I did a bit of research on available open sourced media players for PSP. After several hours of learning, I started to get some clues, and (with code from here and there) I finished a demo program to play mp3 files. It works very well, but still, there are somethings confused me:
1. My little demo program uses libmad to decode mp3 files, which uses 32-bit integers to represent PCM samples, the PCM samples are rounded to 16-bit shorts before feeded to pspAudioSetChannelCallback() function. I know there are different formats of PCM output, 8-bit, 16-bit, 24-bit, 32-bit, etc... but from the source code I've read so far, every media player on PSP did this conversion, does this mean that PSP can handle only 16-bit PCM output?
2. How much does this conversion would effect on the sound quality of the playback, in spite of the quality of the mp3 file? Currently I'm using a modified version of madplay's audio_linear_dither() [line 237] function to do the conversion.
3. Is pspAudioInit(), pspAudioSetChannelCallback(), ..., the best way to make PSP play music? Or, are there other ways to do so?
Thanks and I'm sorry if I'm asking silly questions.