Author Topic: "Breaks" when playing some audio files with BASS 2.4  (Read 2832 times)

FRadio

  • Guest
Hi Ian (and other BASS experts),

We detected some "breaks" when playing some audio files with BASS 2.4. Please, check the file:

http://central.informa.inf.br/downloads/13492.mp3

You will notice the first break in the range [01:05s, 01:10s].

We tested it in different computers, with different audio cards, and the breaks occurred in all of them. We also tested it with basstest.exe and got the same result. We check the spectrum of that audio file in an audio editor and found no break.

It's important to say that the problem doesn't happen with BASS 2.3, just with 2.4.

The simple code bellow reproduces the problem:
Code: [Select]
BASS_Init( -1, 44100, 0, NULL, NULL);
HSTREAM stream = BASS_StreamCreateFile(FALSE, "13492.mp3", 0, 0, BASS_STREAM_AUTOFREE);
BASS_ChannelSetPosition(stream, BASS_ChannelSeconds2Bytes(stream, 65.0f), BASS_POS_BYTE);
BASS_ChannelPlay(stream, FALSE);

We tried to set different buffer lengths with BASS_CONFIG_BUFFER, but without success.

Please, how could we solve that? Itís urgent.

Thank in advance.

Ian @ un4seen

  • Administrator
  • Posts: 20396
Re: "Breaks" when playing some audio files with BASS 2.4
« Reply #1 on: 16 Jul '10 - 15:27 »
BASS is detecting some corruption in that file, but it's perhaps being a bit too hasty in silencing it (which is intended to avoid unpleasant noises). Do you have the problem with other MP3 files too? If so, to help finetune things, please also upload them to have a look at...

   ftp.un4seen.com/incoming/

FRadio

  • Guest
Re: "Breaks" when playing some audio files with BASS 2.4
« Reply #2 on: 16 Jul '10 - 21:24 »
Thanks Ian.

Quote
Do you have the problem with other MP3 files too?
Yes. Please, download these 4 other files. I had problems in uploading them to your ftp.

http://central.informa.inf.br/downloads/11759.mp3
http://central.informa.inf.br/downloads/13485.mp3
http://central.informa.inf.br/downloads/13501.mp3
http://central.informa.inf.br/downloads/13523.mp3

The breaks are at:

11759.mp3 -> around 01:29s
13485.mp3 -> around 00:30s, 01:23s
13501.mp3 -> around 02:28s, 03:07s
13523.mp3 -> around 00:12s

Thanks again!

Ian @ un4seen

  • Administrator
  • Posts: 20396
Re: "Breaks" when playing some audio files with BASS 2.4
« Reply #3 on: 20 Jul '10 - 16:48 »
Thanks. All of those files have some corruption/errors, but here's an update to try, which should let them through but still remove most unpleasant noises...

   www.un4seen.com/stuff/bass.dll

Let me know if you still have any trouble with it.

FRadio

  • Guest
Re: "Breaks" when playing some audio files with BASS 2.4
« Reply #4 on: 20 Jul '10 - 19:53 »
Thank a lot, Ian.

The update has significantly improved the playback of the corrupted regions. We still notice a very small "tick" in some ones (the most perceptive is in the 11759.mp3 file).

Does Bass 2.3 have a resourse to remove unpleasant noises? I'm just saying it because we noticed no break using Bass 2.3. Wouldn't be interesting to have a function/flag in Bass 2.4 to disable/enable this resource?

Thank you much again.

Ian @ un4seen

  • Administrator
  • Posts: 20396
Re: "Breaks" when playing some audio files with BASS 2.4
« Reply #5 on: 21 Jul '10 - 16:42 »
There was less corruption/error detection in BASS 2.3, which meant that more unpleasant noises (eg. squeaks) could get through. You can hear an example of that at 53s in the 11759.MP3 file with BASS 2.3, which is removed by 2.4.

BASS doesn't know exactly where the errors are (eg. what frequencies), just that there is at least one of them in a frame/granule, so the only options available are to reject the entire frame/granule or let it (including the errors) through, ie. the errors can't be corrected. It may be that sometimes the errors are small enough to not really be audible (as at some points in your example files), but there are also times when seemingly small errors can result in unpleasant noises.

If you would like to be able to disable the error checking, here's an update to try...

   www.un4seen.com/stuff/bass.dll

It adds the following BASS_SetConfig option...

Code: [Select]
#define BASS_CONFIG_MP3_ERRORS 35

Set that to 1 to ignore the errors. Note it won't disable all error checking, just this particular type of error (in the Huffman coding).

FRadio

  • Guest
Re: "Breaks" when playing some audio files with BASS 2.4
« Reply #6 on: 22 Jul '10 - 04:55 »
Ian, thank you so much for your assistance.