X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fgp2x%2Fgp2x-sound.c;h=666aee107029b1e02cc553656e166690fd463df2;hb=15d2d2584cc71389f06b969d7cd836332add97c6;hp=30934bcc9e4fa4f81b4c1744d4f6d5b7e1cf63a2;hpb=22f08d9598e12f15de5e3c2f503c2ad1298dcc17;p=fceu.git diff --git a/drivers/gp2x/gp2x-sound.c b/drivers/gp2x/gp2x-sound.c index 30934bc..666aee1 100644 --- a/drivers/gp2x/gp2x-sound.c +++ b/drivers/gp2x/gp2x-sound.c @@ -16,35 +16,20 @@ */ #include -#include -#include -#include -#include -#include -#include +#include "../../driver.h" #include "gp2x.h" #include "minimal.h" #include "throttle.h" extern int soundvol; -extern unsigned long gp2x_dev[8]; -// always have this call -INLINE void gp2x_sound_frame(void *blah, void *buff, int samples) -{ -} void WriteSound(int16 *Buffer, int Count) { - write(gp2x_dev[3], Buffer, Count<<1); - SpeedThrottle(); -} - -void* gp2x_write_sound(void* blah) -{ - return NULL; + gp2x_sound_write(Buffer, Count<<1); +// SpeedThrottle(); } void SilenceSound(int n) @@ -52,12 +37,10 @@ void SilenceSound(int n) soundvol=0; } -int InitSound(FCEUGI *gi) +int InitSound(void) { - Settings.sound=22050; - FCEUI_Sound(Settings.sound); + FCEUI_Sound(Settings.sound_rate); gp2x_sound_volume(soundvol, soundvol); - printf("InitSound() sound_rate: %d\n", Settings.sound); return 1; } @@ -73,7 +56,7 @@ uint32 GetWriteSound(void) int KillSound(void) { - FCEUI_Sound(0); + //FCEUI_Sound(0); return 1; }