Author Topic: SetPosition never returns on some files  (Read 192 times)

HarryHar

  • Posts: 147
SetPosition never returns on some files
« on: 13 Sep '17 - 11:44 »
Hello,

I have got multiple MP3 files which, when loaded into a stream, can't seek to a certain position. The SetPosition function doensn't give an error, it simply locks up and never returns.

After investigation I found that that file itself is not 100% correct, but I assumed Bass would give me an error of some kind.

I can upload a file which shows the problem.

Kind regards,
Harold Oudshoorn

Ian @ un4seen

  • Administrator
  • Posts: 20393
Re: SetPosition never returns on some files
« Reply #1 on: 13 Sep '17 - 16:22 »
Yes, please upload an affected file to have a look at here:

   ftp.un4seen.com/incoming/

Also give the BASS_StreamCreateFile and BASS_ChannelSetPosition call parameters that you're using to produce the problem.

HarryHar

  • Posts: 147
Re: SetPosition never returns on some files
« Reply #2 on: 13 Sep '17 - 19:34 »
Hello Ian,

I have uploaded the file (Harold Oudshoorn - Problem MP3 Set Position.mp3)

I call these functions with the given parameters.

 autoCueAndFade_Pos = Bass.BASS_ChannelGetLength(VisualStream);
autoCueAndFade_Pos = autoCueAndFade_Pos < 100000 ? 0 : autoCueAndFade_Pos - 100000; // step back a bit
Bass.BASS_ChannelSetPosition(VisualStream, autoCueAndFade_Pos);
VisualStream = Bass.BASS_StreamCreateFile(unmanagedPointer, 0L, sound.Length, BASSFlag.BASS_STREAM_DECODE | BASSFlag.BASS_MUSIC_PRESCAN);


Kind regards,
Harold

Ian @ un4seen

  • Administrator
  • Posts: 20393
Re: SetPosition never returns on some files
« Reply #3 on: 14 Sep '17 - 15:33 »
I don't seem to be able to reproduce the problem here, with the current BASS release or the latest build. That's on Windows; let me know if you're using a different platform.

I notice the file is too corrupt for BASS to detect as a valid MP3 file with the default BASS_CONFIG_VERIFY setting. Have you raised that setting? Perhaps the file is being handled by something else, eg. BASSWMA. To check that, what "ctype" value do you see when you call BASS_ChannelGetInfo?

HarryHar

  • Posts: 147
Re: SetPosition never returns on some files
« Reply #4 on: 14 Sep '17 - 17:36 »
Iam using windows, and I don't change the CONFIG_VERIFY setting.

The returned ctype = Un4seen.Bass.BASSChannelType.BASS_CTYPE_STREAM_MF

Ian @ un4seen

  • Administrator
  • Posts: 20393
Re: SetPosition never returns on some files
« Reply #5 on: 15 Sep '17 - 12:51 »
OK, that (BASS_CTYPE_STREAM_MF) shows that Media Foundation is being used to decode the MP3 file. What Windows version are you using?