VB中如何做到千千静听里的视觉效果

来源:百度知道 编辑:UC知道 时间:2024/05/27 09:43:25
我们用VB做个播放器,请问各位大仙如何才能做出类似梦幻星空的效果啊???

我有个例子,下面部分代码:
' 绘制波形
If (Module1.format.nChannels = 2) Then
maxAmplitude = Me.Height / 4
leftYOffset = maxAmplitude
rightYOffset = maxAmplitude * 3

For x = 0 To Me.Width Step xStep
curSample = scaleFactor * x + Module1.drawFrom
If (Module1.format.wBitsPerSample = 16) Then
GetStereo16Sample curSample, leftVol, rightVol
Else
GetStereo8Sample curSample, leftVol, rightVol
End If
curRightY = CLng(rightVol * maxAmplitude)
curLeftY = CLng(leftVol * maxAmplitude)
Line (lastX, leftYOffset + lastLeftY)-(x, curLeftY + leftYOffset)
Line (lastX, rightYOffset + lastRightY)-(x, curRightY + rightYOffset)
lastLeftY = curLeftY
lastRightY = curRightY
lastX = x
Next
Else
maxAmplitude = Me.Height / 2
le