pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
spiralsynth: Test with FLTK 1.4
Module Name: pkgsrc-wip
Committed By: Michael Baeuerle <micha%NetBSD.org@localhost>
Pushed By: micha
Date: Fri Jan 24 15:45:34 2025 +0100
Changeset: 8ce80985ea8ceb20668bdefbe28a6db42eef6a35
Modified Files:
Makefile
Added Files:
spiralsynth/COMMIT_MSG
spiralsynth/DESCR
spiralsynth/Makefile
spiralsynth/PLIST
spiralsynth/distinfo
spiralsynth/patches/patch-GUI_OutputGUI.C
spiralsynth/patches/patch-SpiralSound_Midi.C
spiralsynth/patches/patch-aa
spiralsynth/patches/patch-ab
spiralsynth/patches/patch-ad
spiralsynth/patches/patch-ae
spiralsynth/patches/patch-af
spiralsynth/patches/patch-ah
spiralsynth/patches/patch-ai
spiralsynth/patches/patch-aj
spiralsynth/patches/patch-ak
spiralsynth/patches/patch-al
spiralsynth/patches/patch-am
spiralsynth/patches/patch-ao
spiralsynth/patches/patch-ar
Log Message:
spiralsynth: Test with FLTK 1.4
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8ce80985ea8ceb20668bdefbe28a6db42eef6a35
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
spiralsynth/COMMIT_MSG | 4 ++
spiralsynth/DESCR | 6 +++
spiralsynth/Makefile | 35 +++++++++++++++
spiralsynth/PLIST | 4 ++
spiralsynth/distinfo | 20 +++++++++
spiralsynth/patches/patch-GUI_OutputGUI.C | 24 ++++++++++
spiralsynth/patches/patch-SpiralSound_Midi.C | 66 ++++++++++++++++++++++++++++
spiralsynth/patches/patch-aa | 22 ++++++++++
spiralsynth/patches/patch-ab | 30 +++++++++++++
spiralsynth/patches/patch-ad | 25 +++++++++++
spiralsynth/patches/patch-ae | 15 +++++++
spiralsynth/patches/patch-af | 22 ++++++++++
spiralsynth/patches/patch-ah | 13 ++++++
spiralsynth/patches/patch-ai | 13 ++++++
spiralsynth/patches/patch-aj | 13 ++++++
spiralsynth/patches/patch-ak | 14 ++++++
spiralsynth/patches/patch-al | 12 +++++
spiralsynth/patches/patch-am | 44 +++++++++++++++++++
spiralsynth/patches/patch-ao | 12 +++++
spiralsynth/patches/patch-ar | 48 ++++++++++++++++++++
21 files changed, 443 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index b9fa72d64f..1dfe47b8f6 100644
--- a/Makefile
+++ b/Makefile
@@ -5382,6 +5382,7 @@ SUBDIR+= spice-vdagent
SUBDIR+= spid-compliant-certificates
SUBDIR+= spidermonkey24
SUBDIR+= spidermonkey31
+SUBDIR+= spiralsynth
SUBDIR+= spirv-tools
SUBDIR+= splix
SUBDIR+= spot
diff --git a/spiralsynth/COMMIT_MSG b/spiralsynth/COMMIT_MSG
new file mode 100644
index 0000000000..eceb9dbc31
--- /dev/null
+++ b/spiralsynth/COMMIT_MSG
@@ -0,0 +1,4 @@
+wm/spiralsynth: Patch to work with FLTK 1.4.
+
+- Modified two patches to include C++ headers with ".H" extension
+ (instead of ".h")
diff --git a/spiralsynth/DESCR b/spiralsynth/DESCR
new file mode 100644
index 0000000000..13428e2e94
--- /dev/null
+++ b/spiralsynth/DESCR
@@ -0,0 +1,6 @@
+Spiral Synth is a physically modelled polyphonic analogue synthesizer for
+Linux or BSD. It is capable of creating the kind of sounds made by
+hardware analogue synths, the noises used in electronic music. You can
+also use it to make stranger sounds too. Midi is supported, including
+velocity detection, mapped to the volume of the oscillators (But you can
+also use the PC keyboard to play the synth).
diff --git a/spiralsynth/Makefile b/spiralsynth/Makefile
new file mode 100644
index 0000000000..61ff5d83f5
--- /dev/null
+++ b/spiralsynth/Makefile
@@ -0,0 +1,35 @@
+# $NetBSD$
+
+DISTNAME= SpiralSynth-2.0.0
+PKGNAME= spiralsynth-2.0.0
+PKGREVISION= 13
+CATEGORIES= audio
+MASTER_SITES= http://www.pawfal.org/Software/SpiralSynth/dload/
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://www.pawfal.org/Software/SpiralSynth/
+COMMENT= Polyphonic analogue softsynth
+LICENSE= gnu-gpl-v2
+
+# only runs correctly on little-endian machines
+BROKEN_EXCEPT_ON_PLATFORM= ${LITTLEENDIANPLATFORMS}
+
+USE_LANGUAGES= c c++
+USE_TOOLS+= gmake
+GNU_CONFIGURE= yes
+MAKE_ENV+= CXXFLAGS=${CXXFLAGS:M*:Q}
+CXXFLAGS+= -DDEVOSSAUDIO="\"${DEVOSSAUDIO}\""
+
+INSTALLATION_DIRS= bin
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/SpiralSynth ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/spiralsynth
+ ${INSTALL_DATA} ${WRKSRC}/.SpiralPatches.bank \
+ ${WRKSRC}/.Spiralrc ${DESTDIR}${PREFIX}/share/spiralsynth
+
+.include "../../mk/oss.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../wip/fltk14-devel/buildlink3.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/spiralsynth/PLIST b/spiralsynth/PLIST
new file mode 100644
index 0000000000..81249b24c8
--- /dev/null
+++ b/spiralsynth/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD$
+bin/SpiralSynth
+share/spiralsynth/.SpiralPatches.bank
+share/spiralsynth/.Spiralrc
diff --git a/spiralsynth/distinfo b/spiralsynth/distinfo
new file mode 100644
index 0000000000..18a7ee6feb
--- /dev/null
+++ b/spiralsynth/distinfo
@@ -0,0 +1,20 @@
+$NetBSD$
+
+BLAKE2s (SpiralSynth-2.0.0.tar.gz) = 161cbb848a8ec7785b52717b57306abf53b498c074476625c6d04379c460dee9
+SHA512 (SpiralSynth-2.0.0.tar.gz) = fb9b1c84d03120c372af344f1f3e6ec4bfecea8d2c2afed9f5484c13e453bf816cfa7429690d3a3356ca84a51df31fdbb3ca25d2d2b023aacacfea6ec4936244
+Size (SpiralSynth-2.0.0.tar.gz) = 66263 bytes
+SHA1 (patch-GUI_OutputGUI.C) = 1cb3da64627aba3e7367aab0ab252a21838be0c9
+SHA1 (patch-SpiralSound_Midi.C) = 1ad683da963d1d65472eea64dcf8664a0f54e9c7
+SHA1 (patch-aa) = 01e4f4348761ca5c3e7e7c9dce0e13fa0b2b986f
+SHA1 (patch-ab) = 1be8a26fbfcdcde6d775c55586fbff24f55b212f
+SHA1 (patch-ad) = 235afa6618c5ec5aef2ca3448388f11757918832
+SHA1 (patch-ae) = decad0d1a4b2894a4dd9b9bc6bac9e4984b63357
+SHA1 (patch-af) = 88d1a457ad82184a1d5f34e3f56de2d8fb7daf89
+SHA1 (patch-ah) = d2ff3c4ddd4da9c96a74c3f898aa3429dcc51bb9
+SHA1 (patch-ai) = e21a111e3e52fc3c24433f248fa1bfdf566e72dd
+SHA1 (patch-aj) = 7e3e29fbfd38428d68f195db8a7f5007c1417c88
+SHA1 (patch-ak) = 67643c5abea0498f8ea046c5abd52f2d328a5538
+SHA1 (patch-al) = 7436bce933cbddcd4f869ab2cbbe27762d4273e5
+SHA1 (patch-am) = 78ab70a1952f389712412515652c2e8cc7d917a3
+SHA1 (patch-ao) = 138f58bd7fae0226690747efcb8daf472e3a5337
+SHA1 (patch-ar) = 44ab335b5a7831080d58a952f3cc13e5795a3f0e
diff --git a/spiralsynth/patches/patch-GUI_OutputGUI.C b/spiralsynth/patches/patch-GUI_OutputGUI.C
new file mode 100644
index 0000000000..8b3f6b273b
--- /dev/null
+++ b/spiralsynth/patches/patch-GUI_OutputGUI.C
@@ -0,0 +1,24 @@
+$NetBSD$
+
+2024-01-24: Patch modified for FLTK 1.4.
+
+--- GUI/OutputGUI.C.orig 2002-06-02 21:36:16.000000000 +0000
++++ GUI/OutputGUI.C
+@@ -18,7 +18,7 @@
+
+ #include "OutputGUI.h"
+
+-#include <FL/fl_file_chooser.h>
++#include <FL/Fl_File_Chooser.H>
+
+ OutputGUI::OutputGUI(OSSOutput *o)
+ {
+@@ -26,7 +26,7 @@ OutputGUI::OutputGUI(OSSOutput *o)
+ if (!m_out) cerr<<"WARNING: Output not correctly set up"<<endl;
+ }
+
+-void OutputGUI::CreateGUI(int xoff=0, int yoff=0, char *name)
++void OutputGUI::CreateGUI(int xoff, int yoff, char *name)
+ {
+ Fl_Group* o = GUIMixGroup = new Fl_Group(xoff, yoff, 85, 110, name);
+ o->type(1);
diff --git a/spiralsynth/patches/patch-SpiralSound_Midi.C b/spiralsynth/patches/patch-SpiralSound_Midi.C
new file mode 100644
index 0000000000..d2f10f4ac3
--- /dev/null
+++ b/spiralsynth/patches/patch-SpiralSound_Midi.C
@@ -0,0 +1,66 @@
+$NetBSD$
+
+2024-01-24: Patch modified for FLTK 1.4.
+
+--- SpiralSound/Midi.C.orig 2002-06-11 22:08:56.000000000 +0000
++++ SpiralSound/Midi.C
+@@ -24,7 +24,11 @@
+ #include "pthread.h"
+
+ #ifdef KEYBOARD_SUPPORT
+-#include <FL/Fl.h>
++#include <FL/Fl.H>
++#endif
++
++#if defined(__DragonFly__) && !defined(O_SYNC)
++#define O_SYNC O_FSYNC
+ #endif
+
+ static const int MIDI_SCANBUFSIZE=256;
+@@ -76,12 +80,12 @@ MidiDevice::~MidiDevice()
+ void MidiDevice::Close()
+ {
+ pthread_mutex_lock(m_Mutex);
+- pthread_cancel(m_MidiReader);
++ if (m_MidiReader != NULL)
++ pthread_cancel(m_MidiReader);
+ pthread_mutex_unlock(m_Mutex);
+ pthread_mutex_destroy(m_Mutex);
+
+ close(m_MidiFd);
+- close(m_MidiWrFd);
+ cerr<<"Closed midi device"<<endl;
+ }
+
+@@ -90,24 +94,19 @@ void MidiDevice::Open()
+ {
+ //if (!SpiralInfo::WANTMIDI) return;
+
+- m_MidiFd = open(m_DeviceName.c_str(),O_RDONLY|O_SYNC);
+- if (!m_MidiFd)
+- {
+- cerr<<"Couldn't open midi for reading ["<<m_DeviceName<<"]"<<endl;
+- return;
+- }
+-
+- m_MidiWrFd = open(m_DeviceName.c_str(),O_WRONLY);
+- if (!m_MidiWrFd)
++ m_Mutex = new pthread_mutex_t;
++ pthread_mutex_init(m_Mutex, NULL);
++ m_MidiReader = NULL;
++
++ m_MidiWrFd = m_MidiFd = open(m_DeviceName.c_str(),O_RDWR|O_SYNC);
++ if (m_MidiFd == -1)
+ {
+- cerr<<"Couldn't open midi for writing ["<<m_DeviceName<<"]"<<endl;
++ cerr<<"Couldn't open midi ["<<m_DeviceName<<"]"<<endl;
+ return;
+ }
+
+ cerr<<"Opened midi device ["<<m_DeviceName<<"]"<<endl;
+
+- m_Mutex = new pthread_mutex_t;
+- pthread_mutex_init(m_Mutex, NULL);
+ int ret=pthread_create(&m_MidiReader,NULL,(void*(*)(void*))MidiDevice::MidiReaderCallback,(void*)this);
+ }
+
diff --git a/spiralsynth/patches/patch-aa b/spiralsynth/patches/patch-aa
new file mode 100644
index 0000000000..d85b3a267d
--- /dev/null
+++ b/spiralsynth/patches/patch-aa
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- Makefile.in.orig Thu Jun 13 14:56:01 2002
++++ Makefile.in
+@@ -9,12 +9,12 @@
+
+ CC = gcc
+ CXX = g++
+-CFLAGS = -pipe -Wall -O3 -ffast-math -DNO_DEBUG -Wno-unused -g
+-CXXFLAGS= -pipe -Wall -O3 -ffast-math -DNO_DEBUG -Wno-unused -g
+-INCPATH = -I/usr/X11R6/include
+-LINK = g++
++CFLAGS+= -pipe -Wall -DNO_DEBUG -Wno-unused -g
++CXXFLAGS+= -pipe -Wall -DNO_DEBUG -Wno-unused -g
++INCPATH =
++LINK = g++ ${LDFLAGS}
+ LFLAGS =
+-LIBS = -L/usr/X11R6/lib -lfltk -lGL -lXext -lX11 -lm -lpthread
++LIBS = -lfltk -lGL -lXext -lX11 -lm ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} ${LIBOSSAUDIO}
+ MOC = moc
+ UIC =
+
diff --git a/spiralsynth/patches/patch-ab b/spiralsynth/patches/patch-ab
new file mode 100644
index 0000000000..49f0d75a34
--- /dev/null
+++ b/spiralsynth/patches/patch-ab
@@ -0,0 +1,30 @@
+$NetBSD$
+
+--- SpiralInfo.C.orig 2002-06-02 15:44:31.000000000 +0000
++++ SpiralInfo.C
+@@ -16,13 +16,13 @@
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+-#include <iostream.h>
+-#include <fstream.h>
++#include <iostream>
++#include <fstream>
+ #include <stdlib.h>
+
+ #include "SpiralSound/SpiralInfo.h"
+
+-float RandFloat(float s=0.0f, float e=1.0f)
++float RandFloat(float s, float e)
+ {
+ return s+((rand()%10000/10000.0)*(e-s));
+ }
+@@ -42,7 +42,7 @@ int SpiralInfo::SAMPLERATE = 44100;
+ float SpiralInfo::MAXSAMPLE = 1.0f;
+ bool SpiralInfo::WANTMIDI = true;
+ int SpiralInfo::FILTERGRAN = 50;
+-string SpiralInfo::OUTPUTFILE = "/dev/dsp";
++string SpiralInfo::OUTPUTFILE = DEVOSSAUDIO;
+ string SpiralInfo::MIDIFILE = "/dev/midi";
+ int SpiralInfo::POLY = 2;
+ bool SpiralInfo::REALTIMEOUT = true;
diff --git a/spiralsynth/patches/patch-ad b/spiralsynth/patches/patch-ad
new file mode 100644
index 0000000000..bd61fe5fcc
--- /dev/null
+++ b/spiralsynth/patches/patch-ad
@@ -0,0 +1,25 @@
+$NetBSD$
+
+--- SpiralSound/Output.h.orig Sun Jun 2 03:39:03 2002
++++ SpiralSound/Output.h
+@@ -16,6 +16,7 @@
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
++#include <sys/ioctl.h>
+ #include <sys/types.h>
+ #include <stdio.h>
+ #include <fcntl.h>
+@@ -25,12 +26,10 @@
+ #else
+ #if defined (__NetBSD__) || defined (__OpenBSD__)
+ #include <soundcard.h> /* OSS emulation */
+-#undef ioctl
+ #else /* BSDI, Linux, Solaris */
+ #include <sys/soundcard.h>
+ #endif /* __NetBSD__ or __OpenBSD__ */
+ #endif /* __FreeBSD__ */
+-#include <sys/ioctl.h>
+ #include <limits.h>
+
+ #include "Sample.h"
diff --git a/spiralsynth/patches/patch-ae b/spiralsynth/patches/patch-ae
new file mode 100644
index 0000000000..c8693baa64
--- /dev/null
+++ b/spiralsynth/patches/patch-ae
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- SpiralSound/SpiralInfo.h.orig 2002-06-02 15:44:45.000000000 +0000
++++ SpiralSound/SpiralInfo.h
+@@ -16,7 +16,9 @@
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+-#include <iostream.h>
++using namespace std;
++
++#include <iostream>
+ #include <string>
+ #include <stdlib.h>
+
diff --git a/spiralsynth/patches/patch-af b/spiralsynth/patches/patch-af
new file mode 100644
index 0000000000..12fe0ccb1d
--- /dev/null
+++ b/spiralsynth/patches/patch-af
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- GUI/ScopeGUI.C.orig Tue Jun 4 06:27:30 2002
++++ GUI/ScopeGUI.C
+@@ -22,7 +22,7 @@
+
+ #include <FL/fl_draw.H>
+
+-ScopeWidget::ScopeWidget(int x,int y,int w,int h,const char *l=0) :
++ScopeWidget::ScopeWidget(int x,int y,int w,int h,const char *l) :
+ Fl_Widget(x,y,w,h,l),
+ m_Data(NULL)
+ {
+@@ -54,7 +54,7 @@ void ScopeGUI::Display(short *data)
+ if (!m_Bypass) m_Scope->redraw();
+ }
+
+-void ScopeGUI::CreateGUI(int xoff=0, int yoff=0, char *name)
++void ScopeGUI::CreateGUI(int xoff, int yoff, char *name)
+ {
+ Fl_Group* o = GUIScopeGroup = new Fl_Group(xoff, yoff, 220, 110, name);
+ o->type(1);
diff --git a/spiralsynth/patches/patch-ah b/spiralsynth/patches/patch-ah
new file mode 100644
index 0000000000..a18e2c2e2b
--- /dev/null
+++ b/spiralsynth/patches/patch-ah
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- GUI/Widgets/Fl_Knob.cxx.orig Sun Jun 2 03:23:34 2002
++++ GUI/Widgets/Fl_Knob.cxx
+@@ -41,7 +41,7 @@ unsigned char rr,gg,bb;
+ int dam = damage();
+ if (dam & FL_DAMAGE_ALL)
+ {
+- int col = parent()->color();
++ int col = color();
+ fl_color(col);
+ fl_rectf(ox,oy,side,side);
+ Fl::get_color((Fl_Color)col,rr,gg,bb);
diff --git a/spiralsynth/patches/patch-ai b/spiralsynth/patches/patch-ai
new file mode 100644
index 0000000000..5c55d86db8
--- /dev/null
+++ b/spiralsynth/patches/patch-ai
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- SpiralSound/RiffWav.h.orig 2000-11-26 07:52:45.000000000 -0800
++++ SpiralSound/RiffWav.h
+@@ -16,6 +16,8 @@
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
++using namespace std;
++
+ #include <string>
+
+ #ifndef WAVFILE
diff --git a/spiralsynth/patches/patch-aj b/spiralsynth/patches/patch-aj
new file mode 100644
index 0000000000..0fde171121
--- /dev/null
+++ b/spiralsynth/patches/patch-aj
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- GUI/MixerGUI.C.orig 2000-11-26 07:52:40.000000000 -0800
++++ GUI/MixerGUI.C
+@@ -24,7 +24,7 @@ MixerGUI::MixerGUI(Mixer *o)
+ if (!m_mix) cerr<<"WARNING: Mixer not correctly set up"<<endl;
+ }
+
+-void MixerGUI::CreateGUI(int xoff=0, int yoff=0, char *name)
++void MixerGUI::CreateGUI(int xoff, int yoff, char *name)
+ {
+ Fl_Group* o = GUIMixGroup = new Fl_Group(xoff, yoff, 100, 110, name);
+ o->type(1);
diff --git a/spiralsynth/patches/patch-ak b/spiralsynth/patches/patch-ak
new file mode 100644
index 0000000000..bb485b19cf
--- /dev/null
+++ b/spiralsynth/patches/patch-ak
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- SpiralSound/Oscillator.C.orig Wed Jun 5 15:44:40 2002
++++ SpiralSound/Oscillator.C
+@@ -39,7 +39,8 @@ m_SHModBuf(NULL)
+ m_Note=new int[SpiralInfo::POLY];
+ m_LastFreq=new float[SpiralInfo::POLY];
+ m_Volume=new float[SpiralInfo::POLY];
+-
++ m_FreqModBuf = 0; /* initialize to avoid risk of coredump */
++ m_PulseWidthModBuf = 0; /* initialize to avoid risk of coredump */
+
+ for (int n=0; n<SpiralInfo::POLY; n++)
+ {
diff --git a/spiralsynth/patches/patch-al b/spiralsynth/patches/patch-al
new file mode 100644
index 0000000000..044643650e
--- /dev/null
+++ b/spiralsynth/patches/patch-al
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- SpiralSound/Midi.h.orig Sun Jun 2 03:28:09 2002
++++ SpiralSound/Midi.h
+@@ -24,6 +24,7 @@
+ #include <limits.h>
+ #include <queue>
+ #include <string>
++#include <pthread.h>
+
+ #ifndef MIDI
+ #define MIDI
diff --git a/spiralsynth/patches/patch-am b/spiralsynth/patches/patch-am
new file mode 100644
index 0000000000..06f6f314ea
--- /dev/null
+++ b/spiralsynth/patches/patch-am
@@ -0,0 +1,44 @@
+$NetBSD$
+
+--- SpiralSound/Output.C.orig Sun Jun 2 13:58:06 2002
++++ SpiralSound/Output.C
+@@ -20,6 +20,9 @@
+ #define _ISOC99_SOURCE 1
+ #include <math.h>
+ #include "Output.h"
++#ifndef lrintf
++#define lrintf(x) ((long)rintf(x))
++#endif
+
+ #define CHECK_AND_REPORT_ERROR if (result<0) \
+ { \
+@@ -224,7 +227,7 @@ void OSSOutput::OpenWrite()
+ CHECK_AND_REPORT_ERROR;
+
+ val = 1;
+- result = ioctl(m_Dspfd, SOUND_PCM_WRITE_CHANNELS, &val);
++ result = ioctl(m_Dspfd, SNDCTL_DSP_CHANNELS, &val);
+ CHECK_AND_REPORT_ERROR;
+
+ val = AFMT_S16_LE;
+@@ -260,9 +263,11 @@ void OSSOutput::OpenRead()
+ result = ioctl(m_Dspfd,SNDCTL_DSP_RESET,NULL);
+ CHECK_AND_REPORT_ERROR;
+
++#ifdef SOUND_PCM_READ_CHANNELS
+ val = 1;
+ result = ioctl(m_Dspfd, SOUND_PCM_READ_CHANNELS, &val);
+ CHECK_AND_REPORT_ERROR;
++#endif
+
+ val = AFMT_S16_LE;
+ result = ioctl(m_Dspfd,SNDCTL_DSP_SETFMT,&val);
+@@ -317,7 +322,7 @@ void OSSOutput::OpenReadWrite()
+ CHECK_AND_REPORT_ERROR;
+
+ val = 1;
+- result = ioctl(m_Dspfd, SOUND_PCM_WRITE_CHANNELS, &val);
++ result = ioctl(m_Dspfd, SNDCTL_DSP_CHANNELS, &val);
+ CHECK_AND_REPORT_ERROR;
+
+ val = AFMT_S16_LE;
diff --git a/spiralsynth/patches/patch-ao b/spiralsynth/patches/patch-ao
new file mode 100644
index 0000000000..e31acde97b
--- /dev/null
+++ b/spiralsynth/patches/patch-ao
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- Synth.C.orig 2002-06-11 15:09:42.000000000 -0700
++++ Synth.C
+@@ -82,6 +82,7 @@ m_OutGUI(OSSOutput::Get())
+ LoadPatch(1);
+
+ MidiDevice::Get()->SetDeviceName(SpiralInfo::MIDIFILE);
++ MidiDevice::Get()->PackUpAndGoHome();
+ }
+
+ Synth::~Synth()
diff --git a/spiralsynth/patches/patch-ar b/spiralsynth/patches/patch-ar
new file mode 100644
index 0000000000..bbf0b8ad61
--- /dev/null
+++ b/spiralsynth/patches/patch-ar
@@ -0,0 +1,48 @@
+$NetBSD$
+
+--- SpiralSound/Sample.h.orig 2002-06-02 10:28:26.000000000 +0000
++++ SpiralSound/Sample.h
+@@ -22,6 +22,7 @@
+ #include <assert.h>
+ #include <limits.h>
+ #include <iostream>
++#include <string.h>
+ #include "SpiralInfo.h"
+
+ //#define DEBUG
+@@ -66,7 +67,7 @@ public:
+ void CropTo(int NewLength);
+ bool IsEmpty() const { return m_IsEmpty; }
+
+- inline float &Sample::operator[](int i) const
++ inline float &operator[](int i) const
+ {
+ #ifdef DEBUG
+ assert(i>=0 && i<m_Length);
+@@ -75,7 +76,7 @@ public:
+ }
+
+ // Linear interpolated
+- inline float Sample::operator[](float i) const
++ inline float operator[](float i) const
+ {
+ int ii=(int)i;
+
+@@ -89,7 +90,7 @@ public:
+ }
+
+
+- inline void Sample::Set(int i, float v)
++ inline void Set(int i, float v)
+ {
+ m_IsEmpty=false;
+ #ifdef DEBUG
+@@ -98,7 +99,7 @@ public:
+ m_Data[i]=v;
+ }
+
+- inline Sample &Sample::operator=(const Sample &rhs)
++ inline Sample &operator=(const Sample &rhs)
+ {
+ Allocate(rhs.GetLength());
+ memcpy(m_Data,rhs.GetBuffer(),GetLengthInBytes());
Home |
Main Index |
Thread Index |
Old Index