
Ian, Thank you very much. That works to perfection. I've included the same snippet written for us more verbose VB developers with a slight twist. In the VB example below, I'm encoding to a network port but the results are the same. Your code works beautifully.
Dim _Stream As Integer
Dim info As New BASS_CHANNELINFO
Dim enc As Integer
_Stream = BassWma.BASS_WMA_StreamCreateFile(url, 0, 0, BASSStream.BASS_STREAM_DECODE)
Bass.BASS_ChannelGetInfo(_Stream, info) ' get stream format info
enc = BassWma.BASS_WMA_EncodeOpenNetwork(info.freq, _
info.chans, _
BASSWMAEncode.BASS_WMA_ENCODE_DEFAULT, _
64000, _
8080, _
3)
While Bass.BASS_ChannelIsActive(_Stream)
Dim c As Integer = Bass.BASS_ChannelGetData(_Stream, _recbuffer, 20000)
If c > 0 Then
BassWma.BASS_WMA_EncodeWrite(enc, _recbuffer, c)
Else
Thread.Sleep(100)
End If
End While
Again, thanks for all your help.