X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=drivers%2Fcommon%2Fsound-oss.c;fp=drivers%2Fcommon%2Fsound-oss.c;h=864741b4ce4aca9daed7457b26a2fafe5b366c5e;hp=0000000000000000000000000000000000000000;hb=87e3eef5be4a5de92f97ee211ae4035d8d4b6494;hpb=4a2a617ac879a95babe3b8a822188b71e9769ba4 diff --git a/drivers/common/sound-oss.c b/drivers/common/sound-oss.c new file mode 100644 index 0000000..864741b --- /dev/null +++ b/drivers/common/sound-oss.c @@ -0,0 +1,62 @@ +/* FCE Ultra - NES/Famicom Emulator + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include + +#include "../../driver.h" +#include "../common/settings.h" +#include "../common/throttle.h" +#include "../libpicofe/linux/sndout_oss.h" + + +extern int soundvol; + +void WriteSound(int16 *Buffer, int Count) +{ + sndout_oss_write_nb(Buffer, Count * 2); +} + +void SilenceSound(int n) +{ + soundvol = 0; +} + +int InitSound(void) +{ + FCEUI_Sound(Settings.sound_rate); + sndout_oss_init(); + return 1; +} + +uint32 GetMaxSound(void) +{ + return(4096); +} + +uint32 GetWriteSound(void) +{ + return 1024; +} + +void StartSound(void) +{ + sndout_oss_start(Settings.sound_rate, 0, 2); +} + +int KillSound(void) +{ + //FCEUI_Sound(0); + + return 1; +} +