在音频编程时,常常需要知道本机声卡支持的采样位数及采样频率,在编程时用什么函数获得?就像WINDOWS系统中小喇叭属性中高级所罗列的参数一样。

解决方案 »

  1.   

    spatialaudioclient.h 查到用ispatialaudioclient接口
    https://docs.microsoft.com/zh-cn/windows/desktop/api/spatialaudioclient/
    但没找到delphi怎么声明
      

  2.   

    ISpatialAudioClient::GetSupportedAudioObjectFormatEnumerator Gets an IAudioFormatEnumerator that contains all supported audio formats for spatial audio objects, the first item in the list represents the most preferable format. 
      

  3.   

    waveInGetDevCaps、waveOutGetDevCaps
      

  4.   

    上面的是xp下的吧,win7下不行
      

  5.   

    怎么不行,win10都可以。