summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2002-06-27 15:52:11 +0000
committeragc <agc@pkgsrc.org>2002-06-27 15:52:11 +0000
commit5c5fe9fed14f6c6fb75401a35656c340128e2561 (patch)
treea0a3b23a34ba3af51eb043e9aacecee9a317b27b /audio
parent58833af2ab714b5b088f8e9537cbeb94ed36d7b6 (diff)
downloadpkgsrc-5c5fe9fed14f6c6fb75401a35656c340128e2561.tar.gz
Fix a compilation problem on 1.6 and above.
Split patch files out into one file per patch-file.
Diffstat (limited to 'audio')
-rw-r--r--audio/maplay/distinfo21
-rw-r--r--audio/maplay/patches/patch-aa768
-rw-r--r--audio/maplay/patches/patch-ab44
-rw-r--r--audio/maplay/patches/patch-ac45
-rw-r--r--audio/maplay/patches/patch-ad238
-rw-r--r--audio/maplay/patches/patch-ae38
-rw-r--r--audio/maplay/patches/patch-af35
-rw-r--r--audio/maplay/patches/patch-ag17
-rw-r--r--audio/maplay/patches/patch-ah77
-rw-r--r--audio/maplay/patches/patch-ai177
-rw-r--r--audio/maplay/patches/patch-aj58
-rw-r--r--audio/maplay/patches/patch-ak15
-rw-r--r--audio/maplay/patches/patch-al52
-rw-r--r--audio/maplay/patches/patch-am40
-rw-r--r--audio/maplay/patches/patch-an56
-rw-r--r--audio/maplay/patches/patch-ao49
16 files changed, 706 insertions, 1024 deletions
diff --git a/audio/maplay/distinfo b/audio/maplay/distinfo
index 2608dddc5e8..10813b6e83c 100644
--- a/audio/maplay/distinfo
+++ b/audio/maplay/distinfo
@@ -1,8 +1,19 @@
-$NetBSD: distinfo,v 1.2 2001/04/18 12:14:33 agc Exp $
+$NetBSD: distinfo,v 1.3 2002/06/27 15:52:11 agc Exp $
SHA1 (maplay1_2.tar.Z) = 9fa65fc8028ce36c039786a517a49707dc4c7158
Size (maplay1_2.tar.Z) = 95597 bytes
-SHA1 (patch-aa) = 5d4c4122bc25ee9118f7d262851fc46793379652
-SHA1 (patch-ab) = 68a32083b650820c0611543af352f2f4d3169703
-SHA1 (patch-ac) = 79f5f342e0115bd1fc459c32e8494cee3051564c
-SHA1 (patch-ad) = bc9447abffc474c672f3913ce0df3178b94cd22a
+SHA1 (patch-aa) = 12dfda39d9c451b4ba197aab637f234cbd255649
+SHA1 (patch-ab) = 92582f6a9b87ca4c61aaf42a1d03349b455997dc
+SHA1 (patch-ac) = 8f935cc8c3b0a1dd62ae58af67cf6333e522ce28
+SHA1 (patch-ad) = 389c418dac740b6959b441439cc4660ed28daee0
+SHA1 (patch-ae) = 4579d1dc9dbae73c0d33f0fc5fe038733640bcef
+SHA1 (patch-af) = 843b8fad21e2feeee07feb3292a34456f88c639f
+SHA1 (patch-ag) = 582bec6631acd1478dacc19feba60e4bed9062ab
+SHA1 (patch-ah) = 72dad44d543fbdf67d60e5697943e1ba83dc66bf
+SHA1 (patch-ai) = 2d7cc43f33db4f60549e2be27f388b92c7b0b4a8
+SHA1 (patch-aj) = 9b44b0e3b85adfe24419d8fa4dac9253fbf9c36d
+SHA1 (patch-ak) = 6ad1edff4dc6b5e7fdd913fd85a63c27a6947941
+SHA1 (patch-al) = 7acf2837506b65a1fe6016bd9a5527588e81d313
+SHA1 (patch-am) = f517221b15e69e20af1a3868e04870448490a841
+SHA1 (patch-an) = 95b414c0a48fc941ac6a9baba9bc1eb6c0917083
+SHA1 (patch-ao) = 742110dd6e021f86cca5f57634c78d19dd08fb9f
diff --git a/audio/maplay/patches/patch-aa b/audio/maplay/patches/patch-aa
index 124dd1fb087..523a6bb8400 100644
--- a/audio/maplay/patches/patch-aa
+++ b/audio/maplay/patches/patch-aa
@@ -1,747 +1,23 @@
-$NetBSD: patch-aa,v 1.2 1998/08/07 10:35:56 agc Exp $
+$NetBSD: patch-aa,v 1.3 2002/06/27 15:52:12 agc Exp $
-Only in maplay.new: .extract_done
-diff -c -r maplay/all.h maplay.new/all.h
-*** maplay/all.h Thu Jun 23 12:14:39 1994
---- maplay.new/all.h Tue Feb 14 07:50:56 1995
-***************
-*** 22,28 ****
- #define ALL_H
-
- typedef float real; // float should be enough
-! typedef short bool;
- typedef unsigned uint32; // 32 Bit unsigned integer
- // some compilers may need "typedef unsigned long uint32" instead
- typedef int int32; // 32 Bit signed integer
---- 22,28 ----
- #define ALL_H
-
- typedef float real; // float should be enough
-! typedef short boolean;
- typedef unsigned uint32; // 32 Bit unsigned integer
- // some compilers may need "typedef unsigned long uint32" instead
- typedef int int32; // 32 Bit signed integer
-diff -c -r maplay/configuration.sh maplay.new/configuration.sh
-*** maplay/configuration.sh Thu Jun 23 12:14:46 1994
---- maplay.new/configuration.sh Tue Feb 14 07:46:52 1995
-***************
-*** 72,77 ****
---- 72,83 ----
- INCLUDEDIRS=
- LIBRARIES=
- AUDIO_INCLUDES='#include <sys/audioio.h>' ;;
-+ FreeBSD*)
-+ COMPILER=g++
-+ COMPILERFLAGS='-O2 -m486 -DLINUX -DDAMN_INTEL_BYTE_ORDER'
-+ INCLUDEDIRS=
-+ LIBRARIES=
-+ AUDIO_INCLUDES='#include <machine/soundcard.h>' ;;
- Linux*)
- COMPILER=g++
- COMPILERFLAGS='-O2 -m486 -funroll-loops -DLINUX -DDAMN_INTEL_BYTE_ORDER'
-diff -c -r maplay/header.cc maplay.new/header.cc
-*** maplay/header.cc Thu Jun 23 12:14:35 1994
---- maplay.new/header.cc Tue Feb 14 07:52:56 1995
-***************
-*** 36,42 ****
- const uint32 Header::frequencies[3] = { 44100, 48000, 32000 };
-
-
-! bool Header::read_header (Ibitstream *stream, Crc16 **crcp)
- {
- uint32 headerstring;
-
---- 36,42 ----
- const uint32 Header::frequencies[3] = { 44100, 48000, 32000 };
-
-
-! boolean Header::read_header (Ibitstream *stream, Crc16 **crcp)
- {
- uint32 headerstring;
-
-diff -c -r maplay/header.h maplay.new/header.h
-*** maplay/header.h Thu Jun 23 12:14:40 1994
---- maplay.new/header.h Tue Feb 14 07:52:57 1995
-***************
-*** 39,45 ****
- e_mode h_mode;
- e_sample_frequency h_sample_frequency;
- uint32 h_number_of_subbands, h_intensity_stereo_bound;
-! bool h_copyright, h_original;
- Crc16 *crc;
- uint16 checksum;
-
---- 39,45 ----
- e_mode h_mode;
- e_sample_frequency h_sample_frequency;
- uint32 h_number_of_subbands, h_intensity_stereo_bound;
-! boolean h_copyright, h_original;
- Crc16 *crc;
- uint16 checksum;
-
-***************
-*** 48,54 ****
- public:
- Header (void) { crc = (Crc16 *)0; }
- ~Header (void) { if (crc) delete crc; }
-! bool read_header (Ibitstream *, Crc16 **);
- // read a 32-bit header from the bitstream
-
- // functions to query header contents:
---- 48,54 ----
- public:
- Header (void) { crc = (Crc16 *)0; }
- ~Header (void) { if (crc) delete crc; }
-! boolean read_header (Ibitstream *, Crc16 **);
- // read a 32-bit header from the bitstream
-
- // functions to query header contents:
-***************
-*** 58,68 ****
- uint32 frequency (void) { return frequencies[h_sample_frequency]; }
- static uint32 frequency (e_sample_frequency rate) { return frequencies[rate]; }
- e_mode mode (void) { return h_mode; };
-! bool checksums (void) { return !h_protection_bit; }
-! bool copyright (void) { return h_copyright; }
-! bool original (void) { return h_original; }
-
-! bool checksum_ok (void) { return checksum == crc->checksum (); }
- // compares computed checksum with stream checksum
-
- // functions which return header informations as strings:
---- 58,68 ----
- uint32 frequency (void) { return frequencies[h_sample_frequency]; }
- static uint32 frequency (e_sample_frequency rate) { return frequencies[rate]; }
- e_mode mode (void) { return h_mode; };
-! boolean checksums (void) { return !h_protection_bit; }
-! boolean copyright (void) { return h_copyright; }
-! boolean original (void) { return h_original; }
-
-! boolean checksum_ok (void) { return checksum == crc->checksum (); }
- // compares computed checksum with stream checksum
-
- // functions which return header informations as strings:
-diff -c -r maplay/ibitstream.cc maplay.new/ibitstream.cc
-*** maplay/ibitstream.cc Thu Jun 23 12:14:35 1994
---- maplay.new/ibitstream.cc Tue Feb 14 07:52:56 1995
-***************
-*** 64,70 ****
- }
-
-
-! bool Ibitstream::get_header (uint32 *headerstring)
- {
- int readvalue;
-
---- 64,70 ----
- }
-
-
-! boolean Ibitstream::get_header (uint32 *headerstring)
- {
- int readvalue;
-
-***************
-*** 102,108 ****
- }
-
-
-! bool Ibitstream::read_frame (uint32 bytesize)
- {
- int readvalue;
-
---- 102,108 ----
- }
-
-
-! boolean Ibitstream::read_frame (uint32 bytesize)
- {
- int readvalue;
-
-diff -c -r maplay/ibitstream.h maplay.new/ibitstream.h
-*** maplay/ibitstream.h Thu Jun 23 12:14:40 1994
---- maplay.new/ibitstream.h Tue Feb 14 07:52:58 1995
-***************
-*** 43,52 ****
- ~Ibitstream (void);
- int filedescriptor (void) { return fd; };
-
-! bool get_header (uint32 *);
- // get next 32 bits from bitstream in an unsigned int,
- // returned value False => end of stream
-! bool read_frame (uint32 bytesize);
- // fill buffer with data from bitstream, returned value False => end of stream
- uint32 get_bits (uint32 number_of_bits);
- // read bits (1 <= number_of_bits <= 16) from buffer into the lower bits
---- 43,52 ----
- ~Ibitstream (void);
- int filedescriptor (void) { return fd; };
-
-! boolean get_header (uint32 *);
- // get next 32 bits from bitstream in an unsigned int,
- // returned value False => end of stream
-! boolean read_frame (uint32 bytesize);
- // fill buffer with data from bitstream, returned value False => end of stream
- uint32 get_bits (uint32 number_of_bits);
- // read bits (1 <= number_of_bits <= 16) from buffer into the lower bits
-diff -c -r maplay/maplay.cc maplay.new/maplay.cc
-*** maplay/maplay.cc Thu Jun 23 12:14:36 1994
---- maplay.new/maplay.cc Tue Feb 14 07:52:57 1995
-***************
-*** 54,67 ****
-
- // data extracted from commandline arguments:
- static char *filename;
-! static bool verbose_mode = False, filter_check = False;
-! static bool stdout_mode = False;
- static enum e_channels which_channels = both;
-! static bool use_speaker = False, use_headphone = False, use_line_out = False;
- #ifdef ULAW
-! static bool force_amd = False;
- #endif
-! static bool use_own_scalefactor = False;
- static real scalefactor;
-
- // data extracted from header of first frame:
---- 54,67 ----
-
- // data extracted from commandline arguments:
- static char *filename;
-! static boolean verbose_mode = False, filter_check = False;
-! static boolean stdout_mode = False;
- static enum e_channels which_channels = both;
-! static boolean use_speaker = False, use_headphone = False, use_line_out = False;
- #ifdef ULAW
-! static boolean force_amd = False;
- #endif
-! static boolean use_own_scalefactor = False;
- static real scalefactor;
-
- // data extracted from header of first frame:
-***************
-*** 93,99 ****
- main (int argc, char *argv[])
- {
- int i;
-! bool read_ready = False, write_ready = False;
-
- if (argc < 2 || !strncmp (argv[1], "-h", 2))
- {
---- 93,99 ----
- main (int argc, char *argv[])
- {
- int i;
-! boolean read_ready = False, write_ready = False;
-
- if (argc < 2 || !strncmp (argv[1], "-h", 2))
- {
-***************
-*** 146,151 ****
---- 146,154 ----
- #ifdef Solaris
- "SPARC Solaris 2.x"
- #else
-+ #ifdef __FreeBSD__
-+ "FreeBSD"
-+ #else
- #ifdef LINUX
- "Linux"
- #else
-***************
-*** 153,158 ****
---- 156,162 ----
- "RISC ULTRIX 4.x"
- #else
- "unknown"
-+ #endif
- #endif
- #endif
- #endif
-diff -c -r maplay/obuffer.cc maplay.new/obuffer.cc
-*** maplay/obuffer.cc Thu Jun 23 12:14:36 1994
---- maplay.new/obuffer.cc Tue Feb 14 07:52:57 1995
-***************
-*** 217,226 ****
- int SparcObuffer::audio_fd = -1;
-
- #ifdef ULAW
-! SparcObuffer::SparcObuffer (Header *header, bool use_speaker, bool use_headphone, bool use_line_out)
- #else
- SparcObuffer::SparcObuffer (uint32 number_of_channels, Header *header,
-! bool use_speaker, bool use_headphone, bool use_line_out)
- #endif
- {
- #ifndef ULAW
---- 217,226 ----
- int SparcObuffer::audio_fd = -1;
-
- #ifdef ULAW
-! SparcObuffer::SparcObuffer (Header *header, boolean use_speaker, boolean use_headphone, boolean use_line_out)
- #else
- SparcObuffer::SparcObuffer (uint32 number_of_channels, Header *header,
-! boolean use_speaker, boolean use_headphone, boolean use_line_out)
- #endif
- {
- #ifndef ULAW
-***************
-*** 406,414 ****
-
-
- #ifdef ULAW
-! bool SparcObuffer::class_suitable (uint32 number_of_channels, bool force_amd)
- #else
-! bool SparcObuffer::class_suitable (void)
- #endif
- {
- #ifdef ULAW
---- 406,414 ----
-
-
- #ifdef ULAW
-! boolean SparcObuffer::class_suitable (uint32 number_of_channels, boolean force_amd)
- #else
-! boolean SparcObuffer::class_suitable (void)
- #endif
- {
- #ifdef ULAW
-***************
-*** 629,635 ****
- }
-
-
-! bool LinuxObuffer::class_suitable (uint32 number_of_channels)
- {
- // open the dsp audio device:
- audio_fd = open_audio_device ();
---- 629,635 ----
- }
-
-
-! boolean LinuxObuffer::class_suitable (uint32 number_of_channels)
- {
- // open the dsp audio device:
- audio_fd = open_audio_device ();
-diff -c -r maplay/obuffer.h maplay.new/obuffer.h
-*** maplay/obuffer.h Thu Jun 23 12:14:40 1994
---- maplay.new/obuffer.h Tue Feb 14 07:52:58 1995
-***************
-*** 123,142 ****
-
- public:
- #ifdef ULAW
-! SparcObuffer (Header *, bool use_speaker, bool use_headphone, bool use_line_out);
- #else
- SparcObuffer (uint32 number_of_channels, Header *,
-! bool use_speaker, bool use_headphone, bool 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);
- // returnvalue == False: no u-law output possible (class unsuitable)
- #else
-! static bool class_suitable (void);
- // returnvalue == False: no 16-bit output possible (class unsuitable)
- #endif
- };
---- 123,142 ----
-
- public:
- #ifdef ULAW
-! SparcObuffer (Header *, boolean use_speaker, boolean use_headphone, boolean use_line_out);
- #else
- SparcObuffer (uint32 number_of_channels, Header *,
-! 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 boolean class_suitable (uint32 number_of_channels, boolean force_amd);
- // returnvalue == False: no u-law output possible (class unsuitable)
- #else
-! static boolean class_suitable (void);
- // returnvalue == False: no 16-bit output possible (class unsuitable)
- #endif
- };
-***************
-*** 159,165 ****
- void append (uint32 channel, int16 value);
- void write_buffer (int dummy);
-
-! static bool class_suitable (uint32 number_of_channels);
- };
- #endif // LINUX
-
---- 159,165 ----
- void append (uint32 channel, int16 value);
- void write_buffer (int dummy);
-
-! static boolean class_suitable (uint32 number_of_channels);
- };
- #endif // LINUX
-
-diff -c -r maplay/subband.h maplay.new/subband.h
-*** maplay/subband.h Thu Jun 23 12:14:40 1994
---- maplay.new/subband.h Tue Feb 14 07:52:58 1995
-***************
-*** 35,42 ****
- public:
- virtual void read_allocation (Ibitstream *, Header *, Crc16 *) = 0;
- virtual void read_scalefactor (Ibitstream *, Header *) = 0;
-! virtual bool read_sampledata (Ibitstream *) = 0;
-! virtual bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *) = 0;
- };
-
- #endif
---- 35,42 ----
- public:
- virtual void read_allocation (Ibitstream *, Header *, Crc16 *) = 0;
- virtual void read_scalefactor (Ibitstream *, Header *) = 0;
-! virtual boolean read_sampledata (Ibitstream *) = 0;
-! virtual boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *) = 0;
- };
-
- #endif
-diff -c -r maplay/subband_layer_1.cc maplay.new/subband_layer_1.cc
-*** maplay/subband_layer_1.cc Thu Jun 23 12:14:36 1994
---- maplay.new/subband_layer_1.cc Tue Feb 14 07:52:57 1995
-***************
-*** 86,92 ****
- }
-
-
-! bool SubbandLayer1::read_sampledata (Ibitstream *stream)
- {
- if (allocation)
- {
---- 86,92 ----
- }
-
-
-! boolean SubbandLayer1::read_sampledata (Ibitstream *stream)
- {
- if (allocation)
- {
-***************
-*** 105,111 ****
- }
-
-
-! bool SubbandLayer1::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *)
- {
- if (allocation && channels != right)
---- 105,111 ----
- }
-
-
-! boolean SubbandLayer1::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *)
- {
- if (allocation && channels != right)
-***************
-*** 142,148 ****
- }
-
-
-! bool SubbandLayer1IntensityStereo::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *filter2)
- {
- if (allocation)
---- 142,148 ----
- }
-
-
-! boolean SubbandLayer1IntensityStereo::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *filter2)
- {
- if (allocation)
-***************
-*** 231,239 ****
- }
-
-
-! bool SubbandLayer1Stereo::read_sampledata (Ibitstream *stream)
- {
-! bool returnvalue = SubbandLayer1::read_sampledata (stream);
- if (channel2_allocation)
- {
- channel2_sample = real (stream->get_bits (channel2_samplelength));
---- 231,239 ----
- }
-
-
-! boolean SubbandLayer1Stereo::read_sampledata (Ibitstream *stream)
- {
-! boolean returnvalue = SubbandLayer1::read_sampledata (stream);
- if (channel2_allocation)
- {
- channel2_sample = real (stream->get_bits (channel2_samplelength));
-***************
-*** 246,252 ****
- }
-
-
-! bool SubbandLayer1Stereo::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *filter2)
- {
- SubbandLayer1::put_next_sample (channels, filter1, filter2);
---- 246,252 ----
- }
-
-
-! boolean SubbandLayer1Stereo::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *filter2)
- {
- SubbandLayer1::put_next_sample (channels, filter1, filter2);
-diff -c -r maplay/subband_layer_1.h maplay.new/subband_layer_1.h
-*** maplay/subband_layer_1.h Thu Jun 23 12:14:40 1994
---- maplay.new/subband_layer_1.h Tue Feb 14 07:52:58 1995
-***************
-*** 42,49 ****
- SubbandLayer1 (uint32 subbandnumber);
- void read_allocation (Ibitstream *, Header *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! bool read_sampledata (Ibitstream *);
-! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
-
---- 42,49 ----
- SubbandLayer1 (uint32 subbandnumber);
- void read_allocation (Ibitstream *, Header *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! boolean read_sampledata (Ibitstream *);
-! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
-
-***************
-*** 60,70 ****
- SubbandLayer1::read_allocation (stream, header, crc);
- }
- void read_scalefactor (Ibitstream *, Header *);
-! bool read_sampledata (Ibitstream *stream)
- {
- return SubbandLayer1::read_sampledata (stream);
- }
-! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
-
---- 60,70 ----
- SubbandLayer1::read_allocation (stream, header, crc);
- }
- void read_scalefactor (Ibitstream *, Header *);
-! boolean read_sampledata (Ibitstream *stream)
- {
- return SubbandLayer1::read_sampledata (stream);
- }
-! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
-
-***************
-*** 82,89 ****
- SubbandLayer1Stereo (uint32 subbandnumber);
- void read_allocation (Ibitstream *, Header *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! bool read_sampledata (Ibitstream *);
-! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
- #endif
---- 82,89 ----
- SubbandLayer1Stereo (uint32 subbandnumber);
- void read_allocation (Ibitstream *, Header *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! boolean read_sampledata (Ibitstream *);
-! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
- #endif
-diff -c -r maplay/subband_layer_2.cc maplay.new/subband_layer_2.cc
-*** maplay/subband_layer_2.cc Thu Jun 23 12:14:36 1994
---- maplay.new/subband_layer_2.cc Tue Feb 14 07:52:57 1995
-***************
-*** 591,597 ****
- }
-
-
-! bool SubbandLayer2::read_sampledata (Ibitstream *stream)
- {
- if (allocation)
- if (groupingtable)
---- 591,597 ----
- }
-
-
-! boolean SubbandLayer2::read_sampledata (Ibitstream *stream)
- {
- if (allocation)
- if (groupingtable)
-***************
-*** 633,639 ****
- }
-
-
-! bool SubbandLayer2::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *)
- {
- #ifdef DEBUG
---- 633,639 ----
- }
-
-
-! boolean SubbandLayer2::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *)
- {
- #ifdef DEBUG
-***************
-*** 726,732 ****
- }
-
-
-! bool SubbandLayer2IntensityStereo::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *filter2)
- {
- #ifdef DEBUG
---- 726,732 ----
- }
-
-
-! boolean SubbandLayer2IntensityStereo::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *filter2)
- {
- #ifdef DEBUG
-***************
-*** 880,888 ****
- }
-
-
-! bool SubbandLayer2Stereo::read_sampledata (Ibitstream *stream)
- {
-! bool returnvalue = SubbandLayer2::read_sampledata (stream);
-
- if (channel2_allocation)
- if (channel2_groupingtable)
---- 880,888 ----
- }
-
-
-! boolean SubbandLayer2Stereo::read_sampledata (Ibitstream *stream)
- {
-! boolean returnvalue = SubbandLayer2::read_sampledata (stream);
-
- if (channel2_allocation)
- if (channel2_groupingtable)
-***************
-*** 919,928 ****
- }
-
-
-! bool SubbandLayer2Stereo::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *filter2)
- {
-! bool returnvalue = SubbandLayer2::put_next_sample (channels, filter1, filter2);
- if (channel2_allocation && channels != left)
- {
- register real sample = channel2_samples[samplenumber - 1];
---- 919,928 ----
- }
-
-
-! boolean SubbandLayer2Stereo::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *filter2)
- {
-! boolean returnvalue = SubbandLayer2::put_next_sample (channels, filter1, filter2);
- if (channel2_allocation && channels != left)
- {
- register real sample = channel2_samples[samplenumber - 1];
-diff -c -r maplay/subband_layer_2.h maplay.new/subband_layer_2.h
-*** maplay/subband_layer_2.h Thu Jun 23 12:14:40 1994
---- maplay.new/subband_layer_2.h Tue Feb 14 07:52:58 1995
-***************
-*** 55,62 ****
- void read_allocation (Ibitstream *, Header *, Crc16 *);
- virtual void read_scalefactor_selection (Ibitstream *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! bool read_sampledata (Ibitstream *);
-! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter * = NULL);
- };
-
-
---- 55,62 ----
- void read_allocation (Ibitstream *, Header *, Crc16 *);
- virtual void read_scalefactor_selection (Ibitstream *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! boolean read_sampledata (Ibitstream *);
-! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter * = NULL);
- };
-
-
-***************
-*** 75,85 ****
- }
- void read_scalefactor_selection (Ibitstream *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! bool read_sampledata (Ibitstream *stream)
- {
- return SubbandLayer2::read_sampledata (stream);
- }
-! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
-
---- 75,85 ----
- }
- void read_scalefactor_selection (Ibitstream *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! boolean read_sampledata (Ibitstream *stream)
- {
- return SubbandLayer2::read_sampledata (stream);
- }
-! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
-
-***************
-*** 90,96 ****
- uint32 channel2_allocation;
- uint32 channel2_scfsi;
- real channel2_scalefactor1, channel2_scalefactor2, channel2_scalefactor3;
-! bool channel2_grouping;
- uint32 channel2_codelength;
- const real *channel2_groupingtable;
- real channel2_factor;
---- 90,96 ----
- uint32 channel2_allocation;
- uint32 channel2_scfsi;
- real channel2_scalefactor1, channel2_scalefactor2, channel2_scalefactor3;
-! boolean channel2_grouping;
- uint32 channel2_codelength;
- const real *channel2_groupingtable;
- real channel2_factor;
-***************
-*** 102,109 ****
- void read_allocation (Ibitstream *, Header *, Crc16 *);
- void read_scalefactor_selection (Ibitstream *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! bool read_sampledata (Ibitstream *);
-! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
- #endif
---- 102,109 ----
- void read_allocation (Ibitstream *, Header *, Crc16 *);
- void read_scalefactor_selection (Ibitstream *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! boolean read_sampledata (Ibitstream *);
-! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
- #endif
+--- Makefile 2002/06/27 15:41:29 1.1
++++ Makefile 2002/06/27 15:41:40
+@@ -39,7 +39,7 @@
+
+ .SUFFIXES: .cc
+
+-install:
++pre-install:
+ @./configuration.sh
+
+ all: maplay
+@@ -47,6 +47,9 @@
+ maplay: $(OBJS)
+ $(COMPILER) $(CFLAGS) $(OBJS) -o $@ $(LIBRARIES) -lm
+ -strip $@
++
++install: all
++ ${INSTALL} -s -c -m 755 maplay ${PREFIX}/bin
+
+ .cc.o:
+ $(COMPILER) -c $(CFLAGS) $(INCLUDEDIRS) $*.cc -o $@
diff --git a/audio/maplay/patches/patch-ab b/audio/maplay/patches/patch-ab
index 24a41d63c16..fe6e6236cd6 100644
--- a/audio/maplay/patches/patch-ab
+++ b/audio/maplay/patches/patch-ab
@@ -1,33 +1,13 @@
-$NetBSD: patch-ab,v 1.2 1998/08/07 10:35:56 agc Exp $
+$NetBSD: patch-ab,v 1.3 2002/06/27 15:52:13 agc Exp $
-*** work/Makefile.orig Tue Feb 14 08:18:41 1995
---- work/Makefile Tue Feb 14 08:19:52 1995
-***************
-*** 39,45 ****
-
- .SUFFIXES: .cc
-
-! install:
- @./configuration.sh
-
- all: maplay
---- 39,45 ----
-
- .SUFFIXES: .cc
-
-! pre-install:
- @./configuration.sh
-
- all: maplay
-***************
-*** 47,52 ****
---- 47,55 ----
- maplay: $(OBJS)
- $(COMPILER) $(CFLAGS) $(OBJS) -o $@ $(LIBRARIES) -lm
- -strip $@
-+
-+ install: all
-+ ${INSTALL} -s -c -m 755 maplay ${PREFIX}/bin
-
- .cc.o:
- $(COMPILER) -c $(CFLAGS) $(INCLUDEDIRS) $*.cc -o $@
+--- all.h 2002/06/27 15:41:04 1.1
++++ all.h 2002/06/27 15:41:40
+@@ -22,7 +22,7 @@
+ #define ALL_H
+
+ typedef float real; // float should be enough
+-typedef short bool;
++typedef short boolean;
+ typedef unsigned uint32; // 32 Bit unsigned integer
+ // some compilers may need "typedef unsigned long uint32" instead
+ typedef int int32; // 32 Bit signed integer
diff --git a/audio/maplay/patches/patch-ac b/audio/maplay/patches/patch-ac
index 3c6d3161a50..c315c1fd77b 100644
--- a/audio/maplay/patches/patch-ac
+++ b/audio/maplay/patches/patch-ac
@@ -1,24 +1,23 @@
-$NetBSD: patch-ac,v 1.2 1998/08/07 10:35:57 agc Exp $
+$NetBSD: patch-ac,v 1.3 2002/06/27 15:52:13 agc Exp $
-*** obuffer.cc.orig Thu Jun 23 05:14:36 1994
---- obuffer.cc Tue Feb 14 04:17:17 1995
-***************
-*** 537,542 ****
---- 537,543 ----
- }
-
- // turn NDELAY mode off:
-+ #ifndef __FreeBSD__ /* Our /dev/audio doesn't like non-blocking I/O */
- int flags;
- if ((flags = fcntl (fd, F_GETFL, 0)) < 0)
- {
-***************
-*** 549,554 ****
---- 550,556 ----
- perror ("fcntl F_SETFL on /dev/audio failed");
- exit (1);
- }
-+ #endif
- return fd;
- }
-
+--- configuration.sh 2002/06/27 15:41:04 1.1
++++ configuration.sh 2002/06/27 15:41:40
+@@ -72,6 +72,18 @@
+ INCLUDEDIRS=
+ LIBRARIES=
+ AUDIO_INCLUDES='#include <sys/audioio.h>' ;;
++ NetBSD*)
++ COMPILER=g++
++ COMPILERFLAGS='-O2 -DNETBSD'
++ INCLUDEDIRS=
++ LIBRARIES=
++ AUDIO_INCLUDES='#include <sys/audioio.h>' ;;
++ FreeBSD*)
++ COMPILER=g++
++ COMPILERFLAGS='-O2 -m486 -DLINUX -DDAMN_INTEL_BYTE_ORDER'
++ INCLUDEDIRS=
++ LIBRARIES=
++ AUDIO_INCLUDES='#include <machine/soundcard.h>' ;;
+ Linux*)
+ COMPILER=g++
+ COMPILERFLAGS='-O2 -m486 -funroll-loops -DLINUX -DDAMN_INTEL_BYTE_ORDER'
diff --git a/audio/maplay/patches/patch-ad b/audio/maplay/patches/patch-ad
index e6474662321..347b3bd8269 100644
--- a/audio/maplay/patches/patch-ad
+++ b/audio/maplay/patches/patch-ad
@@ -1,24 +1,16 @@
-$NetBSD: patch-ad,v 1.3 1998/08/07 10:35:57 agc Exp $
+$NetBSD: patch-ad,v 1.4 2002/06/27 15:52:14 agc Exp $
-diff -u ../work/configuration.sh ./configuration.sh
---- ../work/configuration.sh Sun Oct 26 12:31:52 1997
-+++ ./configuration.sh Sun Oct 26 12:19:41 1997
-@@ -72,6 +72,12 @@
- INCLUDEDIRS=
- LIBRARIES=
- AUDIO_INCLUDES='#include <sys/audioio.h>' ;;
-+ NetBSD*)
-+ COMPILER=g++
-+ COMPILERFLAGS='-O2 -DNETBSD'
-+ INCLUDEDIRS=
-+ LIBRARIES=
-+ AUDIO_INCLUDES='#include <sys/audioio.h>' ;;
- FreeBSD*)
- COMPILER=g++
- COMPILERFLAGS='-O2 -m486 -DLINUX -DDAMN_INTEL_BYTE_ORDER'
-diff -u ../work/header.cc ./header.cc
---- ../work/header.cc Sun Oct 26 12:31:52 1997
-+++ ./header.cc Sun Oct 26 12:25:28 1997
+--- header.cc 2002/06/27 15:41:04 1.1
++++ header.cc 2002/06/27 15:44:28
+@@ -36,7 +36,7 @@
+ const uint32 Header::frequencies[3] = { 44100, 48000, 32000 };
+
+
+-bool Header::read_header (Ibitstream *stream, Crc16 **crcp)
++boolean Header::read_header (Ibitstream *stream, Crc16 **crcp)
+ {
+ uint32 headerstring;
+
@@ -48,8 +48,8 @@
cerr << "invalid syncword 0x";
cerr.width (8);
@@ -30,202 +22,12 @@ diff -u ../work/header.cc ./header.cc
<< lseek (stream->filedescriptor (), 0, SEEK_CUR) - 4 << '\n';
return False;
}
-diff -u ../work/ibitstream.cc ./ibitstream.cc
---- ../work/ibitstream.cc Sun Oct 26 12:31:52 1997
-+++ ./ibitstream.cc Sun Oct 26 12:17:22 1997
-@@ -33,6 +33,12 @@
- #include "all.h"
- #include "ibitstream.h"
-
-+#ifdef NETBSD
-+#include <machine/endian.h>
-+#if BYTE_ORDER == LITTLE_ENDIAN
-+#define DAMN_INTEL_BYTE_ORDER
-+#endif
-+#endif
-
- #define swap_int32(int_32) (((int_32) << 24) | (((int_32) << 8) & 0x00ff0000) | \
- (((int_32) >> 8) & 0x0000ff00) | ((int_32) >> 24))
-diff -u ../work/maplay.cc ./maplay.cc
---- ../work/maplay.cc Sun Oct 26 12:31:52 1997
-+++ ./maplay.cc Sun Oct 26 12:18:30 1997
-@@ -323,6 +323,17 @@
- Exit (0);
- }
- #else
-+#ifdef NETBSD
-+ {
-+ if (NetBSDObuffer::class_suitable (mode == single_channel || which_channels != both) ? 1 : 2)
-+ if (mode == single_channel || which_channels != both)
-+ buffer = new NetBSDObuffer (1, header);
-+ else
-+ buffer = new NetBSDObuffer (2, header);
-+ else
-+ Exit (0);
-+ }
-+#else
- //#ifdef your_machine
- // {
- // if (mode == single_channel || which_channels != both)
-@@ -337,6 +348,7 @@
- Exit (0);
- }
- //#endif // !your_machine
-+#endif // !NETBSD
- #endif // !LINUX
- #endif // !SPARC
- #endif // !Indigo
-diff -u ../work/obuffer.cc ./obuffer.cc
---- ../work/obuffer.cc Sun Oct 26 12:31:52 1997
-+++ ./obuffer.cc Sun Oct 26 12:32:53 1997
-@@ -639,3 +639,122 @@
- }
-
- #endif /* LINUX */
-+
-+#ifdef NETBSD
-+int NetBSDObuffer::audio_fd = -1;
-+
-+int NetBSDObuffer::open_audio_device (void)
-+{
-+ int fd;
-+
-+ if ((fd = open ("/dev/audio", O_WRONLY | O_NDELAY, 0)) < 0)
-+ if (errno == EBUSY)
-+ {
-+ cerr << "Sorry, the audio device is busy!\n";
-+ exit (1);
-+ }
-+ else
-+ {
-+ perror ("can't open /dev/audio for writing");
-+ exit (1);
-+ }
-+
-+ int flags;
-+ if ((flags = fcntl (fd, F_GETFL, 0)) < 0)
-+ {
-+ perror ("fcntl F_GETFL on /dev/audio failed");
-+ exit (1);
-+ }
-+ flags &= ~O_NDELAY;
-+ if (fcntl (fd, F_SETFL, flags) < 0)
-+ {
-+ perror ("fcntl F_SETFL on /dev/audio failed");
-+ exit (1);
-+ }
-+ return fd;
-+}
-+
-+
-+NetBSDObuffer::NetBSDObuffer (uint32 number_of_channels, Header *header)
-+{
-+#ifdef DEBUG
-+ if (!number_of_channels || number_of_channels > MAXCHANNELS)
-+ {
-+ cerr << "NetBSDObuffer: 0 < number of channels < " << MAXCHANNELS << "!\n";
-+ exit (1);
-+ }
-+#endif
-+ channels = number_of_channels;
-+ for (int i = 0; i < number_of_channels; ++i)
-+ bufferp[i] = buffer + i;
-+
-+ if (audio_fd < 0)
-+ {
-+ cerr << "Internal error, NetBSDObuffer::audio_fd has to be initialized\n"
-+ "by NetBSDObuffer::class_suitable()!\n";
-+ exit (1);
-+ }
-+
-+ audio_info info;
-+ AUDIO_INITINFO(&info);
-+
-+ // configure the device:
-+ info.play.encoding = AUDIO_ENCODING_SLINEAR;
-+ info.play.precision = 16;
-+ info.play.channels = channels;
-+ info.play.sample_rate = header->frequency ();
-+
-+ if (ioctl (audio_fd, AUDIO_SETINFO, &info))
-+ {
-+ perror ("configuration of /dev/audio failed");
-+ exit (1);
-+ }
-+}
-+
-+
-+NetBSDObuffer::~NetBSDObuffer (void)
-+{
-+ close (audio_fd);
-+}
-+
-+
-+void NetBSDObuffer::append (uint32 channel, int16 value)
-+{
-+#ifdef DEBUG
-+ if (channel >= channels)
-+ {
-+ cerr << "illegal channelnumber in NetBSDObuffer::append()!\n";
-+ exit (1);
-+ }
-+ if (bufferp[channel] - buffer >= OBUFFERSIZE)
-+ {
-+ cerr << "buffer overflow!\n";
-+ exit (1);
-+ }
-+#endif
-+ *bufferp[channel] = value;
-+ bufferp[channel] += channels;
-+}
-+
-+
-+void NetBSDObuffer::write_buffer (int)
-+{
-+ int length = (int)((char *)bufferp[0] - (char *)buffer);
-+ if (write (audio_fd, buffer, length) != length)
-+ {
-+ perror ("write to /dev/audio failed");
-+ exit (1);
-+ }
-+ for (int i = 0; i < channels; ++i)
-+ bufferp[i] = buffer + i;
-+}
-+
-+
-+boolean NetBSDObuffer::class_suitable (uint32 number_of_channels)
-+{
-+ // open the dsp audio device:
-+ audio_fd = open_audio_device ();
-+ return True;
-+}
-+
-+#endif /* NETBSD */
-diff -u ../work/obuffer.h ./obuffer.h
---- ../work/obuffer.h Sun Oct 26 12:31:52 1997
-+++ ./obuffer.h Sun Oct 26 12:19:16 1997
-@@ -163,4 +163,24 @@
- };
- #endif // LINUX
+@@ -161,7 +161,7 @@
+ static const int32 bitrates_layer_2[15] = {
+ 0 /*free format*/, 32000, 48000, 56000, 64000, 80000, 96000,
+ 112000, 128000, 160000, 192000, 224000, 256000, 320000, 384000 };
+- static const samplefrequencies[3] = { 44100, 48000, 32000 };
++ static const int32 samplefrequencies[3] = { 44100, 48000, 32000 };
+ uint32 framesize;
-+#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
-+
- #endif
+ if (h_layer == 1)
diff --git a/audio/maplay/patches/patch-ae b/audio/maplay/patches/patch-ae
new file mode 100644
index 00000000000..074accdf46a
--- /dev/null
+++ b/audio/maplay/patches/patch-ae
@@ -0,0 +1,38 @@
+$NetBSD: patch-ae,v 1.1 2002/06/27 15:52:15 agc Exp $
+
+--- header.h 2002/06/27 15:41:04 1.1
++++ header.h 2002/06/27 15:41:40
+@@ -39,7 +39,7 @@
+ e_mode h_mode;
+ e_sample_frequency h_sample_frequency;
+ uint32 h_number_of_subbands, h_intensity_stereo_bound;
+- bool h_copyright, h_original;
++ boolean h_copyright, h_original;
+ Crc16 *crc;
+ uint16 checksum;
+
+@@ -48,7 +48,7 @@
+ public:
+ Header (void) { crc = (Crc16 *)0; }
+ ~Header (void) { if (crc) delete crc; }
+- bool read_header (Ibitstream *, Crc16 **);
++ boolean read_header (Ibitstream *, Crc16 **);
+ // read a 32-bit header from the bitstream
+
+ // functions to query header contents:
+@@ -58,11 +58,11 @@
+ uint32 frequency (void) { return frequencies[h_sample_frequency]; }
+ static uint32 frequency (e_sample_frequency rate) { return frequencies[rate]; }
+ e_mode mode (void) { return h_mode; };
+- bool checksums (void) { return !h_protection_bit; }
+- bool copyright (void) { return h_copyright; }
+- bool original (void) { return h_original; }
++ boolean checksums (void) { return !h_protection_bit; }
++ boolean copyright (void) { return h_copyright; }
++ boolean original (void) { return h_original; }
+
+- bool checksum_ok (void) { return checksum == crc->checksum (); }
++ boolean checksum_ok (void) { return checksum == crc->checksum (); }
+ // compares computed checksum with stream checksum
+
+ // functions which return header informations as strings:
diff --git a/audio/maplay/patches/patch-af b/audio/maplay/patches/patch-af
new file mode 100644
index 00000000000..214365f126b
--- /dev/null
+++ b/audio/maplay/patches/patch-af
@@ -0,0 +1,35 @@
+$NetBSD: patch-af,v 1.1 2002/06/27 15:52:16 agc Exp $
+
+--- ibitstream.cc 2002/06/27 15:41:04 1.1
++++ ibitstream.cc 2002/06/27 15:41:40
+@@ -33,6 +33,12 @@
+ #include "all.h"
+ #include "ibitstream.h"
+
++#ifdef NETBSD
++#include <machine/endian.h>
++#if BYTE_ORDER == LITTLE_ENDIAN
++#define DAMN_INTEL_BYTE_ORDER
++#endif
++#endif
+
+ #define swap_int32(int_32) (((int_32) << 24) | (((int_32) << 8) & 0x00ff0000) | \
+ (((int_32) >> 8) & 0x0000ff00) | ((int_32) >> 24))
+@@ -64,7 +70,7 @@
+ }
+
+
+-bool Ibitstream::get_header (uint32 *headerstring)
++boolean Ibitstream::get_header (uint32 *headerstring)
+ {
+ int readvalue;
+
+@@ -102,7 +108,7 @@
+ }
+
+
+-bool Ibitstream::read_frame (uint32 bytesize)
++boolean Ibitstream::read_frame (uint32 bytesize)
+ {
+ int readvalue;
+
diff --git a/audio/maplay/patches/patch-ag b/audio/maplay/patches/patch-ag
new file mode 100644
index 00000000000..7dcf759c2e4
--- /dev/null
+++ b/audio/maplay/patches/patch-ag
@@ -0,0 +1,17 @@
+$NetBSD: patch-ag,v 1.1 2002/06/27 15:52:17 agc Exp $
+
+--- ibitstream.h 2002/06/27 15:41:04 1.1
++++ ibitstream.h 2002/06/27 15:41:40
+@@ -43,10 +43,10 @@
+ ~Ibitstream (void);
+ int filedescriptor (void) { return fd; };
+
+- bool get_header (uint32 *);
++ boolean get_header (uint32 *);
+ // get next 32 bits from bitstream in an unsigned int,
+ // returned value False => end of stream
+- bool read_frame (uint32 bytesize);
++ boolean read_frame (uint32 bytesize);
+ // fill buffer with data from bitstream, returned value False => end of stream
+ uint32 get_bits (uint32 number_of_bits);
+ // read bits (1 <= number_of_bits <= 16) from buffer into the lower bits
diff --git a/audio/maplay/patches/patch-ah b/audio/maplay/patches/patch-ah
new file mode 100644
index 00000000000..4bbf4978a40
--- /dev/null
+++ b/audio/maplay/patches/patch-ah
@@ -0,0 +1,77 @@
+$NetBSD: patch-ah,v 1.1 2002/06/27 15:52:18 agc Exp $
+
+--- maplay.cc 2002/06/27 15:41:04 1.1
++++ maplay.cc 2002/06/27 15:41:40
+@@ -54,14 +54,14 @@
+
+ // data extracted from commandline arguments:
+ static char *filename;
+-static bool verbose_mode = False, filter_check = False;
+-static bool stdout_mode = False;
++static boolean verbose_mode = False, filter_check = False;
++static boolean stdout_mode = False;
+ static enum e_channels which_channels = both;
+-static bool use_speaker = False, use_headphone = False, use_line_out = False;
++static boolean use_speaker = False, use_headphone = False, use_line_out = False;
+ #ifdef ULAW
+-static bool force_amd = False;
++static boolean force_amd = False;
+ #endif
+-static bool use_own_scalefactor = False;
++static boolean use_own_scalefactor = False;
+ static real scalefactor;
+
+ // data extracted from header of first frame:
+@@ -93,7 +93,7 @@
+ main (int argc, char *argv[])
+ {
+ int i;
+- bool read_ready = False, write_ready = False;
++ boolean read_ready = False, write_ready = False;
+
+ if (argc < 2 || !strncmp (argv[1], "-h", 2))
+ {
+@@ -146,6 +146,9 @@
+ #ifdef Solaris
+ "SPARC Solaris 2.x"
+ #else
++#ifdef __FreeBSD__
++ "FreeBSD"
++#else
+ #ifdef LINUX
+ "Linux"
+ #else
+@@ -159,6 +162,7 @@
+ #endif
+ #endif
+ #endif
++#endif
+ " version)\n"
+ "@(#) Copyright (C) 1993, 1994 Tobias Bading (bading@cs.tu-berlin.de)\n"
+ "@(#) Berlin University of Technology\n"
+@@ -319,6 +323,17 @@
+ Exit (0);
+ }
+ #else
++#ifdef NETBSD
++ {
++ if (NetBSDObuffer::class_suitable (mode == single_channel || which_channels != both) ? 1 : 2)
++ if (mode == single_channel || which_channels != both)
++ buffer = new NetBSDObuffer (1, header);
++ else
++ buffer = new NetBSDObuffer (2, header);
++ else
++ Exit (0);
++ }
++#else
+ //#ifdef your_machine
+ // {
+ // if (mode == single_channel || which_channels != both)
+@@ -333,6 +348,7 @@
+ Exit (0);
+ }
+ //#endif // !your_machine
++#endif // !NETBSD
+ #endif // !LINUX
+ #endif // !SPARC
+ #endif // !Indigo
diff --git a/audio/maplay/patches/patch-ai b/audio/maplay/patches/patch-ai
new file mode 100644
index 00000000000..f013e2a2b2f
--- /dev/null
+++ b/audio/maplay/patches/patch-ai
@@ -0,0 +1,177 @@
+$NetBSD: patch-ai,v 1.1 2002/06/27 15:52:19 agc Exp $
+
+--- obuffer.cc 2002/06/27 15:41:04 1.1
++++ obuffer.cc 2002/06/27 15:41:40
+@@ -217,10 +217,10 @@
+ int SparcObuffer::audio_fd = -1;
+
+ #ifdef ULAW
+-SparcObuffer::SparcObuffer (Header *header, bool use_speaker, bool use_headphone, bool use_line_out)
++SparcObuffer::SparcObuffer (Header *header, boolean use_speaker, boolean use_headphone, boolean use_line_out)
+ #else
+ SparcObuffer::SparcObuffer (uint32 number_of_channels, Header *header,
+- bool use_speaker, bool use_headphone, bool use_line_out)
++ boolean use_speaker, boolean use_headphone, boolean use_line_out)
+ #endif
+ {
+ #ifndef ULAW
+@@ -406,9 +406,9 @@
+
+
+ #ifdef ULAW
+-bool SparcObuffer::class_suitable (uint32 number_of_channels, bool force_amd)
++boolean SparcObuffer::class_suitable (uint32 number_of_channels, boolean force_amd)
+ #else
+-bool SparcObuffer::class_suitable (void)
++boolean SparcObuffer::class_suitable (void)
+ #endif
+ {
+ #ifdef ULAW
+@@ -537,6 +537,7 @@
+ }
+
+ // turn NDELAY mode off:
++#ifndef __FreeBSD__ /* Our /dev/audio doesn't like non-blocking I/O */
+ int flags;
+ if ((flags = fcntl (fd, F_GETFL, 0)) < 0)
+ {
+@@ -549,6 +550,7 @@
+ perror ("fcntl F_SETFL on /dev/audio failed");
+ exit (1);
+ }
++#endif
+ return fd;
+ }
+
+@@ -629,7 +631,7 @@
+ }
+
+
+-bool LinuxObuffer::class_suitable (uint32 number_of_channels)
++boolean LinuxObuffer::class_suitable (uint32 number_of_channels)
+ {
+ // open the dsp audio device:
+ audio_fd = open_audio_device ();
+@@ -637,3 +639,122 @@
+ }
+
+ #endif /* LINUX */
++
++#ifdef NETBSD
++int NetBSDObuffer::audio_fd = -1;
++
++int NetBSDObuffer::open_audio_device (void)
++{
++ int fd;
++
++ if ((fd = open ("/dev/audio", O_WRONLY | O_NDELAY, 0)) < 0)
++ if (errno == EBUSY)
++ {
++ cerr << "Sorry, the audio device is busy!\n";
++ exit (1);
++ }
++ else
++ {
++ perror ("can't open /dev/audio for writing");
++ exit (1);
++ }
++
++ int flags;
++ if ((flags = fcntl (fd, F_GETFL, 0)) < 0)
++ {
++ perror ("fcntl F_GETFL on /dev/audio failed");
++ exit (1);
++ }
++ flags &= ~O_NDELAY;
++ if (fcntl (fd, F_SETFL, flags) < 0)
++ {
++ perror ("fcntl F_SETFL on /dev/audio failed");
++ exit (1);
++ }
++ return fd;
++}
++
++
++NetBSDObuffer::NetBSDObuffer (uint32 number_of_channels, Header *header)
++{
++#ifdef DEBUG
++ if (!number_of_channels || number_of_channels > MAXCHANNELS)
++ {
++ cerr << "NetBSDObuffer: 0 < number of channels < " << MAXCHANNELS << "!\n";
++ exit (1);
++ }
++#endif
++ channels = number_of_channels;
++ for (int i = 0; i < number_of_channels; ++i)
++ bufferp[i] = buffer + i;
++
++ if (audio_fd < 0)
++ {
++ cerr << "Internal error, NetBSDObuffer::audio_fd has to be initialized\n"
++ "by NetBSDObuffer::class_suitable()!\n";
++ exit (1);
++ }
++
++ audio_info info;
++ AUDIO_INITINFO(&info);
++
++ // configure the device:
++ info.play.encoding = AUDIO_ENCODING_SLINEAR;
++ info.play.precision = 16;
++ info.play.channels = channels;
++ info.play.sample_rate = header->frequency ();
++
++ if (ioctl (audio_fd, AUDIO_SETINFO, &info))
++ {
++ perror ("configuration of /dev/audio failed");
++ exit (1);
++ }
++}
++
++
++NetBSDObuffer::~NetBSDObuffer (void)
++{
++ close (audio_fd);
++}
++
++
++void NetBSDObuffer::append (uint32 channel, int16 value)
++{
++#ifdef DEBUG
++ if (channel >= channels)
++ {
++ cerr << "illegal channelnumber in NetBSDObuffer::append()!\n";
++ exit (1);
++ }
++ if (bufferp[channel] - buffer >= OBUFFERSIZE)
++ {
++ cerr << "buffer overflow!\n";
++ exit (1);
++ }
++#endif
++ *bufferp[channel] = value;
++ bufferp[channel] += channels;
++}
++
++
++void NetBSDObuffer::write_buffer (int)
++{
++ int length = (int)((char *)bufferp[0] - (char *)buffer);
++ if (write (audio_fd, buffer, length) != length)
++ {
++ perror ("write to /dev/audio failed");
++ exit (1);
++ }
++ for (int i = 0; i < channels; ++i)
++ bufferp[i] = buffer + i;
++}
++
++
++boolean NetBSDObuffer::class_suitable (uint32 number_of_channels)
++{
++ // open the dsp audio device:
++ audio_fd = open_audio_device ();
++ return True;
++}
++
++#endif /* NETBSD */
diff --git a/audio/maplay/patches/patch-aj b/audio/maplay/patches/patch-aj
new file mode 100644
index 00000000000..cf9d0731cda
--- /dev/null
+++ b/audio/maplay/patches/patch-aj
@@ -0,0 +1,58 @@
+$NetBSD: patch-aj,v 1.1 2002/06/27 15:52:19 agc Exp $
+
+--- obuffer.h 2002/06/27 15:41:04 1.1
++++ obuffer.h 2002/06/27 15:41:40
+@@ -123,20 +123,20 @@
+
+ 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 @@
+ 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
+
diff --git a/audio/maplay/patches/patch-ak b/audio/maplay/patches/patch-ak
new file mode 100644
index 00000000000..10497f8826d
--- /dev/null
+++ b/audio/maplay/patches/patch-ak
@@ -0,0 +1,15 @@
+$NetBSD: patch-ak,v 1.1 2002/06/27 15:52:20 agc Exp $
+
+--- subband.h 2002/06/27 15:41:04 1.1
++++ subband.h 2002/06/27 15:41:40
+@@ -35,8 +35,8 @@
+ public:
+ virtual void read_allocation (Ibitstream *, Header *, Crc16 *) = 0;
+ virtual void read_scalefactor (Ibitstream *, Header *) = 0;
+- virtual bool read_sampledata (Ibitstream *) = 0;
+- virtual bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *) = 0;
++ virtual boolean read_sampledata (Ibitstream *) = 0;
++ virtual boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *) = 0;
+ };
+
+ #endif
diff --git a/audio/maplay/patches/patch-al b/audio/maplay/patches/patch-al
new file mode 100644
index 00000000000..efa9324de16
--- /dev/null
+++ b/audio/maplay/patches/patch-al
@@ -0,0 +1,52 @@
+$NetBSD: patch-al,v 1.1 2002/06/27 15:52:21 agc Exp $
+
+--- subband_layer_1.cc 2002/06/27 15:41:04 1.1
++++ subband_layer_1.cc 2002/06/27 15:41:40
+@@ -86,7 +86,7 @@
+ }
+
+
+-bool SubbandLayer1::read_sampledata (Ibitstream *stream)
++boolean SubbandLayer1::read_sampledata (Ibitstream *stream)
+ {
+ if (allocation)
+ {
+@@ -105,7 +105,7 @@
+ }
+
+
+-bool SubbandLayer1::put_next_sample (e_channels channels,
++boolean SubbandLayer1::put_next_sample (e_channels channels,
+ SynthesisFilter *filter1, SynthesisFilter *)
+ {
+ if (allocation && channels != right)
+@@ -142,7 +142,7 @@
+ }
+
+
+-bool SubbandLayer1IntensityStereo::put_next_sample (e_channels channels,
++boolean SubbandLayer1IntensityStereo::put_next_sample (e_channels channels,
+ SynthesisFilter *filter1, SynthesisFilter *filter2)
+ {
+ if (allocation)
+@@ -231,9 +231,9 @@
+ }
+
+
+-bool SubbandLayer1Stereo::read_sampledata (Ibitstream *stream)
++boolean SubbandLayer1Stereo::read_sampledata (Ibitstream *stream)
+ {
+- bool returnvalue = SubbandLayer1::read_sampledata (stream);
++ boolean returnvalue = SubbandLayer1::read_sampledata (stream);
+ if (channel2_allocation)
+ {
+ channel2_sample = real (stream->get_bits (channel2_samplelength));
+@@ -246,7 +246,7 @@
+ }
+
+
+-bool SubbandLayer1Stereo::put_next_sample (e_channels channels,
++boolean SubbandLayer1Stereo::put_next_sample (e_channels channels,
+ SynthesisFilter *filter1, SynthesisFilter *filter2)
+ {
+ SubbandLayer1::put_next_sample (channels, filter1, filter2);
diff --git a/audio/maplay/patches/patch-am b/audio/maplay/patches/patch-am
new file mode 100644
index 00000000000..5232529bb87
--- /dev/null
+++ b/audio/maplay/patches/patch-am
@@ -0,0 +1,40 @@
+$NetBSD: patch-am,v 1.1 2002/06/27 15:52:22 agc Exp $
+
+--- subband_layer_1.h 2002/06/27 15:41:04 1.1
++++ subband_layer_1.h 2002/06/27 15:41:40
+@@ -42,8 +42,8 @@
+ SubbandLayer1 (uint32 subbandnumber);
+ void read_allocation (Ibitstream *, Header *, Crc16 *);
+ void read_scalefactor (Ibitstream *, Header *);
+- bool read_sampledata (Ibitstream *);
+- bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
++ boolean read_sampledata (Ibitstream *);
++ boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
+ };
+
+
+@@ -60,11 +60,11 @@
+ SubbandLayer1::read_allocation (stream, header, crc);
+ }
+ void read_scalefactor (Ibitstream *, Header *);
+- bool read_sampledata (Ibitstream *stream)
++ boolean read_sampledata (Ibitstream *stream)
+ {
+ return SubbandLayer1::read_sampledata (stream);
+ }
+- bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
++ boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
+ };
+
+
+@@ -82,8 +82,8 @@
+ SubbandLayer1Stereo (uint32 subbandnumber);
+ void read_allocation (Ibitstream *, Header *, Crc16 *);
+ void read_scalefactor (Ibitstream *, Header *);
+- bool read_sampledata (Ibitstream *);
+- bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
++ boolean read_sampledata (Ibitstream *);
++ boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
+ };
+
+ #endif
diff --git a/audio/maplay/patches/patch-an b/audio/maplay/patches/patch-an
new file mode 100644
index 00000000000..c5f81c53400
--- /dev/null
+++ b/audio/maplay/patches/patch-an
@@ -0,0 +1,56 @@
+$NetBSD: patch-an,v 1.1 2002/06/27 15:52:23 agc Exp $
+
+--- subband_layer_2.cc 2002/06/27 15:41:04 1.1
++++ subband_layer_2.cc 2002/06/27 15:41:40
+@@ -591,7 +591,7 @@
+ }
+
+
+-bool SubbandLayer2::read_sampledata (Ibitstream *stream)
++boolean SubbandLayer2::read_sampledata (Ibitstream *stream)
+ {
+ if (allocation)
+ if (groupingtable)
+@@ -633,7 +633,7 @@
+ }
+
+
+-bool SubbandLayer2::put_next_sample (e_channels channels,
++boolean SubbandLayer2::put_next_sample (e_channels channels,
+ SynthesisFilter *filter1, SynthesisFilter *)
+ {
+ #ifdef DEBUG
+@@ -726,7 +726,7 @@
+ }
+
+
+-bool SubbandLayer2IntensityStereo::put_next_sample (e_channels channels,
++boolean SubbandLayer2IntensityStereo::put_next_sample (e_channels channels,
+ SynthesisFilter *filter1, SynthesisFilter *filter2)
+ {
+ #ifdef DEBUG
+@@ -880,9 +880,9 @@
+ }
+
+
+-bool SubbandLayer2Stereo::read_sampledata (Ibitstream *stream)
++boolean SubbandLayer2Stereo::read_sampledata (Ibitstream *stream)
+ {
+- bool returnvalue = SubbandLayer2::read_sampledata (stream);
++ boolean returnvalue = SubbandLayer2::read_sampledata (stream);
+
+ if (channel2_allocation)
+ if (channel2_groupingtable)
+@@ -919,10 +919,10 @@
+ }
+
+
+-bool SubbandLayer2Stereo::put_next_sample (e_channels channels,
++boolean SubbandLayer2Stereo::put_next_sample (e_channels channels,
+ SynthesisFilter *filter1, SynthesisFilter *filter2)
+ {
+- bool returnvalue = SubbandLayer2::put_next_sample (channels, filter1, filter2);
++ boolean returnvalue = SubbandLayer2::put_next_sample (channels, filter1, filter2);
+ if (channel2_allocation && channels != left)
+ {
+ register real sample = channel2_samples[samplenumber - 1];
diff --git a/audio/maplay/patches/patch-ao b/audio/maplay/patches/patch-ao
new file mode 100644
index 00000000000..cd96327c8ef
--- /dev/null
+++ b/audio/maplay/patches/patch-ao
@@ -0,0 +1,49 @@
+$NetBSD: patch-ao,v 1.1 2002/06/27 15:52:24 agc Exp $
+
+--- subband_layer_2.h 2002/06/27 15:41:04 1.1
++++ subband_layer_2.h 2002/06/27 15:41:40
+@@ -55,8 +55,8 @@
+ void read_allocation (Ibitstream *, Header *, Crc16 *);
+ virtual void read_scalefactor_selection (Ibitstream *, Crc16 *);
+ void read_scalefactor (Ibitstream *, Header *);
+- bool read_sampledata (Ibitstream *);
+- bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter * = NULL);
++ boolean read_sampledata (Ibitstream *);
++ boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter * = NULL);
+ };
+
+
+@@ -75,11 +75,11 @@
+ }
+ void read_scalefactor_selection (Ibitstream *, Crc16 *);
+ void read_scalefactor (Ibitstream *, Header *);
+- bool read_sampledata (Ibitstream *stream)
++ boolean read_sampledata (Ibitstream *stream)
+ {
+ return SubbandLayer2::read_sampledata (stream);
+ }
+- bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
++ boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
+ };
+
+
+@@ -90,7 +90,7 @@
+ uint32 channel2_allocation;
+ uint32 channel2_scfsi;
+ real channel2_scalefactor1, channel2_scalefactor2, channel2_scalefactor3;
+- bool channel2_grouping;
++ boolean channel2_grouping;
+ uint32 channel2_codelength;
+ const real *channel2_groupingtable;
+ real channel2_factor;
+@@ -102,8 +102,8 @@
+ void read_allocation (Ibitstream *, Header *, Crc16 *);
+ void read_scalefactor_selection (Ibitstream *, Crc16 *);
+ void read_scalefactor (Ibitstream *, Header *);
+- bool read_sampledata (Ibitstream *);
+- bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
++ boolean read_sampledata (Ibitstream *);
++ boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
+ };
+
+ #endif