The "RenderStart" method of the WaveForm cloass also allows you to specify an already prepared decoding stream instead of a file.
So if BASS_DSHOW offers the creation of decoding streams you might use the WaveForm with it.
Unfortunately that doesn't work. It also doesn't render a waveform for any audio now either. I think the problem is in the fact that in the NEW method for creating the waveform, in order to have a callback proceedure for background wave generation, you have to specify the file name as well. Here's my code and you can see the old "commented out" renderstart method I previously used.
#Region "WaveForm Subs"
Private Sub ShowWaveForm()
' setup waveform
SetupWaveForm()
DrawWave()
End Sub
Private Sub DrawWave(Optional ByVal highQuality As Boolean = False)
If Not wf Is Nothing Then
Me.pbPosition.BackgroundImage = wf.CreateBitmap(Me.pbPosition.Width, Me.pbPosition.Height, -1, -1, highQuality)
If wf.IsRenderingInProgress Then Exit Sub
Else
Me.pbPosition.BackgroundImage = Nothing
End If
End Sub
Private Sub SetupWaveForm()
wf = New WaveForm(frmMain.PlayerTemp.Path, New WAVEFORMPROC(AddressOf MyWaveFormCallback), Me)
wf.FrameResolution = 0.01
wf.DrawEnvelope = False
wf.CallbackFrequency = 500 ' in milliseconds
wf.ColorBackground = My.Settings.skinFormBackColor ' Color.Black
wf.ColorLeft = My.Settings.skinWaveformForeColor ' Color.FromArgb(255, 0, 0, 85) ' Color.MidnightBlue
wf.ColorRight = My.Settings.skinWaveformForeColor ' Color.FromArgb(255, 0, 0, 85) ' Color.MidnightBlue
'wf.RenderStart(True, BASSFlag.BASS_SAMPLE_FLOAT Or BASSFlag.BASS_STREAM_PRESCAN)
wf.RenderStart(frmMain.PlayerTemp.Stream, True)
End Sub
Private Sub MyWaveFormCallback(ByVal framesDone As Integer, ByVal framesTotal As Integer, ByVal elapsedTime As TimeSpan, ByVal finished As Boolean)
' will be called during rendering...
DrawWave(False)
If finished Then
DrawWave(True)
End If
End Sub
#End Region