summaryrefslogtreecommitdiff
path: root/graphics/avifile/patches/patch-aa
blob: 015258d49c0657e4919603a3e7d3539d6f75e758 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
$NetBSD: patch-aa,v 1.1.1.1 2001/04/12 21:26:21 zuntum Exp $

--- lib/aviplay/audio.cpp.orig	Fri Dec 15 07:53:05 2000
+++ lib/aviplay/audio.cpp
@@ -28,7 +28,11 @@
 #include <pthread.h>
 
 
-#include <sys/soundcard.h>
+#ifdef __NetBSD__
+#include <soundcard.h>
+#else
+ #include <sys/soundcard.h>
+#endif
 
 #include "aviplay_impl.h"
 #include "audio.h"
@@ -112,7 +116,7 @@
 int audio_queue::write(int fd)//writes some data
 {
     int startpos, size, tmp;
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__NetBSD__)
     const int AUDIO_BUFFER_SIZE=2048;
 #else
     const int AUDIO_BUFFER_SIZE=8192;
@@ -372,7 +376,7 @@
 	audio_fd=-1;
 	try
 	{
-    	    audio_fd=open("/dev/dsp",O_RDWR|O_NDELAY);
+    	    audio_fd=open("/dev/audio",O_RDWR|O_NDELAY);
 	    if(audio_fd<=0)
   		throw FATAL("Can't open audio device");
 	    if(audio_fd>0)
@@ -388,7 +392,7 @@
 	catch(FatalError&)
 	{
 	    if(audio_fd>0)::close(audio_fd);
-	    audio_fd=open("/dev/dsp", O_RDWR);
+	    audio_fd=open("/dev/audio", O_RDWR);
 	}
         if(audio_fd<=0)
      	    throw FATAL("Can't open audio device");