BASS_SetVolume
Sets the output master volume.
BOOL BASS_SetVolume( float volume );
Parameters
volume | The volume level... 0 (silent) to 1 (max). |
Return value
If successful, then TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.Error codes
BASS_ERROR_INIT | BASS_Init has not been successfully called. |
BASS_ERROR_NOTAVAIL | There is no volume control when using the "no sound" device. |
BASS_ERROR_ILLPARAM | volume is invalid. |
BASS_ERROR_UNKNOWN | Some other mystery problem! |
Remarks
The actual volume level may not be exactly the same as requested, due to underlying precision differences. BASS_GetVolume can be used to confirm what the volume is.This function affects the volume level of all applications using the same output device. If you wish to only affect the level of your application's sounds, the BASS_ATTRIB_VOL attribute and/or the BASS_CONFIG_GVOL_MUSIC / BASS_CONFIG_GVOL_SAMPLE / BASS_CONFIG_GVOL_STREAM config options should be used instead.
When using multiple devices, the current thread's device setting (as set with BASS_SetDevice) determines which device this function call applies to.