首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >AudioObjectPropertyAddress对象的mElement选项有哪些?

AudioObjectPropertyAddress对象的mElement选项有哪些?
EN

Stack Overflow用户
提问于 2020-11-06 08:54:58
回答 1查看 104关注 0票数 0

在MacOS SDK中,AudioObjectPropertyAddress的定义如下:

代码语言:javascript
运行
复制
AudioObjectPropertyAddress pa;
pa.mSelector = kAudioDevicePropertyVolumeScalar;
pa.mScope = kAudioDevicePropertyScopeOutput;
pa.mElement = kAudioObjectPropertyElementMaster;

我主要对mElement属性感兴趣。这个属性可以设置的值是什么,它们的不同用例是什么?

其次,我知道mScope的选项是“kAudioDevicePropertyScope”输出、“...”输入和“...”全局。当您不确定是应该只输入还是输出时,要使用全局变量吗?

这里的任何知识或文档都会非常有用。

谢谢!

EN

回答 1

Stack Overflow用户

发布于 2021-02-27 05:44:56

大多数文档都在头文件中。具体地说,您可能希望查看CoreAudio/AudioHardware.h,以了解每个对象支持哪些元素。

以下是音频系统对象的文档片段:

代码语言:javascript
运行
复制
/*!
    @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

代码语言:javascript
运行
复制
/*!
    @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.

希望这篇文章对你仍然有用。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64707413

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档