X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=linux%2Fsndout_oss.c;h=2ac91c49cfb511457fc554d613f1347dbbdbc64d;hb=26ea18173c1228dd5ce39e2a88ffe1ae10fcb365;hp=c0b775aba24b3fa73604bd1766ebaf39918133a3;hpb=26d3ca0d29e87a14943d29fcafc93da753df60cd;p=libpicofe.git diff --git a/linux/sndout_oss.c b/linux/sndout_oss.c index c0b775a..2ac91c4 100644 --- a/linux/sndout_oss.c +++ b/linux/sndout_oss.c @@ -21,6 +21,7 @@ #include "sndout_oss.h" int sndout_oss_frag_frames = 1; +int sndout_oss_can_restart = 1; static int sounddev = -1, mixerdev = -1; static int can_write_safe; @@ -41,10 +42,17 @@ int sndout_oss_init(void) void sndout_oss_stop(void) { + /* restarting audio on GP2X causes trouble, + * not restarting on Caanoo causes trouble */ + if (!sndout_oss_can_restart) + return; + if (sounddev < 0) return; - ioctl(sounddev, SOUND_PCM_SYNC, 0); + // sync causes trouble on Caanoo.. + //ioctl(sounddev, SOUND_PCM_SYNC, 0); + close(sounddev); sounddev = -1; }