Slide internal volume.
public bool SlideVolume(TTimeFormat TimeFormatStart, ref TStreamTime TimeStart, int StartVolumeLeft, int StartVolumeRight, TTimeFormat TimeFormatEnd, ref TStreamTime TimeEnd, int EndVolumeLeft, int EndVolumeRight);
Parameters |
Description |
TTimeFormat TimeFormatStart |
Time format of TimeStart parameter. With this parameter you need to specify which member of TStreamTime is valid. |
ref TStreamTime TimeStart |
reference to TStreamTime structure specifying starting slide position. |
int StartVolumeLeft |
Start volume for left channel. Range is from 0 to 100. |
int StartVolumeRight |
Start volume for right channel. Range is from 0 to 100. |
TTimeFormat TimeFormatEnd |
Time format of TimeEnd parameter. With this parameter you need to specify which member of TStreamTime is valid. |
ref TStreamTime TimeEnd |
Reference to TStreamTime structure specifying ending slide position. |
int EndVolumeLeft |
End volume for left channel. Range is from 0 to 100. |
int EndVolumeRight |
End volume for right channel. Range is from 0 to 100. |
Return Values |
Description |
True |
All OK. |
False |
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 functions will cancel slide effect.
int left = 0; int right = 0; TStreamTime startpos = new TStreamTime(); TStreamTime endpos = new TStreamTime(); player.GetPlayerVolume(ref left, ref right); player.GetPosition(ref startpos); endpos.sec = System.Convert.ToUInt32(startpos.sec + 5); player.SlideVolume(TTimeFormat.tfSecond, ref startpos, left, right, TTimeFormat.tfSecond, ref endpos, 0, 0);
Copyright (c) 2010. Zoran Cindori - All rights reserved.
Web: http://libzplay.sourceforge.net/ Email: zcindori@inet.hr |