如何配置的DirectSound的MaxSampleRate以上20000DirectSound、MaxSampleRate

2023-09-04 01:27:28 作者:青春太贵,浪费不起

我编程的小程序,输出生成的声音。

I'm programming small program to output generated sound.

我的声卡是能够在48000甚至192000采样率。它是一种瑞昱ALC883 7.1 + 2声道高保真音频,并且规格可以在这里找到

My sound card is capable of a 48000 or even 192000 sample rate. Its a Realtek ALC883 7.1+2 Channel High Definition Audio, and the specs can be found here.

不过,DirectSound的的MaxSampleRate有20000最大值?

However, DirectSound's MaxSampleRate has a maximum value of 20000?

我知道我可以得到比我的声卡最大的好,但我怎么配置DirectSound的利用这一优势?当我尝试以下方法:

I know I can get better than the maximum from my sound card, but how do I configure DirectSound to take advantage of this? When I try the following:

DirectSound ds = new DirectSound(DirectSound.GetDevices().First().DriverGuid);
MessageBox.Show(ds.Capabilities
                  .MaxSecondarySampleRate
                  .ToString(CultureInfo.InvariantCulture));

在消息框中显示的号码是20000。

In message box the number displayed is "20000".

推荐答案

这可能是你的声卡是不是在设备列表中的第一个设备(例如,视频卡与电视outpout将出现在列表中) 。你应该看看 DeviceInformation.Description 属性。否则,也许与驱动程序问题?

It could be that your sound card is not the first device in the devices list (for example, a video card with a tv outpout would appear in the list). You should look at the DeviceInformation.Description property. Otherwise, maybe a problem with the driver ?

相关推荐