在MacOS SDK中,AudioObjectPropertyAddress的定义如下:
AudioObjectPropertyAddress pa;
pa.mSelector = kAudioDevicePropertyVolumeScalar;
pa.mScope = kAudioDevicePropertyScopeOutput;
pa.mElement = kAudioObjectPropertyElementMaster;我主要对mElement属性感兴趣。这个属性可以设置的值是什么,它们的不同用例是什么?
其次,我知道mScope的选项是“kAudioDevicePropertyScope”输出、“...”输入和“...”全局。当您不确定是应该只输入还是输出时,要使用全局变量吗?
这里的任何知识或文档都会非常有用。
谢谢!
发布于 2021-02-27 05:44:56
大多数文档都在头文件中。具体地说,您可能希望查看CoreAudio/AudioHardware.h,以了解每个对象支持哪些元素。
以下是音频系统对象的文档片段:
/*!
@enum AudioSystemObject Properties
@abstract AudioObjectPropertySelector values provided by the AudioSystemObject class.
@discussion The AudioSystemObject class is a subclass of the AudioObject class. the class
has just the global scope, kAudioObjectPropertyScopeGlobal, and only a master element.
...因此,这个音频对象只有一个主元素。
有关该范围的更多信息,请查看CoreAudio/AudioHardwareBase.h
/*!
@enum Property Address Constants
@abstract The valid values for the scope in a property address.
@constant kAudioObjectPropertyScopeGlobal
The AudioObjectPropertyScope for properties that apply to the object as a
whole. All objects have a global scope and for most it is their only scope.
@constant kAudioObjectPropertyScopeInput
The AudioObjectPropertyScope for properties that apply to the input side of
an object.
@constant kAudioObjectPropertyScopeOutput
The AudioObjectPropertyScope for properties that apply to the output side of
an object.
@constant kAudioObjectPropertyScopePlayThrough
The AudioObjectPropertyScope for properties that apply to the play through
side of an object.希望这篇文章对你仍然有用。
https://stackoverflow.com/questions/64707413
复制相似问题