diff options
Diffstat (limited to 'drivers/alsamidi')
-rw-r--r-- | drivers/alsamidi/SCsub | 2 | ||||
-rw-r--r-- | drivers/alsamidi/midi_driver_alsamidi.cpp | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/alsamidi/SCsub b/drivers/alsamidi/SCsub index 4c24925192..4e1b5f2a36 100644 --- a/drivers/alsamidi/SCsub +++ b/drivers/alsamidi/SCsub @@ -1,6 +1,6 @@ #!/usr/bin/env python -Import('env') +Import("env") # Driver source files env.add_source_files(env.drivers_sources, "*.cpp") diff --git a/drivers/alsamidi/midi_driver_alsamidi.cpp b/drivers/alsamidi/midi_driver_alsamidi.cpp index 0cecf1de3e..e3e54ea267 100644 --- a/drivers/alsamidi/midi_driver_alsamidi.cpp +++ b/drivers/alsamidi/midi_driver_alsamidi.cpp @@ -132,18 +132,18 @@ Error MIDIDriverALSAMidi::open() { return ERR_CANT_OPEN; int i = 0; - for (void **n = hints; *n != NULL; n++) { + for (void **n = hints; *n != nullptr; n++) { char *name = snd_device_name_get_hint(*n, "NAME"); - if (name != NULL) { + if (name != nullptr) { snd_rawmidi_t *midi_in; - int ret = snd_rawmidi_open(&midi_in, NULL, name, SND_RAWMIDI_NONBLOCK); + int ret = snd_rawmidi_open(&midi_in, nullptr, name, SND_RAWMIDI_NONBLOCK); if (ret >= 0) { connected_inputs.insert(i++, midi_in); } } - if (name != NULL) + if (name != nullptr) free(name); } snd_device_name_free_hint(hints); @@ -161,7 +161,7 @@ void MIDIDriverALSAMidi::close() { Thread::wait_to_finish(thread); memdelete(thread); - thread = NULL; + thread = nullptr; } for (int i = 0; i < connected_inputs.size(); i++) { @@ -202,7 +202,7 @@ PackedStringArray MIDIDriverALSAMidi::get_connected_inputs() { MIDIDriverALSAMidi::MIDIDriverALSAMidi() { - thread = NULL; + thread = nullptr; exit_thread = false; } |