Un4seen.Bass.Utils.DetectCuePoints blocks execution.

Started by Chris Oakley,

Chris Oakley

I've found another interesting problem with the Un4seen.Bass.Utils.DetectCuePoints call where it hangs up and never returns, thus blocking the execution of the thread or application.

If you open VB.NET and place this routine in a button, for example, then it will very quickly show the problem where it just hangs up.
        Do
            Dim _sourcefile As String = "532220-a.flac"
            Dim _stream As Integer = Bass.BASS_StreamCreateFile(_sourcefile, 0, 0, BASSFlag.BASS_STREAM_DECODE Or BASSFlag.BASS_STREAM_PRESCAN)
            If _stream <> 0 Then
                Debug.Print(Now.ToString)
                Dim _cuein As Double = 0
                Dim _cueout As Double = 0
                Dim _ok As Boolean = Un4seen.Bass.Utils.DetectCuePoints(_stream, 1, _cuein, _cueout, -10, -10, 2)
                Bass.BASS_StreamFree(_stream)
            End If
            Application.DoEvents()
        Loop

I must emphasise this is purely an example block to illustrate the problem. If you unzip the attached file and use that you should quickly see the problem.

Chris

is it a typo ?
so far I know is BASS_SAMPLE_FLOAT in the creation stream needed.

Chris Oakley

Thanks for that suggestion Chris, but sadly it doesn't work. The problem is still there.

Chris Oakley

Going out on a limb here, but it seems that calling a PluginLoad and loading the bassflac.dll fixes the issue. Been running with it and without it and without it freezes very quickly. With the PluginLoad, no issues.

Ian @ un4seen

Was this problem only happening with FLAC files? If so, it does seem likely to be the same issue as in your other thread, where it was getting stuck in the Media Foundation FLAC decoder and using BASSFLAC instead avoided that.

Chris Oakley