设置系统体积的Windows Phone 8.1 [英] Set system volume in Windows Phone 8.1

查看:159
本文介绍了设置系统体积的Windows Phone 8.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Can I set system volume from code behind? I know that in WP8 no way to do this. Maybe in WP8.1 ms added some api for system volume access?

推荐答案

这是不可能的我已经使用WASAPI驱动程序试图从微软

This is not possible I have tried using the WASAPI drivers from Microsoft.

作为一个补充说明,从MSFT支持詹姆斯·戴利报价:

As an added note quoting from MSFT support James Dailey:

AFAIK有操作上的$ b $全球音频b级的Windows Phone 8.1(WP8.1)没有什么好办法。理论上,你可以更改使用默认的音频会话零的任何应用程序的音频
卷。但是,如果
应用选择来初始化它在您将无法访问其定制
音频会话的会话量自定义
GUID音频会话。再次,这是理论上的根据我WASAPI的
内部运作的知识。我从来没有真正尝试过的电话。结果
。要使用音频会话零你
只是以一个AudioSessionGuid参数
初始化IAudioClient操作的应用程序的音量{} 00000000-0000-0000-0000-000000000000。然后,您可以用
ISimpleAudioVolume :: SetMasterVolume设置此音频
会话量。您将需要使用C ++ / CX因为我们不支持
调用从托管代码WASAPI。

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.

以上建议做不行。

这篇关于设置系统体积的Windows Phone 8.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆