BASS_StreamCreateURL hanging

Started by Chris Oakley,

Chris Oakley

I'm not sure what's going wrong here, but on a specific machine when I call:
m_StreamId = Bass.BASS_StreamCreateURL("url here", 0, BASSFlag.BASS_DEFAULT, Nothing, IntPtr.Zero)
It takes ages to load it. So far I'm only seeing it on one machine and it's any URL, although some take longer to load than others. Anywhere from 5 seconds to 2 minutes. Quite litterally holding up program execution until it's completed. It does load it, but like I say, it just takes much longer than expected.

I have BASS_CONFIG_NET_PREBUF set to 0 and BASS_CONFIG_ENCODE_QUEUE to 1000 if they're relevant.

On this machine the stream URL loads instantly in a browser or VLC.

Ian @ un4seen

When the stream is eventually created, what is its "ctype" value reported by BASS_ChannelGetInfo? If BASS_CTYPE_STREAM_MF then it may be the issue reported here:

    www.un4seen.com/forum/?topic=20857

If you haven't already done so, please try the BASS update posted there.

Chris Oakley

Yes it is BASS_CTYPE_STREAM_MF.

I've got a test app and I tried that bass.dll but swapping it out didn't work. When I rebuilt the app it was the same. I have a dropdown list with the devices in it on the app but it was blank.

My other application just crashes when I try to use that dll, crashing on the type initializer for Un4Seen.Bass.Bass.BASS_SetConfig

Chris Oakley

Ignore that about it not working. Windows Smart App control was bashing the bass.dll on the head. I disabled Smart App and it's working and indeed loads instantly.

What should we do about this as the official latest release of BASS is on 2.4.18.3 on the website?

Ian @ un4seen

Good to hear the update does fix the problem. I would suggest sticking with that for now (until the next release). The only changes from the 2.4.18.3 release version is the stuff mentioned in that thread, and support for the BASS_SAMPLE_MONO flag with Media Foundation:

    www.un4seen.com/forum/?msg=146167

Pete Hilton

It would appear that I am experiencing the same problem as described here, but am unable to resolve it using the supplied fix bass.dll. Occurs on a Proxmox VM. The same code works perfectly on another (non VM) computer

Initial Problem:
hstream = Bass.BASS_StreamCreateURL(URL,0,BASSFlag.BASS_STREAM_AUTOFREE, Nothing, 0) works (eventually) but takes approx 2m45s to complete

Using the new fix bas.dll:
"System.TypeInitializationException:"The type initializer for 'Un4seen.Bass.Bass' threw an exception
BadImageFormatException: 0x8007000B
on the initialialisation
If Not Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero) Then
Yes, the ctype value is BASS_CTYPE_STREAM_MF. Windows Smart App is deactivated

radio42

This error message often means a 64-bit process is trying to load 32-bit dll - are you may be not using the x64 version of the bass.dll?

Pete Hilton

My sincere apologies. You are right. I mistakenly installed the 32 bit version and because the symptom was similar to that of the OP I didn't check any further.
I can confirm that using the "correct" bass.dll there are no error messages and the StreamCreateURL functions correctly without any delay.
Thankyou for your assistance.