请告知是否可以通过编程方式更改全局 音频平衡(左/右音量)。 我已经尝试了SetBalance方法,但它没有改变 当前播放音频流中的音频平衡(使用标准媒体播放器应用) 代码是我粘贴到一些示例WP8应用程序的代码。 (不,它不起作用)
Microsoft::WRL::ComPtr<IMFMediaEngineClassFactory> spFactory;
Microsoft::WRL::ComPtr<IMFAttributes> spAttributes;
CoCreateInstance(CLSID_MFMediaEngineClassFactory, nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&spFactory));
Microsoft::WRL::ComPtr<IMFMediaEngine> m_spMediaEnine;
Microsoft::WRL::ComPtr<IMFMediaEngineEx> m_EnineEx;
//MFCreateAttributes(&spAttributes, 1);
const DWORD flags = MF_MEDIA_ENGINE_WAITFORSTABLE_STATE;
spFactory->CreateInstance(flags, spAttributes.Get(), &m_spMediaEnine);
m_spMediaEnine.Get()->QueryInterface(__uuidof(IMFMediaEngine), (void **) &m_EnineEx);
HRESULT res = m_EnineEx->SetBalance(-1.0);
提前致谢!
UPD: 这种方法是否仅适用于“我的”声音流,即我创建的声音。在我自己的音乐播放器?这种方法与我的应用程序不拥有的声音流无关吗?