Author Topic: WMA file DetectCuePoints excetpion  (Read 147 times)

Chris Oakley

  • Posts: 306
WMA file DetectCuePoints excetpion
« on: 21 Oct '24 - 12:05 »
I've come across an odd situation which I can't find any resources on. If I call the DetectCuePoints on a WMA file it causes my application to raise an exception `System.IndexOutOfRangeException` saying `Index was outside the bounds of the array.`

This is the call:
Code: [Select]
Dim _ret As Boolean = Un4seen.Bass.Utils.DetectCuePoints(m_StreamInitialId, 0.5, _duckinpos, _duckoutpos, _dbin, _dbout, 2)
It doesn't matter what WMA file I use.

For reference the variables are:
Code: [Select]
_duckinpos = -1
_duckoutpos = -1
_dbin = -16
_dbout = -16

Ian @ un4seen

  • Administrator
  • Posts: 26172
Re: WMA file DetectCuePoints excetpion
« Reply #1 on: 21 Oct '24 - 13:35 »
Un4seen.Bass.Utils.DetectCuePoints is a BASS.Net feature (it's not in BASS), so I'm not entirely sure what it's doing, but it seems unlikely that it would do something different specifically for WMA files. Are the same files playing fine with BASS_StreamCreateFile? Are you using the BASSWMA add-on or relying on Media Foundation for WMA support, and does changing that remove the DetectCuePoints problem?

Chris Oakley

  • Posts: 306
Re: WMA file DetectCuePoints excetpion
« Reply #2 on: 21 Oct '24 - 14:18 »
I'm using the BASSWMA extension and I've tried the latest version of that and it still has the error. As for it playing, I don't know, because this is coming up in an app which is used to mixdown multiple audio files, so there is no mechanism to actually play them. We have another application though which loads WMA files and that works fine.

What I have found is that if I do
Code: [Select]
Bass.BASS_PluginLoad("basswma.dll")
it loads it succesfully but calling the DetectCuePoints gives me the error and mixdown fails.

If I don't load the dll then the mixdown works and DetectCuePoints works.

Ian @ un4seen

  • Administrator
  • Posts: 26172
Re: WMA file DetectCuePoints excetpion
« Reply #3 on: 21 Oct '24 - 15:48 »
That looks like it's a BASSWMA issue then. What Windows version is it? Please try running the pre-compiled WRITEWAV.EXE example from the BASS package (C\BIN folder) with BASSWMA.DLL alongside it and see whether it can handle the WMA files, and if so, what ctype/format/length values it reports for them. And then try again without BASSWMA.DLL and see what values you get then.