diff options
| -rw-r--r-- | readme.txt | 11 | ||||
| -rw-r--r-- | sound/mididrv.cpp | 15 |
2 files changed, 15 insertions, 11 deletions
diff --git a/readme.txt b/readme.txt index 61c64e03f2..0485a9d80e 100644 --- a/readme.txt +++ b/readme.txt @@ -338,10 +338,13 @@ Playing sound with Sequencer MIDI: [UNIX ONLY] If your soundcard driver supports a sequencer, you may set the environment variable "SCUMMVM_MIDI" to your sequencer device - eg, /dev/sequencer -Then start ScummVM with the parameter '-eseq'. This should work on several -cards, and may offer better performance and quality than Adlib emulation. -For those systems where Sequencer support does not work, there is always -MIDI emulation and Adlib emulation available. +If you have problems with not hearing audio in this configuration, it is +possible you will need to set the "SCUMMVM_MIDIPORT" variable to 1 or 2. This +selects the port on the selected sequencer to use. Then start scummvm with the +-eseq parameter. This should work on several cards, and may offer better +performance and quality than Adlib emulation. For those systems where +Sequencer support does not work, there is always MIDI emulation and Adlib +emulation available. Using MP3 files for CD audio: ----------------------------- diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp index 0dd821d253..11c549b6af 100644 --- a/sound/mididrv.cpp +++ b/sound/mididrv.cpp @@ -340,7 +340,6 @@ MidiDriver *MidiDriver_AMIDI_create() { #if defined(UNIX) && !defined(__BEOS__) #define SEQ_MIDIPUTC 5 #define SPECIAL_CHANNEL 9 -#define DEVICE_NUM 1 class MidiDriver_SEQ : public MidiDriver { public: @@ -355,12 +354,13 @@ private: StreamCallback *_stream_proc; void *_stream_param; int _mode; - int device; + int device, _device_num; }; MidiDriver_SEQ::MidiDriver_SEQ(){ _mode=0; device=0; + _device_num=0; } int MidiDriver_SEQ::open(int mode) { @@ -386,6 +386,7 @@ int MidiDriver_SEQ::open(int mode) { error("Cannot open /dev/null to dump midi output"); } + _device_num = atoi(getenv("SCUMMVM_MIDIPORT")); return 0; } @@ -408,26 +409,26 @@ void MidiDriver_SEQ::send(uint32 b) case 0xE0: buf[position++] = SEQ_MIDIPUTC; buf[position++] = (unsigned char)b; - buf[position++] = DEVICE_NUM; + buf[position++] = _device_num; buf[position++] = 0; buf[position++] = SEQ_MIDIPUTC; buf[position++] = (unsigned char)((b >> 8) & 0x7F); - buf[position++] = DEVICE_NUM; + buf[position++] = _device_num; buf[position++] = 0; buf[position++] = SEQ_MIDIPUTC; buf[position++] = (unsigned char)((b >> 16) & 0x7F); - buf[position++] = DEVICE_NUM; + buf[position++] = _device_num; buf[position++] = 0; break; case 0xC0: case 0xD0: buf[position++] = SEQ_MIDIPUTC; buf[position++] = (unsigned char)b; - buf[position++] = DEVICE_NUM; + buf[position++] = _device_num; buf[position++] = 0; buf[position++] = SEQ_MIDIPUTC; buf[position++] = (unsigned char)((b >> 8) & 0x7F); - buf[position++] = DEVICE_NUM; + buf[position++] = _device_num; buf[position++] = 0; break; default: |
