Thanks to the GREAT WINTERMUTE I am now able to play music and show JPG in my wii app !
Now I have a problem: I am building a multiple-app forwarder and, when I press a button, this is what it does:
case WPAD_BUTTON_A:
MP3Player_Stop();
snprintf(filename, 128, folder "a.dol");
break;
and so on for each button.
Now, forwarding works GREAT but, when I exits some forwarded apps (es. WAD Manager) I get a crash dump (with other apps such as Wiixplorer or others it simply get back to System Menu). This doesn't happen if I remove the MP3 backgorund music code and even if I add the MP3Player_Stop(); function as you can see (at first I thoght it was a missing MP3Player_Stop(); but that didn't solve the problem).
Or maybe I have some code problems in the .dol .elf loading part of code ? (that I hardy can understand....)
Do you think I should clear the audio buffer BEFORE launching an app (how to do that?) or do you have any other cool suggestion to solve that crash-dump problem ?
Or maybe this problem is related to poorly-coded forwarded apps ?
This is my full main.c (mostly copied from other codes recovered from the net from spacejump and wiipower): http://pastebin.com/T8t10DwD
Thank you again very much for your support !!!!!!
How to clear audio buffer ?
Re: How to clear audio buffer ?
Try calling ASND_End() after MP3Player_Stop(). This will shutdown the ASND lib and will stop the dsp task. Perhaps this helps.
best regards
shagkur
best regards
shagkur
Re: How to clear audio buffer ?
The command desn't help me... I went back to my code WITHOUT the mp3 code and... it still crashes !!!! Really dunno why !!! Maybe I wrongly remember... anyway THANK YOU, I learnt a new command
Re: How to clear audio buffer ?
Mmmmmm... maybe I found the problem... it seems to happen when I add a jpg image to the background.
What should I add to this code:
case WPAD_BUTTON_A:
MP3Player_Stop();
ASND_End();
snprintf(filename, 128, folder "a.dol");
break;
in order to totally kill any buffered image ?
Is there a specific command that "clean" all memory before the code execute the dol ?
What should I add to this code:
case WPAD_BUTTON_A:
MP3Player_Stop();
ASND_End();
snprintf(filename, 128, folder "a.dol");
break;
in order to totally kill any buffered image ?
Is there a specific command that "clean" all memory before the code execute the dol ?
Who is online
Users browsing this forum: No registered users and 7 guests