gpt4 book ai didi

c# - 在 Windows Phone 8.1 中设置系统音量

转载 作者:行者123 更新时间:2023-11-30 16:58:59 27 4
gpt4 key购买 nike

我可以从后面的代码中设置系统音量吗?我知道在 WP8 中没有办法做到这一点。也许在 WP8.1 ms 中添加了一些用于系统卷访问的 api?

最佳答案

这是不可能的,我已经尝试使用 Microsoft 的 WASAPI 驱动程序。

作为从 MSFT 支持 James Dailey 引述的补充说明:

AFAIK there is no good way to manipulate the global audio level on Windows Phone 8.1 (WP8.1). Theoretically you can change the audio volume of any app that uses the default audio session “zero”. However, if the app chooses to initialize it’s audio session with a custom GUID you will not have access to the session volume for its custom audio session. Again this is theoretical based on my knowledge of the inner workings of WASAPI. I’ve never actually tried it on the phone.
To manipulate the audio volume of apps using audio session “zero” you simply initialize your IAudioClient with an AudioSessionGuid parameter of “{00000000-0000-0000-0000-000000000000}”. You can then use ISimpleAudioVolume::SetMasterVolume to set the volume for this audio session. You will need to use C++ / Cx since we do not support calling WASAPI from managed code.

以上建议无效。

关于c# - 在 Windows Phone 8.1 中设置系统音量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24383944/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com