Ticket #8402: gmmusic.diff
File gmmusic.diff, 1.1 KB (added by , 20 years ago) |
---|
-
.cpp
old new 48 48 49 49 _midiDrv->setTimerCallback(NULL, NULL); 50 50 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); 53 54 _midiDrv->send ((123 << 8) | 0xB0 | i); 55 } 54 56 _midiDrv->close(); 55 57 delete _midiDrv; 56 58 } … … 93 95 } 94 96 95 97 void 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); 97 104 //_midiDrv->send(0xFF); //ALSA can't handle this. 98 105 // skip all sysEx as it can't be handled anyways. 99 106 }