Scans for MIDI devices when auto-tuning is enabled.
| 187 | /// Scans for MIDI devices when auto-tuning is enabled. |
| 188 | /// </summary> |
| 189 | void HandleMidiDeviceScanning() { |
| 190 | if (!Midi::scannedForMidiDevices && Settings::ReturnSettingValue("AutoTuneForSong") == "on") { |
| 191 | Midi::scannedForMidiDevices = true; |
| 192 | Midi::ReadMidiSettingsFromINI( |
| 193 | Settings::ReturnSettingValue("ChordsMode"), |
| 194 | Settings::GetModSetting("TuningPedal"), |
| 195 | Settings::ReturnSettingValue("AutoTuneForSongDevice"), |
| 196 | Settings::ReturnSettingValue("MidiInDevice") |
| 197 | ); |
| 198 | } |
| 199 | |
| 200 | if (!Midi::attemptedToDetachMidiInThread && Settings::ReturnSettingValue("MidiInDevice") != "") { |
| 201 | Midi::attemptedToDetachMidiInThread = true; |
| 202 | Midi::FindMidiInDevices(Settings::ReturnSettingValue("MidiInDevice")); |
| 203 | std::thread(Midi::ListenToMidiInThread).detach(); |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | /// <summary> |
| 208 | /// Handles rainbow string and note effects. |
no test coverage detected