1.1.3.6.12 DRV_GENERICCODEC_VolumeSet Function
void DRV_GENERICCODEC_VolumeSet(DRV_HANDLE handle, DRV_GENERICCODEC_CHANNEL channel, uint8_t volume);
Summary
This function sets the volume for Generic Codec.
Description
This functions sets the volume value from 0-255.
Preconditions
The DRV_GENERICCODEC_Initialize routine must have been called for the specified Generic Codec driver instance.
DRV_GENERICCODEC_Open must have been called to obtain a valid opened device handle.
Parameters
Parameters | Description |
---|---|
handle | A valid open-instance handle, returned from the driver's open routine |
channel | argument indicating Left or Right or Both channel volume to be modified |
volume | volume value specified in the range 0-255 (0x00 to 0xFF) |
Returns
None
Remarks
None.
Example
_// myAppObj is an application specific object._ MY_APP_OBJ myAppObj;
uint8_t mybuffer[MY_BUFFER_SIZE]; DRV_BUFFER_HANDLE bufferHandle;
_// myGENERICCODECHandle is the handle returned // by the DRV_GENERICCODEC_Open function._
DRV_GENERICCODEC_VolumeSet(myGENERICCODECHandle,DRV_GENERICCODEC_CHANNEL_LEFT, 120);
C
void DRV_GENERICCODEC_VolumeSet(DRV_HANDLE handle, DRV_GENERICCODEC_CHANNEL channel, uint8_t volume);