edit: Nevermind, after checking out a few threads I see that ASX streams need to use the BASSenc with BASS_WMA_StreamCreateURL.After using the BASSWMA.DLL, I was able to connect & listen to an ASX stream. But unfortunately, when I try to record it, the DOWNLOADPROC handler doesn't seem to be executing. When I try it with a regular .pls stream the recording function works perfect, so this leads me to believe it's an issue with WMA/ASX streams.
Here's part of the sample code I'm trying to use:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim CI As New Un4seen.Bass.BASS_CHANNELINFO
Dim TI As New Un4seen.Bass.AddOn.Tags.TAG_INFO
Bass.BASS_PluginLoad("basswma.dll")
Un4seen.Bass.Bass.BASS_SetConfig(Un4seen.Bass.BASSConfig.BASS_CONFIG_NET_PLAYLIST, 1)
Dim strm As String = "http://127.0.0.1:51710/sirius?channel=100&format=asx"
Dim stream
_myDownloadProc = New DOWNLOADPROC(AddressOf MyDownload)
stream = Bass.BASS_StreamCreateURL(strm, 0, BASSFlag.BASS_DEFAULT, _myDownloadProc, IntPtr.Zero)
Bass.BASS_ChannelPlay(stream, False)
Timer1.Enabled = True
End Sub
Private Sub MyDownload(ByVal buffer As IntPtr, ByVal length As Integer, ByVal user As IntPtr)
If _fs Is Nothing Then
' create the file
_fs = File.OpenWrite("output.mp3")
End If
' increase the data buffer as needed
If _data Is Nothing OrElse _data.Length < length Then
_data = New Byte(length) {}
End If
' copy from managed to unmanaged memory
Marshal.Copy(buffer, _data, 0, length)
' write to file
_fs.Write(_data, 0, length)
End Sub
From my test, the "MyDownload" sub isn't being executed when connected to an ASX stream.
Is there any way I can go about this? Thanks in advance[/s]