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 

libmad and pcm output

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



Joined: 02 Sep 2006
Posts: 2

PostPosted: Sat Sep 02, 2006 1:57 pm    Post subject: libmad and pcm output Reply with quote

Greetings,

I've been getting my feet wet with the psp toolchain and have built some test apps successfully. I'm aiming to build an mp3 player with audio book friendly features. I've been experimenting with libmad and I'm able to successfully load and play some test files.

I'm running into issues though when I try to play my low bitrate (audio book) mp3s. They play too fast. I have seen mention of this before in a couple of other locations, but no definitive answer. Anyhow, this being my first experience with audio encoding/decoding I'm a little confused about something: Can someone tell me if the PCM output from libmad needs to be at a certain bitrate or if it's interpreted by the PSP as a certain khz? Meaning, does the PSP expect the PCM samples to be in some certain format (e.g. at a specific rate or stereo/mono)? Do I need to up or down covert it maybe?

If I'm not phrasing the question correctly please excuse me (and correct) - as I said I'm new to audio programming and the associated terminology.

Thanks!
Back to top
View user's profile Send private message
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Sat Sep 02, 2006 8:01 pm    Post subject: Reply with quote

The PSP can only handle 44100Hz samples, so if your media is a different sampling rate, you'd need to convert it. For 22050Hz simple sample doubling is enough, for other bitrates you'd probably need a better interpolation approach.
_________________
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki

Alexander Berl
Back to top
View user's profile Send private message Visit poster's website
jellybeast



Joined: 02 Sep 2006
Posts: 2

PostPosted: Sun Sep 03, 2006 5:29 am    Post subject: Reply with quote

Raphael wrote:
The PSP can only handle 44100Hz samples,


Thanks! I'm assuming 44100Hz stereo - correct?
Back to top
View user's profile Send private message
siberianstar



Joined: 22 Jun 2006
Posts: 70

PostPosted: Sun Sep 03, 2006 11:39 am    Post subject: Reply with quote

Yes, for mono just give the same sample two times.
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