libZPlay documentation (Win32)
IndexReferenceHome
PreviousUpNext
libZPlayCpp::zplay_SetPlayerVolume Function

Set internal volume.

C++
__stdcall __declspec(dllimport) int zplay_SetPlayerVolume(ZPLAY_HANDLE handle, unsigned int nLeftVolume, unsigned int nRightVolume);
Parameters 
Description 
ZPLAY_HANDLE handle 
ZPLAY handle. Get this handle with zplay_CreateZPlay. 
unsigned int nLeftVolume 
Specifies volume for left channel. Volume range is from 0 to 100. 
unsigned int nRightVolume 
Specifies volume for right channel. Volume range is from 0 to 100. 
Return Values 
Description 
1 
All OK. 
0 
Error. To get error message read here. 

This function changes internal volume without affecting wave out device driver and computer master volume. You can set internal volume on each interface instance separately. 

Note: This function will cancel slide volume effect. 

Separate volume control for each song. 

ZPlay C++ Class interface  

instance1->SetPlayerVolume(100, 100); // one song is playing with 100 % volume
instance2->SetPlayerVolume(47, 47); // another song is playing with 47 % volume

 

C Style interface

zplay_SetPlayerVolume(instance1, 100, 100); // one song is playing with 100 % volume
zplay_SetPlayerVolume(instance2, 47, 47); // another song is playing with 47 % volume
Copyright (c) 2010. Zoran Cindori - All rights reserved.

Web: http://libzplay.sourceforge.net/

Email: zcindori@inet.hr