diff options
-rw-r--r-- | backends/midi/camd.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/backends/midi/camd.cpp b/backends/midi/camd.cpp index 2c5728990c..9cee2a84a6 100644 --- a/backends/midi/camd.cpp +++ b/backends/midi/camd.cpp @@ -36,6 +36,7 @@ #include <proto/camd.h> #include <proto/exec.h> +#include <proto/dos.h> /* * CAMD sequencer driver @@ -56,6 +57,7 @@ private: struct Library *_CamdBase; struct CamdIFace *_ICamd; struct MidiLink *_midi_link; + char _outport[128]; char *getDevice(); void closeAll(); @@ -155,13 +157,18 @@ char *MidiDriver_CAMD::getDevice() { if (strstr(dev, "out") != NULL) { // This is an output device, return this - retname = dev; + strcpy(_outport, dev); + retname = _outport; } else { // Search the next one cluster = _ICamd->NextCluster(cluster); } } + // If the user has a preference outport set, use this instead + if(IDOS->GetVar("DefMidiOut", _outport, 128, 0)) + retname = _outport; + _ICamd->UnlockCAMD(key); } |