How to clear audio buffer ?
Posted: Thu Sep 23, 2010 11:09 am
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 !!!!!!
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 !!!!!!