diff options
Diffstat (limited to 'games/egl/files/patch-unix__unix_snd_oss.c')
-rw-r--r-- | games/egl/files/patch-unix__unix_snd_oss.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/games/egl/files/patch-unix__unix_snd_oss.c b/games/egl/files/patch-unix__unix_snd_oss.c new file mode 100644 index 000000000000..380ac3e8666f --- /dev/null +++ b/games/egl/files/patch-unix__unix_snd_oss.c @@ -0,0 +1,44 @@ +--- unix/unix_snd_oss.c.orig Mon Jul 24 13:47:59 2006 ++++ unix/unix_snd_oss.c Mon Jul 24 14:01:57 2006 +@@ -29,7 +29,11 @@ + #include <sys/mman.h> + #include <sys/shm.h> + #include <sys/wait.h> ++#ifdef __linux__ + #include <linux/soundcard.h> ++#else ++#include <sys/soundcard.h> ++#endif + #include <stdio.h> + + #include "../client/snd_local.h" +@@ -152,6 +156,14 @@ + else + snd_audioDMA.channels = 1; + ++ rc = ioctl (oss_audioFD, SNDCTL_DSP_SPEED, &snd_audioDMA.speed); ++ if (rc < 0) { ++ perror (oss_curDevice); ++ Com_Printf (PRNT_ERROR, "Could not set %s speed to %d", oss_curDevice, snd_audioDMA.speed); ++ close (oss_audioFD); ++ return qFalse; ++ } ++ + if (snd_audioDMA.sampleBits == 16) { + rc = AFMT_S16_LE; + rc = ioctl (oss_audioFD, SNDCTL_DSP_SETFMT, &rc); +@@ -178,14 +190,6 @@ + close (oss_audioFD); + return qFalse; + } +- +- rc = ioctl (oss_audioFD, SNDCTL_DSP_SPEED, &snd_audioDMA.speed); +- if (rc < 0) { +- perror (oss_curDevice); +- Com_Printf (PRNT_ERROR, "Could not set %s speed to %d", oss_curDevice, snd_audioDMA.speed); +- close (oss_audioFD); +- return qFalse; +- } + + if (ioctl (oss_audioFD, SNDCTL_DSP_GETOSPACE, &info) == -1) { + perror ("GETOSPACE"); |