ManagedBass / ManagedBass/ManagedBass

[UWP] DeviceInfo Name and Driver string issue

Open
#103 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
285
Forks
55
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/Bass/Shared/Bass/Structures/DeviceInfo.cs and inspect the case -1 handling for DeviceInfo Name and Driver. Compare the current UTF-8 conversion with the reported Marshal.PtrToStringAuto behavior for UWP, then verify that both properties are decoded correctly without breaking other platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
audio-video-rtc
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.