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 AudioManager manager, 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 AudioAdapterDescriptor desc, struct AudioAdapter **adapter)

int32_t( 

Loads the driver for an audio adapter.

UnloadAdapter )(struct AudioManager manager, struct AudioAdapter adapter)

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

manager Indicates the pointer to the audio adapter manager to operate.
descs Indicates the double pointer to the audio adapter list.
size Indicates 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, const struct [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

manager Indicates the pointer to the audio adapter manager to operate.
desc Indicates the pointer to the descriptor of the audio adapter.
adapter Indicates 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

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

See also:

LoadAdapter