pkgsrc/audio/spiralsynth/patches/patch-ao
ben c311032905 The problem is that SpiralSynth opens the MIDI device path before
calling SetDeviceName.

The call trace goes something like this:

Synth.C
main() ==> Synth *synth=new Synth; ==> Synth::Synth()
==> MidiDevice::Get()->SetDeviceName(SpiralInfo::MIDIFILE);

SpiralSound/Midi.h
MidiDevice::Get() ==> m_Singleton=new MidiDevice;
==> MidiDevice::MidiDevice() ==> MidiDevice::Open()
==> MidiDevice::SetDeviceName

patches/patch-ao works around this problem by closing the prematurely
opened private variable representing the MIDI device, and setting it to
NULL.  MidiDevice methods check for NULL and re-initialize the private
variable, this time opening the MIDI device path after SetDeviceName.
2005-04-24 03:29:11 +00:00

12 lines
304 B
Text

$NetBSD: patch-ao,v 1.1 2005/04/24 03:29:11 ben Exp $
--- 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()