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
|
$NetBSD: patch-an,v 1.2 1998/08/07 10:36:11 agc Exp $
--- snd.orig/snd-xrec.c Mon Feb 2 15:01:06 1998
+++ snd-xrec.c Sun Feb 22 02:23:01 1998
@@ -1314,7 +1314,11 @@
#include <soundcard.h>
#endif
-#define DAC_NAME "/dev/dsp"
+#ifdef LINUX
+# define DAC_NAME "/dev/dsp"
+#else /* !LINUX */
+# define DAC_NAME "/dev/audio"
+#endif /* LINUX */
#define FRAGMENTS 2
#define FRAGMENT_SIZE 10
@@ -1415,8 +1419,11 @@
if ((audio_fd = open(DAC_NAME,O_RDONLY,0)) == -1)
{
record_report(rec,"can't open any inputs!");
- if ((errno == EACCES) || (errno == ENOENT))
- record_report(rec,"(to get input in Linux, we need read permission on /dev/dsp)");
+ if ((errno == EACCES) || (errno == ENOENT)){
+ char buf[256];
+ snprintf(buf,256,"(to get input in Linux, we need read permission on %s)",DAC_NAME);
+ record_report(rec,buf);
+ }
return(-1);
}
}
|