Author Topic: BASS_AAC_StreamCreateURL debug error.  (Read 5202 times)


  • Posts: 20
BASS_AAC_StreamCreateURL debug error.
« on: 29 Mar '09 - 11:00 »
hi ,my english is bad.

I listen to a streaming Internet radio on the AAC

However, I detect the use of radio information BASS_ChannelGetInfo error.

Program debug crash.

The use of AAC format radio. BASS_AAC_StreamCreateURL but do not listen. BASS_PluginLoad and must be used before they can listen to BASS_StreamCreateURL.


Code: [Select]
Option Explicit
Private chan     As Long

Private Sub Command1_Click()
    BASS_StreamFree chan
    chan = BASS_AAC_StreamCreateURL("", 0, BASS_STREAM_BLOCK Or BASS_STREAM_STATUS, 0, 0)
    If chan = 0 Then chan = BASS_StreamCreateURL("", 0, BASS_STREAM_BLOCK Or BASS_STREAM_STATUS, 0, 0)

    If chan = 0 Then Exit Sub

    Debug.Print chan
    BASS_ChannelGetInfo chan, BassInfo ' Debug error. Program debug crash.
    Debug.Print BassInfo.ctype
    Debug.Print BassInfo.chans
    Debug.Print BassInfo.freq
    Debug.Print VBStrFromAnsiPtr(BassInfo.filename)
    Call BASS_ChannelPlay(chan, BASSFALSE)
End Sub
Private Sub Form_Load()
    ChDrive App.Path
    ChDir App.Path
    If (BASS_Init(-1, 44100, 4, Me.hWnd, 0) = 0) Then End
    BASS_PluginLoad App.Path & "\bass_aac.dll", 0
End Sub
Private Sub Form_Unload(Cancel As Integer)
    BASS_PluginFree 0
End Sub

Ian @ un4seen

  • Administrator
  • Posts: 21370
Re: BASS_AAC_StreamCreateURL debug error.
« Reply #1 on: 30 Mar '09 - 14:47 »
Trying it just now (but in C rather than VB), BASS_ChannelGetInfo seems to be fine with AAC streams. You could check that you are using the correct BASS.BAS file, eg. if you're using BASS 2.4 you also need to use the BASS 2.4 version of BASS.BAS so that you have the correct BASS_CHANNELINFO definition.