You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On 64-bit Windows, the ID returned by MidiJackGetEndpointIDAtIndex(index) is the low 32 bits of the DeviceHandle. When this ID is passed into MidiJackGetEndpointName(), it "converts" it back to a handle by casting it back to a 64-bit int, but the high 32 bits of the handle can not be recovered. Passing the resulting handle to midiInGetDevCaps() results in an invalid handle error, so the function returns "unknown".
The issue can be solved by maintaining a std::map<DeviceID, DeviceHandle> to convert 32-bit device IDs back to the full 64-bit device handle. I can prepare a PR if you'd like.
The text was updated successfully, but these errors were encountered:
cdwfs
changed the title
MidiJackGetEndpointName() always returns "unknown" on 64-bit Windows
MidiJackGetEndpointName() can return "unknown" for valid handles on 64-bit Windows
Feb 9, 2019
cdwfs
linked a pull request
Feb 9, 2019
that will
close
this issue
On 64-bit Windows, the ID returned by
MidiJackGetEndpointIDAtIndex(index)
is the low 32 bits of theDeviceHandle
. When this ID is passed intoMidiJackGetEndpointName()
, it "converts" it back to a handle by casting it back to a 64-bit int, but the high 32 bits of the handle can not be recovered. Passing the resulting handle tomidiInGetDevCaps()
results in an invalid handle error, so the function returns "unknown".The issue can be solved by maintaining a
std::map<DeviceID, DeviceHandle>
to convert 32-bit device IDs back to the full 64-bit device handle. I can prepare a PR if you'd like.The text was updated successfully, but these errors were encountered: