Waave
An audio video engine
 All Data Structures Functions Variables Groups Pages
Functions
Stream volume control

Detailed Description

Here the functions that control volume on streams that contain audio data. The volume is the multiplicator coefficient that is applied to audio samples. So a 1.0 volume value doesn't affect the original data. Note that the commands behavior is influenced by the stream parameters.

Functions

int WV_setVolume (WVStream *stream, double volume)
 Set stream volume.
double WV_getVolume (WVStream *stream)
 Get stream volume.
int WV_setDBVolume (WVStream *stream, int DBVolume)
 Change the volume in db unit.
int WV_getDBVolume (WVStream *stream)
 Get stream volume in db unit.
int WV_shiftDBVolume (WVStream *stream, int shift)
 Increase of decrease the volume in db unit.

Function Documentation

int WV_getDBVolume ( WVStream *  stream)

Get stream volume in db unit.

Parameters:
streamThe stream we get db volume

Get the current volume of a stream in db unit.

double WV_getVolume ( WVStream *  stream)

Get stream volume.

Parameters:
streamThe stream we get volume

Get the current volume of a stream.

int WV_setDBVolume ( WVStream *  stream,
int  DBVolume 
)

Change the volume in db unit.

Parameters:
streamThe stream where we adjust volume
DBVolumeThe new volume in db

Change the stream volume using the db unit. This volume setting manner take on account the logarithmic human audio perception. So a 0.0 value mean that volume stay unchanged. Positive value encrease the original volume and negative value decrease it.

This command if influenced by the choice of the db pitche. See WV_setVolumeDBPitche.

int WV_setVolume ( WVStream *  stream,
double  volume 
)

Set stream volume.

Parameters:
streamThe stream where we adjust volume
volumeThe new value of volume

Change the volume value of a stream.

int WV_shiftDBVolume ( WVStream *  stream,
int  shift 
)

Increase of decrease the volume in db unit.

Parameters:
streamThe stream where we adjust volume
shiftThe encreasing or decreasing value

Encrease on decrease the volume db value by the value given in shift.