804a257505
Use patches instead of sed. Set LICENSE while here.
67 lines
1.9 KiB
Text
67 lines
1.9 KiB
Text
$NetBSD: patch-aj,v 1.2 2011/11/22 20:57:35 wiz Exp $
|
|
|
|
--- obuffer.h.orig 1994-06-23 12:14:40.000000000 +0000
|
|
+++ obuffer.h
|
|
@@ -27,7 +27,7 @@
|
|
#ifndef OBUFFER_H
|
|
#define OBUFFER_H
|
|
|
|
-#include <iostream.h>
|
|
+#include <iostream>
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
#include "all.h"
|
|
@@ -123,20 +123,20 @@ private:
|
|
|
|
public:
|
|
#ifdef ULAW
|
|
- SparcObuffer (Header *, bool use_speaker, bool use_headphone, bool use_line_out);
|
|
+ SparcObuffer (Header *, boolean use_speaker, boolean use_headphone, boolean use_line_out);
|
|
#else
|
|
SparcObuffer (uint32 number_of_channels, Header *,
|
|
- bool use_speaker, bool use_headphone, bool use_line_out);
|
|
+ boolean use_speaker, boolean use_headphone, boolean use_line_out);
|
|
#endif
|
|
~SparcObuffer (void);
|
|
void append (uint32 channel, int16 value);
|
|
void write_buffer (int dummy);
|
|
|
|
#ifdef ULAW
|
|
- static bool class_suitable (uint32 number_of_channels, bool force_amd);
|
|
+ static boolean class_suitable (uint32 number_of_channels, boolean force_amd);
|
|
// returnvalue == False: no u-law output possible (class unsuitable)
|
|
#else
|
|
- static bool class_suitable (void);
|
|
+ static boolean class_suitable (void);
|
|
// returnvalue == False: no 16-bit output possible (class unsuitable)
|
|
#endif
|
|
};
|
|
@@ -159,7 +159,27 @@ public:
|
|
void append (uint32 channel, int16 value);
|
|
void write_buffer (int dummy);
|
|
|
|
- static bool class_suitable (uint32 number_of_channels);
|
|
+ static boolean class_suitable (uint32 number_of_channels);
|
|
+};
|
|
+#endif // LINUX
|
|
+
|
|
+#ifdef NETBSD
|
|
+class NetBSDObuffer : public Obuffer
|
|
+{
|
|
+ int16 buffer[OBUFFERSIZE];
|
|
+ int16 *bufferp[MAXCHANNELS];
|
|
+ uint32 channels;
|
|
+ static int audio_fd;
|
|
+
|
|
+ static int open_audio_device (void);
|
|
+
|
|
+public:
|
|
+ NetBSDObuffer (uint32 number_of_channels, Header *);
|
|
+ ~NetBSDObuffer (void);
|
|
+ void append (uint32 channel, int16 value);
|
|
+ void write_buffer (int dummy);
|
|
+
|
|
+ static boolean class_suitable (uint32 number_of_channels);
|
|
};
|
|
#endif // LINUX
|
|
|