Slide internal volume.
function SlideVolume(TimeFormatStart: TTimeFormat; TimeStart: TStreamTime; StartVolumeLeft: Cardinal; StartVolumeRight: Cardinal; TimeFormatEnd: TTimeFormat; TimeEnd: TStreamTime; EndVolumeLeft: Cardinal; EndVolumeRight: Cardinal): Boolean;
Parameters |
Description |
TimeFormatStart: TTimeFormat |
Time format of TimeStart parameter. With this parameter you need to specify which member of TStreamTime is valid. |
TimeStart: TStreamTime |
reference to TStreamTime structure specifying starting slide position. |
StartVolumeLeft: Cardinal |
Start volume for left channel. Range is from 0 to 100. |
StartVolumeRight: Cardinal |
Start volume for right channel. Range is from 0 to 100. |
TimeFormatEnd: TTimeFormat |
Time format of TimeEnd parameter. With this parameter you need to specify which member of TStreamTime is valid. |
TimeEnd: TStreamTime |
Reference to TStreamTime structure specifying ending slide position. |
EndVolumeLeft: Cardinal |
End volume for left channel. Range is from 0 to 100. |
EndVolumeRight: Cardinal |
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.
var StartTime: TStreamTime; EndTime: TStreamTime; Left: Integer; Right: Integer; begin player.GetPosition(StartTime); EndTime.sec := StartTime.sec + 5; player.GetPlayerVolume(Left, Right); player.SlideVolume(tfSecond, StartTime, Left, Right, tfSecond, EndTime, 100, 100); end;
Copyright (c) 2010. Zoran Cindori - All rights reserved.
Web: http://libzplay.sourceforge.net/ Email: zcindori@inet.hr |