Fixed ASND click sound, reverted to ASND sound (SDL sound works as well)

This commit is contained in:
fabio.olimpieri 2014-04-25 22:01:31 +00:00
parent c8a1731887
commit 2d74dd0c21
2 changed files with 11 additions and 2 deletions

View File

@ -1222,7 +1222,7 @@ int main(int argc,char *argv[])
#ifdef GEKKO #ifdef GEKKO
dblbuffer=1; dblbuffer=1;
hwsurface=1; hwsurface=1;
//sound_type=SOUND_ASND; //play_click does not work with ASND double buffer sound_type=SOUND_ASND; //play_click does not work with ASND double buffer
setenv("HOME", "/fbzx-wii", 1); setenv("HOME", "/fbzx-wii", 1);
//initialize libfat library //initialize libfat library

View File

@ -47,7 +47,8 @@
#if defined(GEKKO) #if defined(GEKKO)
# include <wiiuse/wpad.h> #include <wiiuse/wpad.h>
#include <asndlib.h>
#endif #endif
#ifdef DEBUG #ifdef DEBUG
@ -1619,6 +1620,14 @@ int menu_is_inited(void)
//Sound must be reseted before calling this function //Sound must be reseted before calling this function
void play_click(sound) void play_click(sound)
{ {
if (sound_type == SOUND_ASND)
{
ASND_SetVoice(2,VOICE_STEREO_16BIT_BE,ordenador.freq,0, click_buffer_pointer[sound],len_click_buffer[sound],
255, 255, NULL);
return;
}
int inc; int inc;
int len_click_buffer_norm = len_click_buffer[sound]/ordenador.increment; int len_click_buffer_norm = len_click_buffer[sound]/ordenador.increment;