Sound? Howto? August 03, 2008 03:03PM | Registered: 16 years ago Posts: 11 |
Re: Sound? Howto? August 03, 2008 03:15PM | Registered: 16 years ago Posts: 211 |
Re: Sound? Howto? August 03, 2008 03:56PM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Sound? Howto? August 03, 2008 08:30PM | Registered: 16 years ago Posts: 11 |
Re: Sound? Howto? August 03, 2008 11:48PM | Admin Registered: 16 years ago Posts: 5,132 |
#include//Wii Remote #include //Load .mp3 files from Sandisk #include //To play .mp3 //Set up video int main(){ VIDEO_Init();//Initialise Video (Note: I'm not doing anything with the screen this program) fatInitDefault();//Initialise the front SanDisk for loading .mp3s MP3Player_Init();//Initialise the MP3 player WPAD_Init();//Initialise the Wii Remote while(true){ WPAD_ScanPads();//Checks the current state of the wii remote if(WPAD_ButtonsDown(WPAD_CHAN_0)&WPAD_BUTTON_A){ if(MP3Player_IsPlaying()) MP3Player_Stop(); MP3Player_PlayFile("data/soundeffect1.mp3", lengthofsoundeffect1, NULL);/*This line will not compile because I do not have the correct paremeters*/ } if(WPAD_ButtonsDown(WPAD_CHAN_0)&WPAD_BUTTON_B){ if(MP3Player_IsPlaying()) MP3Player_Stop(); MP3Player_PlayFile("data/soundeffect2.mp3", lengthofsoundeffect2, NULL);/*This line will not compile because I do not have the correct paremeter*/ } if(WPAD_ButtonsDown(WPAD_CHAN_0)&WPAD_BUTTON_HOME){ if(MP3Player_IsPlaying()) MP3Player_Stop(); break; } } return 0; }
#include//Wii Remote #include //Load .mp3 files from Sandisk #include //To play .mp3 //Set up video int main(){ VIDEO_Init();//Initialise Video (Note: I'm not doing anything with the screen this program) fatInitDefault();//Initialise the front SanDisk for loading .mp3s MP3Player_Init();//Initialise the MP3 player WPAD_Init();//Initialise the Wii Remote while(true){ WPAD_ScanPads();//Checks the current state of the wii remote if(WPAD_ButtonsDown(WPAD_CHAN_0)&WPAD_BUTTON_2){ if(MP3Player_IsPlaying()){ MP3Player_Stop(); continue; } if(!MP3Player_IsPlaying()) MP3Player_PlayFile("data/intro.mp3", introlength, NULL);//This line will not compile because I do not have the correct paremeters } if(WPAD_ButtonsDown(WPAD_CHAN_0)&WPAD_BUTTON_HOME){ if(MP3Player_IsPlaying()) MP3Player_Stop(); break; } } return 0; }
s32 MP3Player_PlayFile(void *cb_data,s32 (*reader)(void *,void *,s32),void (*filterfunc)(struct mad_stream *,struct mad_frame *));
Re: Sound? Howto? August 04, 2008 12:12AM | Registered: 16 years ago Posts: 45 |
Re: Sound? Howto? August 04, 2008 01:49AM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Sound? Howto? August 04, 2008 02:52AM | Registered: 16 years ago Posts: 45 |
Re: Sound? Howto? August 04, 2008 04:12AM | Registered: 16 years ago Posts: 211 |
Re: Sound? Howto? August 04, 2008 05:35AM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Sound? Howto? August 04, 2008 03:39PM | Registered: 16 years ago Posts: 11 |
Re: Sound? Howto? August 04, 2008 06:04PM | Registered: 16 years ago Posts: 45 |
Re: Sound? Howto? August 04, 2008 06:26PM | Registered: 16 years ago Posts: 11 |
Re: Sound? Howto? August 04, 2008 06:58PM | Registered: 16 years ago Posts: 45 |
Re: Sound? Howto? August 04, 2008 09:30PM | Registered: 16 years ago Posts: 11 |
Re: Sound? Howto? August 04, 2008 09:32PM | Registered: 16 years ago Posts: 45 |
Re: Sound? Howto? August 04, 2008 09:50PM | Registered: 16 years ago Posts: 11 |
Re: Sound? Howto? August 04, 2008 10:15PM | Registered: 16 years ago Posts: 45 |
Re: Sound? Howto? August 04, 2008 10:27PM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Sound? Howto? August 04, 2008 10:33PM | Registered: 16 years ago Posts: 45 |