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

kozima

  • 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_SetConfig(BASSConfig.BASS_CONFIG_NET_BUFFER,6000);
 Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_NET_READTIMEOUT, 10000);
 Bass.BASS_Init(-1, 11025, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
 BassHls.LoadMe();

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?
Thanks


radio42

  • Posts: 4597
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.

radio42

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

Full Install:
 www.un4seen.com/filez/4/Bass24.Net.zip

Lib only:
 www.un4seen.com/filez/4/Bass24.Net_update.zip

kozima

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