Skip to content

MidiJackGetEndpointName() can return "unknown" for valid handles on 64-bit Windows #37

@cdwfs

Description

@cdwfs

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.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions