audio_types.h
概述
Audio模块接口定义中使用的自定义数据类型,包括音频端口、适配器描述符、设备描述符、场景描述符、采样属性、时间戳等。
Since:
1.0
Version:
1.0
相关模块:
汇总
类
名称 | 描述 |
---|---|
AudioPort | 音频端口 |
AudioAdapterDescriptor | 音频适配器描述符 |
AudioDeviceDescriptor | 音频设备描述符 |
AudioSceneDescriptor | 音频场景描述符 |
AudioSceneDescriptor::SceneDesc | 音频场景描述 |
AudioSampleAttributes | 音频采样属性 |
AudioTimeStamp | 音频时间戳 |
AudioSubPortCapability | 音频子端口的支持能力 |
AudioPortCapability | 音频端口的支持能力 |
AudioMmapBufferDescriptor | mmap缓冲区描述符 |
AudioDevExtInfo | 音频设备拓展信息. |
AudioMixExtInfo | 音轨拓展信息 |
AudioSessionExtInfo | 会话拓展信息 |
AudioRouteNode | 音频路由节点. |
AudioRoute | 音频路由信息. |
类型定义
名称 | 描述 |
---|---|
AudioHandle | 音频句柄 |
(RenderCallback) (enum AudioCallbackType, void *reserved, void *cookie) | 回调函数指针 |
枚举
名称 | 描述 |
---|---|
AudioPortDirection { PORT_OUT = 0x1u, PORT_IN = 0x2u, PORT_OUT_IN = 0x3u } | 音频端口的类型 |
AudioPortPin { PIN_NONE = 0x0u, PIN_OUT_SPEAKER = 0x1u, PIN_OUT_HEADSET = 0x2u, PIN_OUT_LINEOUT = 0x4u, PIN_OUT_HDMI = 0x8u, PIN_OUT_USB = 0x10u, PIN_OUT_USB_EXT = 0x20u, PIN_IN_MIC = 0x8000001u, PIN_IN_HS_MIC = 0x8000002u, PIN_IN_LINEIN = 0x8000004u, PIN_IN_USB_EXT = 0x8000008u } | 音频适配器端口的PIN脚 |
AudioCategory { AUDIO_IN_MEDIA = 0, AUDIO_IN_COMMUNICATION, AUDIO_IN_RINGTONE, AUDIO_IN_CALL } | 音频类型(category) |
AudioFormat{ AUDIO_FORMAT_PCM_8_BIT = 0x1u, AUDIO_FORMAT_PCM_16_BIT = 0x2u, AUDIO_FORMAT_PCM_24_BIT = 0x3u, AUDIO_FORMAT_PCM_32_BIT = 0x4u, AUDIO_FORMAT_AAC_MAIN = 0x1000001u, AUDIO_FORMAT_AAC_LC = 0x1000002u, AUDIO_FORMAT_AAC_LD = 0x1000003u, AUDIO_FORMAT_AAC_ELD = 0x1000004u, AUDIO_FORMAT_AAC_HE_V1 = 0x1000005u, AUDIO_FORMAT_AAC_HE_V2 = 0x1000006u, AUDIO_FORMAT_G711A = 0x2000001u, AUDIO_FORMAT_G711U = 0x2000002u, AUDIO_FORMAT_G726 = 0x2000003u } | 音频格式 |
AudioChannelMask{ AUDIO_CHANNEL_FRONT_LEFT = 0x1, AUDIO_CHANNEL_FRONT_RIGHT = 0x2, AUDIO_CHANNEL_MONO = 0x1u, AUDIO_CHANNEL_STEREO = 0x3u } | 音频通道掩码(mask) |
AudioSampleRatesMask{ AUDIO_SAMPLE_RATE_MASK_8000 = 0x1u, AUDIO_SAMPLE_RATE_MASK_12000 = 0x2u, AUDIO_SAMPLE_RATE_MASK_11025 = 0x4u, AUDIO_SAMPLE_RATE_MASK_16000 = 0x8u, AUDIO_SAMPLE_RATE_MASK_22050 = 0x10u, AUDIO_SAMPLE_RATE_MASK_24000 = 0x20u, AUDIO_SAMPLE_RATE_MASK_32000 = 0x40u, AUDIO_SAMPLE_RATE_MASK_44100 = 0x80u, AUDIO_SAMPLE_RATE_MASK_48000 = 0x100u, AUDIO_SAMPLE_RATE_MASK_64000 = 0x200u, AUDIO_SAMPLE_RATE_MASK_96000 = 0x400u, AUDIO_SAMPLE_RATE_MASK_INVALID = 0xFFFFFFFFu } | 音频采样频率MASK |
AudioPortPassthroughMode{ PORT_PASSTHROUGH_LPCM = 0x1, PORT_PASSTHROUGH_RAW = 0x2, PORT_PASSTHROUGH_HBR2LBR = 0x4, PORT_PASSTHROUGH_AUTO = 0x8 } | 音频端口的数据透传模式 |
AudioSampleFormat{ AUDIO_SAMPLE_FORMAT_S8, AUDIO_SAMPLE_FORMAT_S8P, AUDIO_SAMPLE_FORMAT_U8, AUDIO_SAMPLE_FORMAT_U8P, AUDIO_SAMPLE_FORMAT_S16, AUDIO_SAMPLE_FORMAT_S16P, AUDIO_SAMPLE_FORMAT_U16, AUDIO_SAMPLE_FORMAT_U16P, AUDIO_SAMPLE_FORMAT_S24, AUDIO_SAMPLE_FORMAT_S24P, AUDIO_SAMPLE_FORMAT_U24, AUDIO_SAMPLE_FORMAT_U24P, AUDIO_SAMPLE_FORMAT_S32, AUDIO_SAMPLE_FORMAT_S32P, AUDIO_SAMPLE_FORMAT_U32, AUDIO_SAMPLE_FORMAT_U32P, AUDIO_SAMPLE_FORMAT_S64, AUDIO_SAMPLE_FORMAT_S64P, AUDIO_SAMPLE_FORMAT_U64, AUDIO_SAMPLE_FORMAT_U64P, AUDIO_SAMPLE_FORMAT_F32, AUDIO_SAMPLE_FORMAT_F32P, AUDIO_SAMPLE_FORMAT_F64, AUDIO_SAMPLE_FORMAT_F64P } | 原始音频样本格式 |
AudioChannelMode{ AUDIO_CHANNEL_NORMAL = 0, AUDIO_CHANNEL_BOTH_LEFT, AUDIO_CHANNEL_BOTH_RIGHT, AUDIO_CHANNEL_EXCHANGE, AUDIO_CHANNEL_MIX, AUDIO_CHANNEL_LEFT_MUTE, AUDIO_CHANNEL_RIGHT_MUTE, AUDIO_CHANNEL_BOTH_MUTE } | 音频播放的通道模式 |
AudioDrainNotifyType{ AUDIO_DRAIN_NORMAL_MODE, AUDIO_DRAIN_EARLY_MODE } | DrainBuffer函数结束类型 |
AudioCallbackType{ AUDIO_NONBLOCK_WRITE_COMPLETED, AUDIO_DRAIN_COMPLETED, AUDIO_FLUSH_COMPLETED, AUDIO_RENDER_FULL, AUDIO_ERROR_OCCUR } | 回调函数通知事件类型 |
AudioPortRole{ AUDIO_PORT_UNASSIGNED_ROLE = 0, AUDIO_PORT_SOURCE_ROLE = 1, AUDIO_PORT_SINK_ROLE = 2 } | 音频端口角色 |
AudioPortType{ AUDIO_PORT_UNASSIGNED_TYPE = 0, AUDIO_PORT_DEVICE_TYPE = 1, AUDIO_PORT_MIX_TYPE = 2, AUDIO_PORT_SESSION_TYPE = 3 } | 音频端口类型. |
AudioSessionType{ AUDIO_OUTPUT_STAGE_SESSION = 0, AUDIO_OUTPUT_MIX_SESSION, AUDIO_ALLOCATE_SESSION, AUDIO_INVALID_SESSION } | 端口会话类型 |