Skip to content

Commit 457cf9e

Browse files
committed
MidiDevices: Reinstate unique idenfiers for virtual bytestream ports
1 parent f4ba4c1 commit 457cf9e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

modules/juce_audio_devices/midi_io/juce_MidiDevices.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ std::unique_ptr<MidiInput> MidiInput::createNewDevice (const String& name, MidiI
282282
if (! connection)
283283
return {};
284284

285-
return Impl::make (session, std::move (connection), 0, { name, {} }, callback, std::move (port));
285+
const auto portId = port.getId().dst;
286+
return Impl::make (session, std::move (connection), 0, { name, portId }, callback, std::move (port));
286287
}
287288

288289
void MidiInput::start()
@@ -391,7 +392,8 @@ std::unique_ptr<MidiOutput> MidiOutput::createNewDevice (const String& name)
391392
if (! connection)
392393
return {};
393394

394-
return rawToUniquePtr (new MidiOutput (session, std::move (connection), 0, { name, {} }, std::move (port)));
395+
const auto portId = port.getId().src;
396+
return rawToUniquePtr (new MidiOutput (session, std::move (connection), 0, { name, portId }, std::move (port)));
395397
}
396398

397399
MidiDeviceInfo MidiOutput::getDeviceInfo() const noexcept

0 commit comments

Comments
 (0)