Ticket #3804: DOTT_MT-32_Hardware_Lockup_MIDI_Commands.diff

File DOTT_MT-32_Hardware_Lockup_MIDI_Commands.diff, 1021 bytes (added by raziel-, 13 years ago)
  • backends/midi/camd.cpp

    diff -r c5ba4b3c459f backends/midi/camd.cpp
    a b  
    2929#include "common/textconsole.h"
    3030#include "common/error.h"
    3131#include "common/endian.h"
     32#include "common/system.h"
    3233#include "common/util.h"
    3334#include "audio/musicplugin.h"
    3435#include "audio/mpu401.h"
     
    119120        }
    120121
    121122        ULONG data = READ_LE_UINT32(&b);
     123        // FIXME: Due to a hardware bug in early MT-32 devices Notes/Sysexes
     124        // need to be sent with a delay of 40 ms between every message.
     125        // (At least that's what Wikipedia states.)
     126        // It works if i set an extra delay of 1(!) ms right before every data transmission
     127        // which makes me think such a delay is already somewhere in the source but just
     128        // not enough to make my problem go away - hence the 1 ms delay i need to add.
     129        //
     130        // This fixes bug #2016549 DOTT: MIDI stuck after exploding cigar
     131        g_system->delayMillis(1);
    122132        _ICamd->PutMidi(_midi_link, data);
    123133}
    124134