AudioManager

Overview

Related Modules:

Audio

Description:

Manages audio adapters through a specific adapter driver program loaded based on the given audio adapter descriptor.

Since:

1.0

Version:

1.0

Summary

Data Fields

Variable Name

Description

GetAllAdapters )(struct AudioManagermanager, struct AudioAdapterDescriptor **descs, int32_t size)

int32_t( 

Obtains the list of all adapters supported by an audio driver.

LoadAdapter )(struct AudioManager manager, const struct AudioAdapterDescriptordesc, struct AudioAdapter **adapter)

int32_t( 

Loads the driver for an audio adapter.

UnloadAdapter )(struct AudioManagermanager, struct AudioAdapteradapter)

void(* 

Unloads the driver of an audio adapter.

Details

Field Documentation

GetAllAdapters

  1. int32_t(*AudioManager::GetAllAdapters)(struct[AudioManager]($api-api-SmartVision-Devices-AudioManager.md)*manager,struct[AudioAdapterDescriptor]($api-api-SmartVision-Devices-AudioAdapterDescriptor.md)**descs,int32_t*size)

Description:

Obtains the list of all adapters supported by an audio driver.

Parameters:

Name

Description

managerIndicates the pointer to the audio adapter manager to operate.
descsIndicates the double pointer to the audio adapter list.
sizeIndicates the pointer to the length of the list.

Returns:

Returns 0 if the list is obtained successfully; returns a negative value otherwise.

See also:

LoadAdapter

LoadAdapter

  1. int32_t(*AudioManager::LoadAdapter)(struct[AudioManager]($api-api-SmartVision-Devices-AudioManager.md)*manager,conststruct[AudioAdapterDescriptor]($api-api-SmartVision-Devices-AudioAdapterDescriptor.md)*desc,struct[AudioAdapter]($api-api-SmartVision-Devices-AudioAdapter.md)**adapter)

Description:

Loads the driver for an audio adapter.

For example, to load a USB driver, you may need to load a dynamic-link library (*.so) in specific implementation.

Parameters:

Name

Description

managerIndicates the pointer to the audio adapter manager to operate.
descIndicates the pointer to the descriptor of the audio adapter.
adapterIndicates the double pointer to the audio adapter.

Returns:

Returns 0 if the driver is loaded successfully; returns a negative value otherwise.

See also:

GetAllAdapters

UnloadAdapter

  1. void(*AudioManager::UnloadAdapter)(struct[AudioManager]($api-api-SmartVision-Devices-AudioManager.md)*manager,struct[AudioAdapter]($api-api-SmartVision-Devices-AudioAdapter.md)*adapter)

Description:

Unloads the driver of an audio adapter.

Parameters:

Name

Description

managerIndicates the pointer to the audio adapter manager to operate.
adapterIndicates the pointer to the audio adapter whose driver will be unloaded.

See also:

LoadAdapter