summaryrefslogtreecommitdiff
path: root/graphics/xanim/patches/patch-ae
blob: 82f33d94d983f21d84dc1bc08be02d545bebf353 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$NetBSD: patch-ae,v 1.3 2002/09/25 12:04:07 jlam Exp $

--- xa_audio.c.orig	Sun Mar 21 14:36:25 1999
+++ xa_audio.c
@@ -4665,7 +4665,19 @@ void NetBSD_Audio_Init()
 
   a_info.mode = AUMODE_PLAY | AUMODE_PLAY_ALL;
   ioctl(devAudio, AUDIO_SETINFO, &a_info);
-#ifdef AUDIO_ENCODING_SLINEAR
+#ifdef AUDIO_ENCODING_SLINEAR_LE
+  /* Use new encoding names */
+  AUDIO_INITINFO(&a_info);
+  a_info.play.encoding = AUDIO_ENCODING_SLINEAR_LE;
+  a_info.play.precision = 16;
+  if ( ioctl(devAudio, AUDIO_SETINFO, &a_info) < 0)
+  {
+    AUDIO_INITINFO(&a_info);
+    a_info.play.encoding = AUDIO_ENCODING_ULINEAR;
+    a_info.play.precision = 8;
+    ioctl(devAudio, AUDIO_SETINFO, &a_info);
+  }
+#elif defined(AUDIO_ENCODING_SLINEAR)
   /* Use new encoding names */
   AUDIO_INITINFO(&a_info);
   a_info.play.encoding = AUDIO_ENCODING_SLINEAR;