You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a couple of problems with the built in keyboard usage under windows. For one keyReleaseEvent never sets bit 15 for the engine to find (at least on my machine) and two, auto repeat of the keyboard wreaks major havoc sounding like audio overruns but it is not. It is just retriggering the notes in quick succession.
I have not done github pull requests for a while and I don't know if you are accepting them but at any rate both fixes to main-window.cc can be found below:
There are a couple of problems with the built in keyboard usage under windows. For one keyReleaseEvent never sets bit 15 for the engine to find (at least on my machine) and two, auto repeat of the keyboard wreaks major havoc sounding like audio overruns but it is not. It is just retriggering the notes in quick succession.
I have not done github pull requests for a while and I don't know if you are accepting them but at any rate both fixes to main-window.cc can be found below:
void MainWindow::keyPressEvent(QKeyEvent *event) {
Engine *engine = _application.engine();
if (!event->isAutoRepeat()) {
for (int i = 0; i < 8; i++) {
#ifdef _WIN32
if (0 == InterlockedCompareExchange(
(LONG volatile *)&engine->keyboardNoteData[i], event->key(), 0)) {
#else
if (0 == __sync_val_compare_and_swap(&engine->keyboardNoteData[i], 0, event->key())) {
#endif
break;
}
}
}
}
void MainWindow::keyReleaseEvent(QKeyEvent *event) {
Engine *engine = _application.engine();
#ifdef _WIN32
if (0 == InterlockedCompareExchange(
(LONG volatile *)&engine->keyboardNoteData[i], event->key() | 0x8000, 0)) {
#else
if (0 ==
__sync_val_compare_and_swap(&engine->keyboardNoteData[i], 0, 0x8000 | event->key())) {
#endif
break;
}
}
}
}
The text was updated successfully, but these errors were encountered: