-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #276194 Allow MIDI devices to be refreshed without having to restart MuseScore #3962
fix #276194 Allow MIDI devices to be refreshed without having to restart MuseScore #3962
Conversation
Sounds very useful. 😃 |
f173843
to
ef1b565
Compare
@blackears could you please add "fix #" at the beginning of the PR title. Also, please edit commit message and add "fix #276194: " at the beginning so the related issue will be closed automatically once this PR is merged. |
ef1b565
to
8d7d511
Compare
mscore/prefsdialog.cpp
Outdated
// rescanDrivers | ||
//--------------------------------------------------------- | ||
|
||
void PreferenceDialog::rescanDriversClicked() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it possible to reuse the code to avoid duplication?
shouldn't the enable/disable MIDI toggle in the toolbar also result in a rescan? |
It does not result in a rescan, but clicking Apply in the preferences can if you change your driver. |
c56b7c8
to
08ed13e
Compare
But maybe it should result in a rescan? |
915c0f9
to
1685b7d
Compare
I've updated it so that when you switch the MIDI toggle button to on, the audio engine will be rebuilt which should connect to any MIDI keyboard that has been added. |
1685b7d
to
d00b9d6
Compare
@blackears could you please remove the dash after issue number? I will check the PR again and merge after the release, so it will be in one of the first updates to 3.0. |
Fixed memory leak/lack of handle closing when deleting Port Audio engine. Can now have MIDI devices be discovered by pressing button in Prefs/IO or by toggling the MIDI enabled button.
d00b9d6
to
32a6b12
Compare
@blackears great! I checked the case with my bluetooth headphones. I had to restart MuseScore when I plugged them, and now I'm able to switch to them on fly. Btw, there are two things which need to be fixed:
|
Fixed a bug in PortAudio where it wasn't deleting PortMidi upon deletion, which left the old MIDI ports open and blocked any new Drivers from using them.
Also added a button to Preferences/I/O. Now if a user turns off/on their MIDI keyboard while Musescore is running, they can open the Preferences/I/O, press Rescan MIDI Input and they should be able to use their keyboard again.