I use BASS_StreamCreateURL in this mode
sourceUrl = "
http://159.253.145.180:7002"
stream1 = Bass.BASS_StreamCreateURL(sourceUrl, 0, BASSFlag.BASS_MUSIC_DECODE, Nothing, Me.Handle)
Then i use BASS_ChannelGetData for to load data
is this code correct ? because when i save data to the file mp3 is not correct .
Dim _data1 As Byte = New Byte(1000) {}
Dim _fs1 As FileStream
Dim retBytes As Integer
_fs1.OpenWrite("out.mp3")
Do While Bass.BASS_ChannelIsActive(stream1) = BASSActive.BASS_ACTIVE_PLAYING
retBytes = Bass.BASS_ChannelGetData(stream1, _data1, 1000)
_fs1.Write(_data1, 0, retBytes)
Loop
When I debug this code, the first time i see inside _data1 all 0 bytes, then after about 3 o 4 loop I see values bytes not 0 .
But when I stop loop and close file, I listen file on Windows Media Player and it get error
I hear the file out.mp3 only to verify if it is correct, but I don't need hear it . I must only save it.