DirectX DirectSound设备SetCooperativeLevel [英] DirectX DirectSound Device SetCooperativeLevel

查看:430
本文介绍了DirectX DirectSound设备SetCooperativeLevel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是乔.使用wpf和C#在多播应用程序上工作,我使用Directx Directsound.在将CooperativeLevel设置为Device ..时,我创建了一个forms.control并作为Hwnd参数传递,而我也使用了USER32.GetDesktopWindow();.我能够成功多播我的音频.我在这里面临的问题是..当窗口最小化或在 接收器侧启用了其他任何窗口时..音频被静音 ..我只能在启用了特定窗口的情况下才能听到音频.相反,我需要音频,尽管窗口已最小化.

请给我一些解决此问题的建议.

在此先感谢.

乔.
程序员.
印度钦奈.

Hi there.. Im Joe. Working on a Multicast Application using wpf with C# and i use Directx Directsound. While setting the CooperativeLevel to the Device.. i create a forms.control and passed as the Hwnd parameter, rather i used also the USER32.GetDesktopWindow();. i''m able to successfully Multicast my audio. the Problem i face here is.. while the window in minimized or if any other window is enabled on the receiver side.. the audio is muted.. i can hear the audio only the particular window is enabled. Rather i need the audio, although the window is minimized.

Please give me some suggestion to overcome this issue.

Thanks in Advance.

Joe.
Programmer.
Chennai, India.

推荐答案

我为这个问题找到了解决方案.我错过的要点是添加回放BufferDescription属性.
BufferDescription.GlobalFocus = true;即使窗口最小化也可以播放音频.

快乐编码.

乔.
程序员.
印度金奈.
I got a solution for this problem.. The point i missed out is to add a playback BufferDescription property.
BufferDescription.GlobalFocus = true; enables the audio to play even the window is minimized.

Happy Coding.

Joe.
Programmer.
Chennai, India.


这篇关于DirectX DirectSound设备SetCooperativeLevel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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