billlin0904 / xamp2

Cross-platform native DSD and low latency playback music player
MIT License
10 stars 5 forks source link

Rust equivalent #5

Open xenide opened 1 week ago

xenide commented 1 week ago

hey I'm also trying to build a rust equivalent, to do DSD over DoP. But somehow it's not working. Would you be interested to look at some code to see what I'm doing wrong?

Thanks!

billlin0904 commented 1 week ago

If you want to convert DSD to DOP for playback:

xenide commented 1 week ago

ah you know, I'm using the rust cpal library. And in its current state it doesn't support 24 bits, only 32 bits. But DoP requires exactly 24 bits right? I think this may be the reason why it's not working

billlin0904 commented 1 week ago

You're right, on Windows, DOP playback only supports 24-bit format because it uses WASAPI in exclusive mode. I'm not very familiar with the Rust programming language, but after looking at the implementation in /src/host/wasapi/device.rs, it only implements WASAPI in shared mode, so this implementation cannot achieve DOP playback. 螢幕擷取畫面 2024-09-08 233610