Re: Playing Sounds April 01, 2009 04:02AM | Registered: 15 years ago Posts: 703 |
Re: Playing Sounds April 01, 2009 04:13AM | Registered: 15 years ago Posts: 83 |
c:/devkitPro/libogc/lib/wii\libmad.a(mp3player.o): In function `StreamPlay': mp3player.c:(.text.StreamPlay+0x44c): undefined reference to `ASND_StopVoice' mp3player.c:(.text.StreamPlay+0x554): undefined reference to `ASND_SetVoice' c:/devkitPro/libogc/lib/wii\libmad.a(mp3player.o): In function `MP3Player_Init': mp3player.c:(.text.MP3Player_Init+0x28): undefined reference to `ASND_Pause' mp3player.c:(.text.MP3Player_Init+0x30): undefined reference to `ASND_StopVoice' c:/devkitPro/libogc/lib/wii\libmad.a(mp3player.o): In function `DataTransferCallback': mp3player.c:(.text.DataTransferCallback+0x19c): undefined reference to `ASND_TestPointer' mp3player.c:(.text.DataTransferCallback+0x2c8): undefined reference to `ASND_StatusVoice' mp3player.c:(.text.DataTransferCallback+0x320): undefined reference to `ASND_AddVoice'
Re: Playing Sounds April 01, 2009 07:09AM | Registered: 15 years ago Posts: 703 |
Re: Playing Sounds April 01, 2009 10:28AM | Registered: 15 years ago Posts: 83 |
MP3Player_Init(); if (!MP3Player_IsPlaying()) MP3Player_PlayBuffer(menu_mp3,menu_mp3_size,NULL);When it should have looked like this:
ASND_Init(); MP3Player_Init(); if (!MP3Player_IsPlaying()) MP3Player_PlayBuffer(menu_mp3,menu_mp3_size,NULL);
TARGET := $(notdir $(CURDIR)) BUILD := build SOURCES := source source/gfx source/GRRLIB source/libpng source/libpng/pngu DATA := data INCLUDES := LIBS := -lasnd -lpng -lz -lfat -lwiiuse -lmad -lbte -logc -lm #--------------------------------------------------------------------------------- %.mp3.o : %.mp3 #--------------------------------------------------------------------------------- @echo $(notdir $<) $(bin2o) -include $(DEPENDS)GAME.CPP:
#include asndlib.h #include mp3player.h #include "menu_mp3.h" // inside menu_loop() ASND_Init(); MP3Player_Init(); if (!MP3Player_IsPlaying()) MP3Player_PlayBuffer(menu_mp3,menu_mp3_size,NULL);I hope that helps you out, g_man.
Re: Playing Sounds April 01, 2009 08:33PM | Registered: 15 years ago Posts: 703 |
Re: Playing Sounds April 02, 2009 09:19AM | Registered: 15 years ago Posts: 83 |
Quote
scanff
ASND_Init();
MP3Player_Init();
These should not be inside a loop. You just need to call them once.
RazorChrist - What do you mean by Cutoff ?
Re: Playing Sounds April 02, 2009 04:41PM | Registered: 16 years ago Posts: 175 |
Re: Playing Sounds April 02, 2009 05:01PM | Registered: 16 years ago Posts: 265 |
Re: Playing Sounds April 02, 2009 09:45PM | Registered: 15 years ago Posts: 83 |
Quote
Crayon
I have a question related to the last message. I'm now able to play MP3's in my game but I want to add sound fx, what's the best way to do that. Because from what I understand there is no way to play mp3 in different channel so I need to pick another format. So which is the best combination:
* mp3+ogg
* mp3+pcm
* ogg+pcm
* ?+?
And most importantly where could I find a code snippet.
ASND_SetVoice(ASND_GetFirstUnusedVoice(), 3, 48000, 0, (char *) turn_mp3, turn_mp3_size, 255, 255, NULL);
Re: Playing Sounds April 02, 2009 09:51PM | Registered: 15 years ago Posts: 703 |
Re: Playing Sounds April 03, 2009 08:39AM | Registered: 16 years ago Posts: 265 |
Re: Playing Sounds April 17, 2009 09:35AM | Registered: 15 years ago Posts: 1 |
Re: Playing Sounds April 17, 2009 05:32PM | Registered: 16 years ago Posts: 441 |
Quote
JonesyLeo
Hi everyone.
So.. someone reached a right solution to play a "background music" and some Sfx simultaneously?
Someone could put (in this thread) the complete code of an explanatory examples (like: start a long music in background, then pressing "A" play a short Sfx.. like an Explosion... or a blackbird whistle..)
Sorry for the English...
Ciao Ragazzi.
______________
Leo
Re: Playing Sounds April 18, 2009 04:53PM | Registered: 16 years ago Posts: 175 |
Re: Playing Sounds April 18, 2009 05:14PM | Registered: 15 years ago Posts: 276 |
Re: Playing Sounds April 18, 2009 07:06PM | Registered: 16 years ago Posts: 441 |
Re: Playing Sounds April 19, 2009 08:21PM | Registered: 16 years ago Posts: 175 |
Re: Playing Sounds April 21, 2009 12:05PM | Registered: 16 years ago Posts: 48 |
Re: Playing Sounds June 19, 2009 08:24PM | Registered: 15 years ago Posts: 15 |
Quote
RazorChrist
I've been trying to get sfx working myself. What I'm doing is using the converted mp3 to h files I was using for MP3Player, except when I call the sfx, I use ASND instead.
Example:ASND_SetVoice(ASND_GetFirstUnusedVoice(), 3, 48000, 0, (char *) turn_mp3, turn_mp3_size, 255, 255, NULL);
The tricky thing about this, at least what I'm having a problem with, is that the sfx doesn't sound anything like it should. But I think the problem might either be in the format (maybe switch to ogg for sfx) or in the frequency. Problem is, I spent the last few days trying different combinations of frequencies and pitches, but can't get it to sound like it does on PC.
If anyone has any insight on how to get it right, much appreciated.
Re: Playing Sounds June 19, 2009 08:58PM | Registered: 16 years ago Posts: 265 |