summaryrefslogtreecommitdiff
path: root/audio/tracker/patches/patch-ac
blob: d8b85310ab536536961a7ff18e65aca8f48f26fd (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
$NetBSD: patch-ac,v 1.4 2005/11/10 20:07:17 joerg Exp $

--- Arch/PCux/audio.c.orig	1996-04-12 16:30:37.000000000 +0000
+++ Arch/PCux/audio.c
@@ -9,6 +9,9 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include "extern.h"
+#include "prefs.h"
+#include "autoinit.h"
+#include "watched_var.h"
 
 struct options_set *port_options=0;
 
@@ -50,7 +53,7 @@ unsigned long open_audio(unsigned long f
 	int buf_max;
 	unsigned long possible, current;
 
-   audio = open("/dev/dsp", O_WRONLY, 0);
+   audio = open(DEVOSSAUDIO, O_WRONLY, 0);
    if (audio == -1)
 		end_all("Error opening audio device");
 
@@ -116,6 +119,7 @@ unsigned long open_audio(unsigned long f
 		}
 	samples_max = buf_max / dsize;
 	current_freq = f;
+	set_watched_scalar(FREQUENCY, f);
 	total = 0;
 	return f;
    }
@@ -145,6 +149,7 @@ void output_samples(long left, long righ
 		add_samples8(left, right, n);
 		break;
 	default:	/* should not happen */
+		break;
 	   }
    }