Author Topic: BASS.Net - PinvokeStackImbalance when called BASS_HLS_StreamCreateURL  (Read 1018 times)


  • Posts: 12
Hi, I'm trying to record a hls stream but i'm getting an PinvokeStackImbalance error.
I have downloaded all the .dll files(the most recent version of them) into the bin folder and following is my code:

 Bass.BASS_Init(-1, 11025, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);

int stream = BassHls.BASS_HLS_StreamCreateURL(url, 0,
                                  BASSFlag.BASS_SAMPLE_MONO | BASSFlag.BASS_STREAM_AUTOFREE, null, (IntPtr)idStation);

Bass.BASS_ChannelPlay(stream, false);

The error log shows that the function PInvoke 'Bass.Net!Un4seen.Bass.AddOn.Hls.BassHls::BASS_HLS_StreamCreateURLUnicode' has caused the problem

Someone knows how to fix this?


  • Posts: 4718
Yes, it seems, the signature is wrong in the BASS_HLS_StreamCreateURL method (it contains an offset parameter, like all other URL methods, which infortunately doesn't exsist for HLS).
I need to build a new release to fix that, which should either be available later today or at least on monday.


  • Posts: 4718
A new v2.4.13.1 is available for download...

Full Install:

Lib only:


  • Posts: 12
Thanks radio42 :)
« Last Edit: 26 Jan '18 - 19:36 by kozima »