ManagedBass icon indicating copy to clipboard operation
ManagedBass copied to clipboard

[UWP] DeviceInfo Name and Driver string issue

Open Panda-Sharp opened this issue 3 years ago • 0 comments

ManagedBass doesn't handle the DeviceInfo Name and Driver properties value correctly, they are UTF-16, temporary I fixed the issue locally replacing in this class https://github.com/ManagedBass/ManagedBass/blob/master/src/Bass/Shared/Bass/Structures/DeviceInfo.cs this code

 case -1:
                    return Extensions.PtrToStringUtf8(ptr);

with this

 case -1:
                    return Marshal.PtrToStringAuto(ptr);

As I'm not an expert in this field I'm not sure if this the best way to do it, but hopefully I put you on the right track, thanks

Panda-Sharp avatar Sep 07 '21 11:09 Panda-Sharp