celtera / libremidi

A modern C++ MIDI 1 / MIDI 2 real-time & file I/O library. Supports Windows, macOS, Linux and WebMIDI.
Other
456 stars 51 forks source link

devicename consistency for winmm #69

Closed aerlfredith closed 1 year ago

aerlfredith commented 1 year ago

Added the same device name uniqueness to second retrieval path so observers and the base listing have consistent results.

jcelerier commented 1 year ago

thanks for this patch! I think that instead of bringing the heavy machinery of ostringstream you can just do

deviceName += ' ';
deviceName += std::to_string(x);