如何从 CoreAudio 获取首选通道布局
How to get preferred channel layout from CoreAudio
我想知道是否有人知道如何从 CoreAudio 获得首选频道布局。我尝试使用 kAudioDevicePropertyPreferredChannelLayout 来获取频道标签。但是,它始终显示 kAudioChannelLabel_Unknown 值。有什么驱动程序问题吗?或者在询问 kAudioDevicePropertyPreferredChannelLayout 之前需要设置一些属性。
自己回答
而不是 kAudioDevicePropertyPreferredChannelLayout,使用 kAudioUnitProperty_AudioChannelLayout 让我获得正确的声道配置。
也许我们先使用kAudioDevicePropertyPreferredChannelLayout来获取布局会更好。如果它 returns 未知,那么我们使用 kAudioUnitProperty_AudioChannelLayout 来获取它。
我想知道是否有人知道如何从 CoreAudio 获得首选频道布局。我尝试使用 kAudioDevicePropertyPreferredChannelLayout 来获取频道标签。但是,它始终显示 kAudioChannelLabel_Unknown 值。有什么驱动程序问题吗?或者在询问 kAudioDevicePropertyPreferredChannelLayout 之前需要设置一些属性。
自己回答
而不是 kAudioDevicePropertyPreferredChannelLayout,使用 kAudioUnitProperty_AudioChannelLayout 让我获得正确的声道配置。
也许我们先使用kAudioDevicePropertyPreferredChannelLayout来获取布局会更好。如果它 returns 未知,那么我们使用 kAudioUnitProperty_AudioChannelLayout 来获取它。