Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

音频输出设备选择,WASAPI音频后端 #156

Open
axojhf opened this issue Dec 4, 2023 · 4 comments
Open

音频输出设备选择,WASAPI音频后端 #156

axojhf opened this issue Dec 4, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@axojhf
Copy link

axojhf commented Dec 4, 2023

Is your feature request related to a problem? Please describe.
某些情况下可能需要把音频播放到指定音频设备,目前好像没看见可以选择播放设备。
WASAPI是Windows Vista加入的低级音频组件(可能音频渲染质量更好?也支持独占音频设备),(貌似XAudio2内部也用到了它)。

Describe the solution you'd like
音频输出设备选择感觉更实用一点,暴露给用户的形式可以参考MPV,Windows上类似如下(uuid不知道mpv是怎么生成的,下面这个uuid是用powershell New-Guid生成的,不是原值):

List of detected audio devices:
  'auto' (Autoselect device)
  'wasapi/{b2f06300-2ff6-41d7-a97e-98309a031a5f}' (扬声器 (Realtek(R) Audio))
  'openal' (Default (openal))
  'sdl' (Default (sdl))

WASAPI这个主要是感觉可以看齐MPV。

微软文档和sample参考:
https://learn.microsoft.com/windows/win32/coreaudio/wasapi
https://github.com/microsoft/Windows-classic-samples/tree/main/Samples/WASAPIRendering

Describe alternatives you've considered
Additional context

@wang-bin wang-bin self-assigned this Dec 4, 2023
@wang-bin wang-bin added the enhancement New feature or request label Dec 4, 2023
@feiyangqingyun
Copy link

弱弱的问一下大佬,以前qtav是不是也没有切换声卡这个功能?找遍了没找到,谢谢

@wang-bin
Copy link
Owner

弱弱的问一下大佬,以前qtav是不是也没有切换声卡这个功能?找遍了没找到,谢谢

没有

@feiyangqingyun
Copy link

大佬,这个可选声卡的功能好了以后记得说声,我可以试试。建议先把win上先实现,一个是获取音频输出设备集合,一个是设置的接口。谢谢

@feiyangqingyun
Copy link

王总这个功能好了没,谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants