- Audio
- Overview
- Summary
- Files
- Data Structures
- Typedefs
- Enumerations
- Functions
- Details
- Enumeration Type Documentation
- AudioCategory
- AudioChannelMask
- AudioChannelMode
- AudioFormat
- AudioPortDirection
- AudioPortPassthroughMode
- AudioPortPin
- AudioSampleRatesMask
- Function Documentation
- GetAudioManagerFuncs()
- Variable Documentation
- adapterName
- channelCount [1/2]
- channelCount [2/2]
- channelMasks
- desc [1/4]
- desc [2/4]
- desc [3/4]
- desc [4/4]
- deviceId
- deviceType
- dir
- format
- formatNum
- formats
- hardwareMode
- id
- interleaved
- mask
- pins
- portId [1/3]
- portId [2/3]
- portId [3/3]
- portName
- portNum
- ports
- sampleRate
- sampleRateMasks
- scene
- subPorts
- subPortsNum
- tvNSec
- tvSec
- type
Audio
Overview
Defines audio-related APIs, including custom data types and functions for loading drivers, accessing a driver adapter, and rendering and capturing audios.
Since:
1.0
Version:
1.0
Summary
Files
Defines custom data types used in API declarations for the audio module, including audio ports, adapter descriptors, device descriptors, scene descriptors, sampling attributes, and timestamp. |
|
Data Structures
Typedefs
Enumerations
Functions
GetAudioManagerFuncs (void) |
struct AudioManager * Obtains the operation function list of the AudioManager class. |
Details
Enumeration Type Documentation
AudioCategory
enum [AudioCategory]($api-api-SmartVision-Devices-Audio.md#gaf210d41d152890f3aaf2aaac99bd28d5)
Description:
Enumerates the audio category.
AUDIO_IN_MEDIA | |
AUDIO_IN_COMMUNICATION |
AudioChannelMask
enum [AudioChannelMask]($api-api-SmartVision-Devices-Audio.md#ga137eb03027d5947ea294b32f5095b83c)
Description:
Enumerates the audio channel mask.
A mask describes an audio channel position.
AUDIO_CHANNEL_FRONT_LEFT | |
AUDIO_CHANNEL_FRONT_RIGHT | |
AUDIO_CHANNEL_MONO | |
AUDIO_CHANNEL_STEREO | Stereo channel, consisting of front left and front right channels |
AudioChannelMode
enum [AudioChannelMode]($api-api-SmartVision-Devices-Audio.md#ga78aab1fafb9657451804e42b42897123)
Description:
Enumerates channel modes for audio rendering.
Attention:
The following modes are set for rendering dual-channel audios. Others are not supported.
AudioFormat
enum [AudioFormat]($api-api-SmartVision-Devices-Audio.md#ga98d5d077cca088ddf77314871474fe59)
Description:
Enumerates the audio format.
AudioPortDirection
enum [AudioPortDirection]($api-api-SmartVision-Devices-Audio.md#ga68ff7140b15790debbac4bbc62f8e9f8)
Description:
Enumerates the audio port type.
PORT_OUT | |
PORT_IN | |
PORT_OUT_IN |
AudioPortPassthroughMode
enum [AudioPortPassthroughMode]($api-api-SmartVision-Devices-Audio.md#ga186d2d4f9a2ecacb80cd2cce2bd26f0e)
Description:
Enumerates the passthrough data transmission mode of an audio port.
PORT_PASSTHROUGH_LPCM | |
PORT_PASSTHROUGH_RAW | |
PORT_PASSTHROUGH_HBR2LBR | Blu-ray next-generation audio output with reduced specifications |
PORT_PASSTHROUGH_AUTO |
AudioPortPin
enum [AudioPortPin]($api-api-SmartVision-Devices-Audio.md#gaa7114aeeccf3ac4f5f7e1d880bcfa835)
Description:
Enumerates the pin of an audio adapter.
PIN_NONE | |
PIN_OUT_SPEAKER | |
PIN_OUT_HEADSET | |
PIN_OUT_LINEOUT | |
PIN_OUT_HDMI | |
PIN_IN_MIC | |
PIN_IN_HS_MIC | |
PIN_IN_LINEIN |
AudioSampleRatesMask
enum [AudioSampleRatesMask]($api-api-SmartVision-Devices-Audio.md#ga7053fcaa56d1dc47d2fcd83ee131fe4c)
Description:
Enumerates masks of audio sampling rates.
Function Documentation
GetAudioManagerFuncs()
struct [AudioManager]($api-api-SmartVision-Devices-AudioManager.md)* GetAudioManagerFuncs (void )
Description:
Obtains the operation function list of the AudioManager class.
Returns:
Returns the pointer to the AudioManager object if the list is obtained; returns NULL otherwise.
Variable Documentation
adapterName
const char* AudioAdapterDescriptor::adapterName
Description:
Name of the audio adapter
channelCount [1/2]
uint32_t AudioSampleAttributes::channelCount
Description:
Number of audio channels. For example, for the mono channel, the value is 1, and for the stereo channel, the value is 2.
channelCount [2/2]
uint32_t AudioPortCapability::channelCount
Description:
Supported maximum number of audio channels
channelMasks
enum [AudioChannelMask]($api-api-SmartVision-Devices-Audio.md#ga137eb03027d5947ea294b32f5095b83c) AudioPortCapability::channelMasks
Description:
Audio channel layout mask of the device. For details, see AudioChannelMask.
desc [1/4]
const char* AudioDeviceDescriptor::desc
Description:
Audio device name
desc [2/4]
struct [AudioDeviceDescriptor]($api-api-SmartVision-Devices-AudioDeviceDescriptor.md) AudioSceneDescriptor::desc
Description:
Audio device descriptor
desc [3/4]
const char* AudioSceneDescriptor::SceneDesc::desc
Description:
Name of the audio scene
desc [4/4]
const char* AudioSubPortCapability::desc
Description:
Sub-port name
deviceId
uint32_t AudioPortCapability::deviceId
Description:
Device ID used for device binding
deviceType
uint32_t AudioPortCapability::deviceType
Description:
Device type (output or input)
dir
enum [AudioPortDirection]($api-api-SmartVision-Devices-Audio.md#ga68ff7140b15790debbac4bbc62f8e9f8) AudioPort::dir
Description:
Audio port type. For details, see AudioPortDirection
format
enum [AudioFormat]($api-api-SmartVision-Devices-Audio.md#ga98d5d077cca088ddf77314871474fe59) AudioSampleAttributes::format
Description:
Audio data format. For details, see AudioFormat.
formatNum
uint32_t AudioPortCapability::formatNum
Description:
Number of the supported audio formats
formats
enum [AudioFormat]($api-api-SmartVision-Devices-Audio.md#ga98d5d077cca088ddf77314871474fe59)* AudioPortCapability::formats
Description:
Supported audio formats. For details, see AudioFormat.
hardwareMode
bool AudioPortCapability::hardwareMode
Description:
Whether to support device binding
id
uint32_t AudioSceneDescriptor::SceneDesc::id
Description:
Audio scene ID
interleaved
bool AudioSampleAttributes::interleaved
Description:
Interleaving flag of audio data
mask
enum [AudioPortPassthroughMode]($api-api-SmartVision-Devices-Audio.md#ga186d2d4f9a2ecacb80cd2cce2bd26f0e) AudioSubPortCapability::mask
Description:
Passthrough mode of data transmission. For details, see AudioPortPassthroughMode.
pins
enum [AudioPortPin]($api-api-SmartVision-Devices-Audio.md#gaa7114aeeccf3ac4f5f7e1d880bcfa835) AudioDeviceDescriptor::pins
Description:
Pins of audio ports (input and output). For details, see AudioPortPin.
portId [1/3]
uint32_t AudioPort::portId
Description:
Audio port ID
portId [2/3]
uint32_t AudioDeviceDescriptor::portId
Description:
Audio port ID
portId [3/3]
uint32_t AudioSubPortCapability::portId
Description:
Sub-port ID
portName
const char* AudioPort::portName
Description:
Audio port name
portNum
uint32_t AudioAdapterDescriptor::portNum
Description:
Number of ports supported by an audio adapter
ports
struct [AudioPort]($api-api-SmartVision-Devices-AudioPort.md)* AudioAdapterDescriptor::ports
Description:
List of ports supported by an audio adapter
sampleRate
uint32_t AudioSampleAttributes::sampleRate
Description:
Audio sampling rate
sampleRateMasks
uint32_t AudioPortCapability::sampleRateMasks
Description:
Supported audio sampling rates (8 kHz, 16 kHz, 32 kHz, and 48 kHz)
scene
union [AudioSceneDescriptor::SceneDesc]($api-api-SmartVision-Devices-AudioSceneDescriptor-SceneDesc.md) AudioSceneDescriptor::scene
Description:
The scene object
subPorts
struct [AudioSubPortCapability]($api-api-SmartVision-Devices-AudioSubPortCapability.md)* AudioPortCapability::subPorts
Description:
List of supported sub-ports
subPortsNum
uint32_t AudioPortCapability::subPortsNum
Description:
Number of supported sub-ports (for output devices only)
tvNSec
int64_t AudioTimeStamp::tvNSec
Description:
Nanoseconds
tvSec
int64_t AudioTimeStamp::tvSec
Description:
Seconds
type
enum [AudioCategory]($api-api-SmartVision-Devices-Audio.md#gaf210d41d152890f3aaf2aaac99bd28d5) AudioSampleAttributes::type
Description:
Audio type. For details, see AudioCategory