Discuss the development of new homebrew software, tools and libraries.
Moderators: cheriff , TyRaNiD
Cyborg
Posts: 2 Joined: Mon Jan 18, 2010 6:56 am
Post
by Cyborg » Wed Feb 03, 2010 4:40 am
Im kinda new to this site. I wants to know how can I load my mp3 files so it cycles through each song w/o me going back to type in a individual song at a time?
I just want my program to read my MUSIC folder and play the songs thats in it.
jojojoris
Posts: 255 Joined: Sun Mar 30, 2008 4:06 am
Post
by jojojoris » Wed Feb 03, 2010 7:30 am
You can use the sce(IO)Dopen functions (dunno if the IO part is part of the function names) to get the files in that directory.
There is a MP3 play sample in the SDK.
Code: Select all
int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
}
Cyborg
Posts: 2 Joined: Mon Jan 18, 2010 6:56 am
Post
by Cyborg » Wed Feb 03, 2010 9:55 am
jojojoris wrote: You can use the sce(IO)Dopen functions (dunno if the IO part is part of the function names) to get the files in that directory.
There is a MP3 play sample in the SDK.
Yea I know that.
Code: Select all
int fd = sceIoOpen( ms0:/MUSIC/Closer.mp3, PSP_O_RDONLY, 0777 );
But it doesnt show how to play all of your mp3 songs.
willow :--)
Posts: 107 Joined: Sat Jan 13, 2007 11:50 am
Post
by willow :--) » Wed Feb 03, 2010 11:36 am
Cyborg wrote:
But it doesnt show how to play all of your mp3 songs.
This is a PSP programming site, so all you should need is a sample to play one mp3.
For basic programming tasks such as a recursive loop in a folder, google is your friend...
jimparis
Posts: 1145 Joined: Fri Jun 10, 2005 4:21 am
Location: Boston
Post
by jimparis » Wed Feb 03, 2010 1:16 pm
Cyborg, read more carefully, he said "sceIoDopen" not "sceIoOpen". "Dopen" is how you open a directory to get a list of files inside it.