X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=libpicofe.git;a=blobdiff_plain;f=linux%2Fsndout_oss.c;h=2ac91c49cfb511457fc554d613f1347dbbdbc64d;hp=a8fbe3fa3258d30a7b755705ec8a7f5057a99d12;hb=39014486f9e50110d23dece007ce4c0ed90d15b1;hpb=9a5a0dc9ff4086a295832709c609276512f54743 diff --git a/linux/sndout_oss.c b/linux/sndout_oss.c index a8fbe3f..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,15 +42,17 @@ int sndout_oss_init(void) void sndout_oss_stop(void) { -#ifdef __GP2X__ - /* restarting audio on GP2X causes trouble */ - return; -#endif + /* 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; }