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