forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Only 16-bit PCM output can be played?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Gan Quan



Joined: 18 Sep 2006
Posts: 5

PostPosted: Fri Sep 22, 2006 4:51 pm    Post subject: Only 16-bit PCM output can be played? Reply with quote

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.
Back to top
View user's profile Send private message
dot_blank



Joined: 28 Sep 2005
Posts: 498
Location: Brasil

PostPosted: Sat Sep 23, 2006 9:28 am    Post subject: Reply with quote

the psp supports up to 32bit PCM
so you must fill your samples twice
if your using 16bit
_________________
10011011 00101010 11010111 10001001 10111010
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group