Ticket #8402: gmmusic.diff

File gmmusic.diff, 1.1 KB (added by SF/tbcarey, 19 years ago)

SKY GMIDI Patch

  • .cpp

    old new  
    4848
    4949       _midiDrv->setTimerCallback(NULL, NULL);
    5050       if (_currentMusic) stopMusic();
    51        // Send All Notes Off (for external synths)
    52        for (int i = 0; i < 16; ++i)
     51       // Send All Sound Off and All Notes Off (for external synths)
     52       for (int i = 0; i < 16; ++i) {
     53               _midiDrv->send ((120 << 8) | 0xB0 | i);
    5354               _midiDrv->send ((123 << 8) | 0xB0 | i);
     55      }
    5456       _midiDrv->close();
    5557       delete _midiDrv;
    5658}
     
    9395}
    9496
    9597void GmMusic::startDriver(void) {
    96 
     98     
     99         // Send GM System On to reset channel parameters on external and capable synths
     100         uint8 sysEx[6];
     101         sysEx[0] = 0xF0; sysEx[1] = 0x7E; sysEx[2] = 0x7F; sysEx[3] = 0x09;   
     102         sysEx[4] = 0x01; sysEx[5] = 0xF7;     
     103         _midiDrv->sysEx(sysEx, 6);
    97104       //_midiDrv->send(0xFF);  //ALSA can't handle this.
    98105       // skip all sysEx as it can't be handled anyways.
    99106}