PSP Hacks - Forums

Go Back   PSP Hacks - Forums > PSP Community > PSP Programming & Development

Notices

Reply
 
Thread Tools Display Modes
  #21  
Old 07-09-2007, 05:21 AM
pirata nervo pirata nervo is offline
Programmer
PSP Titan
 

Join Date: Mar 2007
Location: www.consoleworld.net
Posts: 5,650
pirata nervo is on a distinguished road
Default

Quote:
Originally Posted by silverfox
its no problem, at first i was pulling hairs at that as well because i didnt take a look at the filebrowser function, but as soon as i got schooled in return values i got it semi running...i used to have it like this

MP3_Load("%s",song_location);

but most functions dont takes extra perameters like that...and the return value is in quotes anyways...
The compiler gives me an error doing that and also im using file_browser.h and when i do what you said:

Code:
1156 music_title = file_browser(NULL);
1157 MP3_Load(music_title);
1158 MP3_Play();
Code:
PirataNervo@PirataNervoPC ~/meus/calculator
$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150   -c -o
main.c: In function 'main':
main.c(1156) : error: incompatible types in assignment
make: *** [main.o] Error 1
__________________
Reply With Quote
  #22  
Old 07-09-2007, 10:58 AM
silverfox silverfox is offline
PSP Hacker
 

Join Date: Nov 2005
Location: the year 2021
Posts: 946
silverfox Has a Beginner Reputation
Default

ok, some problems with that code...theres actually a few more errors than the compiler caught...

1. i dont know the variable you declared, but it needs to be a char POINTER, not just a char like so
Code:
char *location
this being because pointers are flexible in the way they can be accepted as a valid argument to pass through MP3_Load();
2. in the long run, this is how your code should look...
Code:
char *mp3location = filebrowser("ms0:/psp/blah/blah/blah/");
MP3_Load(mp3location);
MP3_Play();
use that and post results
__________________

http://www.psp-hacks.com/file/1126
good programmers know something, then experiment.
Reply With Quote
  #23  
Old 07-09-2007, 11:00 AM
pirata nervo pirata nervo is offline
Programmer
PSP Titan
 

Join Date: Mar 2007
Location: www.consoleworld.net
Posts: 5,650
pirata nervo is on a distinguished road
Default

well youre wrong when you say that NULL will do that.
NULL will be like this:
ms0:/PSP/GAME/

EDIT: I forgot to say thanks.
EDIT EDIT: and its ms0:/psp not ms0:psp but i think you know that this just for people that dont know and see that.
__________________
Reply With Quote
  #24  
Old 07-09-2007, 11:09 AM
silverfox silverfox is offline
PSP Hacker
 

Join Date: Nov 2005
Location: the year 2021
Posts: 946
silverfox Has a Beginner Reputation
Default

oop sorry thats true, i'll edit the post, well, did it work or what??? i just want to know, cuz i had that problem and dropped it because it didnt have the time, and i wanted to write my own file browser.... im just curious is all
__________________

http://www.psp-hacks.com/file/1126
good programmers know something, then experiment.
Reply With Quote
  #25  
Old 07-09-2007, 11:31 AM
pirata nervo pirata nervo is offline
Programmer
PSP Titan
 

Join Date: Mar 2007
Location: www.consoleworld.net
Posts: 5,650
pirata nervo is on a distinguished road
Default

no didnt work.
__________________
Reply With Quote
  #26  
Old 07-09-2007, 11:46 AM
silverfox silverfox is offline
PSP Hacker
 

Join Date: Nov 2005
Location: the year 2021
Posts: 946
silverfox Has a Beginner Reputation
Default

*sigh* ok show me the code then....if not all then most because this problem might be elswhere
__________________

http://www.psp-hacks.com/file/1126
good programmers know something, then experiment.
Reply With Quote
  #27  
Old 07-09-2007, 11:54 AM
pirata nervo pirata nervo is offline
Programmer
PSP Titan
 

Join Date: Mar 2007
Location: www.consoleworld.net
Posts: 5,650
pirata nervo is on a distinguished road
Default

Its working now! wowow thanks. :mrgreen:

I had this:
Code:
if (BrowserMenu == 1)
          {
                          MP3_End();
                          MP3_Init(1);
                          char *music_title = file_browser(CustomDir);
                          MP3_Load(music_title);
                          MP3_Play();
          }
I forgot to say that will exit from the browser. So the music when played, it stops because its loop so MP3_Play(); -> MP3_End();
And now i have this lol.
Code:
if (BrowserMenu == 1)
          {
                          MP3_End();
                          MP3_Init(1);
                          char *music_title = file_browser(CustomDir);
                          MP3_Load(music_title);
                          MP3_Play();
                          pspDebugScreenClear();
                          BrowserMenu = 0;
                          MediaPlayer = 1;
          }
__________________
Reply With Quote
  #28  
Old 07-09-2007, 12:17 PM
silverfox silverfox is offline
PSP Hacker
 

Join Date: Nov 2005
Location: the year 2021
Posts: 946
silverfox Has a Beginner Reputation
Default

glad to hear it then...
__________________

http://www.psp-hacks.com/file/1126
good programmers know something, then experiment.
Reply With Quote
  #29  
Old 07-11-2007, 06:28 PM
x95F x95F is offline
PSP Newbie
 

Join Date: Jul 2007
Posts: 1
x95F Has a Beginner Reputation
Default

how do you put it on your psp? do you just copy it? and where do you copy it to?
Reply With Quote
  #30  
Old 07-11-2007, 06:32 PM
pirata nervo pirata nervo is offline
Programmer
PSP Titan
 

Join Date: Mar 2007
Location: www.consoleworld.net
Posts: 5,650
pirata nervo is on a distinguished road
Default

copy the folder calculator to the GAME150 folder.

EDIT:
the screenshots are ok now.
__________________
Reply With Quote
Reply

 



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:05 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
©