summaryrefslogtreecommitdiff
path: root/multimedia/xanim/patches/patch-ae
blob: 0f254810f44e8e45ec54324d5cae4df156fe5237 (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.1.1.1 2004/01/26 15:19:53 jmmv 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;