notaz.gp2x.de
/
libpicofe.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
oss: use other sync macro
[libpicofe.git]
/
linux
/
sndout_oss.c
diff --git
a/linux/sndout_oss.c
b/linux/sndout_oss.c
index
c0b775a
..
e10d96a
100644
(file)
--- a/
linux/sndout_oss.c
+++ b/
linux/sndout_oss.c
@@
-21,6
+21,7
@@
#include "sndout_oss.h"
int sndout_oss_frag_frames = 1;
#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;
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)
{
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;
if (sounddev < 0)
return;
- ioctl(sounddev, SOUND_PCM_SYNC, 0);
+ // sync causes trouble on Caanoo..
+ //ioctl(sounddev, SNDCTL_DSP_SYNC, 0);
+
close(sounddev);
sounddev = -1;
}
close(sounddev);
sounddev = -1;
}
@@
-170,7
+178,7
@@
int sndout_oss_can_write(int bytes)
void sndout_oss_wait(void)
{
// FIXME?
void sndout_oss_wait(void)
{
// FIXME?
- ioctl(sounddev, S
OUND_PCM
_SYNC, 0);
+ ioctl(sounddev, S
NDCTL_DSP
_SYNC, 0);
}
void sndout_oss_setvol(int l, int r)
}
void sndout_oss_setvol(int l, int r)