Slide internal volume.
virtual __stdcall int SlideVolume(int fFormatStart, TStreamTime * pTimeStart, unsigned int nStartVolumeLeft, unsigned int nStartVolumeRight, int fFormatEnd, TStreamTime * pTimeEnd, unsigned int nEndVolumeLeft, unsigned int nEndVolumeRight) = 0;
Parameters |
Description |
int fFormatStart |
Time format of pTimeStart parameter. With this parameter you need to specify which member of TStreamTime is valid. |
TStreamTime * pTimeStart |
Pointer to TStreamTime structure specifying starting slide position. |
unsigned int nStartVolumeLeft |
Start volume for left channel. Range is from 0 to 100. |
unsigned int nStartVolumeRight |
Start volume for right channel. Range is from 0 to 100. |
int fFormatEnd |
Time format of pTimeEnd parameter. With this parameter you need to specify which member of TStreamTime is valid. |
TStreamTime * pTimeEnd |
Pointer to TStreamTime structure specifying ending slide position. |
unsigned int nEndVolumeLeft |
End volume for left channel. Range is from 0 to 100. |
unsigned int nEndVolumeRight |
End volume for right channel. Range is from 0 to 100. |
Return Values |
Description |
1 |
All OK. |
0 |
Error. To get error message read here. |
This function will slide change player volume from starting volume to ending volume in specified interval.
Note: Accuracy of pTimeStart and pTimeEnd is not up to sample. Accuracy is about 50 ms. So, you can't fade volume with sample precision.
Note: SetPlayerVolume or zplay_SetPlayerVolume functions will cancel slide effect.
Slide volume from 100 to 0 in interval of 5 seconds.
TStreamTime start; TStreamTime end; instance->GetPosition(&start); end.sec = start.sec + 5; instance->SlideVolume(tfSecond, &start, 100,100, tfSecond, &end, 0,0);
TStreamTime start; TStreamTime end; instance->GetPosition(&start); end.sec = start.sec + 5; zplay_SlideVolume(instance, tfSecond, &start, 100,100, tfSecond, &end, 0,0);
Copyright (c) 2010. Zoran Cindori - All rights reserved.
Web: http://libzplay.sourceforge.net/ Email: zcindori@inet.hr |