AudioManager
Overview
Related Modules:
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
GetAllAdapters )(struct AudioManager manager, struct AudioAdapterDescriptor **descs, int32_t size) |
Obtains the list of all adapters supported by an audio driver. |
LoadAdapter )(struct AudioManager manager, const struct AudioAdapterDescriptor desc, struct AudioAdapter **adapter) |
|
UnloadAdapter )(struct AudioManager manager, struct AudioAdapter adapter) |
Details
Field Documentation
GetAllAdapters
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:
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
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:
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:
UnloadAdapter
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:
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: