diff options
Diffstat (limited to 'audio/spiralsynth/patches/patch-an')
-rw-r--r-- | audio/spiralsynth/patches/patch-an | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/audio/spiralsynth/patches/patch-an b/audio/spiralsynth/patches/patch-an deleted file mode 100644 index 1b533c75090..00000000000 --- a/audio/spiralsynth/patches/patch-an +++ /dev/null @@ -1,62 +0,0 @@ -$NetBSD: patch-an,v 1.3 2006/01/05 15:33:00 joerg Exp $ - ---- SpiralSound/Midi.C.orig 2002-06-11 22:08:56.000000000 +0000 -+++ SpiralSound/Midi.C -@@ -27,6 +27,10 @@ - #include <FL/Fl.h> - #endif - -+#if defined(__DragonFly__) && !defined(O_SYNC) -+#define O_SYNC O_FSYNC -+#endif -+ - static const int MIDI_SCANBUFSIZE=256; - static const int MIDI_KEYOFFSET=0; - -@@ -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); - } - |