exit if device not found
This commit is contained in:
parent
b84b2e0a9b
commit
f61954805e
1 changed files with 4 additions and 1 deletions
|
|
@ -218,7 +218,10 @@ class OSCDevice {
|
||||||
}
|
}
|
||||||
|
|
||||||
const deviceName = midi.getInputs().find(i => i.includes('Platform X'));
|
const deviceName = midi.getInputs().find(i => i.includes('Platform X'));
|
||||||
if (!deviceName) return 0;
|
if (!deviceName) {
|
||||||
|
console.log('midi device not found')
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
const mdev = new MidiDevice(deviceName);
|
const mdev = new MidiDevice(deviceName);
|
||||||
const odev = new OSCDevice('0.0.0.0', '192.168.0.47', 10024);
|
const odev = new OSCDevice('0.0.0.0', '192.168.0.47', 10024);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue