Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Find midi input devices by applying pattern to input instead of output devices #550

Merged
merged 1 commit into from
Apr 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions services/nodecg-io-midi-input/extension/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MidiService extends ServiceBundle<MidiInputServiceConfig, MidiInputService
const devices: Array<string> = new Array<string>();

// Virtual devices can always be created, easymidi will find a
// free name for the matching output
// free name for the matching input
if (!config.virtual) {
easymidi.getInputs().forEach((device) => {
if (device.includes(config.device)) {
Expand Down Expand Up @@ -58,7 +58,7 @@ class MidiService extends ServiceBundle<MidiInputServiceConfig, MidiInputService
deviceName = config.device;
} else {
// Otherwise we find a device which contains the pattern.
easymidi.getOutputs().forEach((device) => {
easymidi.getInputs().forEach((device) => {
if (device.includes(config.device) && deviceName === null) {
deviceName = device;
}
Expand Down