Author Topic: Crackling sound  (Read 7962 times)

asp

  • Posts: 53
Crackling sound
« on: 9 Nov '16 - 22:27 »
Hi,

One of my users is reporting crackles and pops when playing files. I sent him the "basstest" application and the problem happens too. Any ideas about how to solve the issue?

Thanks.

Ian @ un4seen

  • Administrator
  • Posts: 26223
Re: Crackling sound
« Reply #1 on: 11 Nov '16 - 17:35 »
Is that happening when playing particular files or all files? If all files, are other (non-BASS) players also affected?

asp

  • Posts: 53
Re: Crackling sound
« Reply #2 on: 11 Nov '16 - 20:15 »
All files. The user reports that Windows Media Player works well. Besides, the user is also reporting that an old version of my software which used BASS 2.3.0.3 works fine too.

stevenmmm

  • Posts: 131
Re: Crackling sound
« Reply #3 on: 12 Nov '16 - 11:36 »
I also had one of my users report exactly the same (i wonder if its the same person). He is using the latest bass version and windows 7.

bree

  • Posts: 240
Re: Crackling sound
« Reply #4 on: 12 Nov '16 - 14:31 »
Have you guys tried increasing the buffer?
Code: [Select]
BASS_INFO info;
int additionalbuffer = 30;
if (BASS_Init(-1, frequency, BASS_DEVICE_LATENCY, 0, NULL)) {
BASS_SetConfig(BASS_CONFIG_UPDATEPERIOD, 0);
BASS_SetConfig(BASS_CONFIG_UPDATETHREADS, 0);
BASS_GetInfo(&info);
BASS_SetConfig(BASS_CONFIG_BUFFER, info.minbuf + additionalbuffer); // default buffer size
}
It usually helps on old computers.

Ian @ un4seen

  • Administrator
  • Posts: 26223
Re: Crackling sound
« Reply #5 on: 14 Nov '16 - 15:00 »
All files. The user reports that Windows Media Player works well. Besides, the user is also reporting that an old version of my software which used BASS 2.3.0.3 works fine too.

That's strange. I can't think of any changes that would cause a crackling sound. Still, does reducing the volume level (BASS_ATTRIB_VOL) have any effect on the problem? Also, just to be sure, does "all files" include different file formats?

asp

  • Posts: 53
Re: Crackling sound
« Reply #6 on: 15 Nov '16 - 19:15 »
This is what my user says:

We use mainly WAV and some MP3. Reducing the volume helps very minimally. We record 44100 sample rate and 16 bit. We tried adjusting sound card settings and no difference.

Ian @ un4seen

  • Administrator
  • Posts: 26223
Re: Crackling sound
« Reply #7 on: 16 Nov '16 - 15:10 »
Is the crackling sound constant or intermittent? If the latter, does it always happen at the same positions in the file? For comparison, please check if the user can reproduce the problem with the pre-compiled CONTEST.EXE example from the BASSWASAPI package (C\BIN folder), with or without using "-s" (for shared mode) in the command-line.

asp

  • Posts: 53
Re: Crackling sound
« Reply #8 on: 23 Nov '16 - 21:14 »
The crackling sound is constant. My user reports that the "contest" example from the WASAPI package works fine in both shared and exclusive mode.

Ian @ un4seen

  • Administrator
  • Posts: 26223
Re: Crackling sound
« Reply #9 on: 24 Nov '16 - 16:59 »
OK, so it seems like the problem is only affecting DirectSound output then. Do they happen to have another soundcard, and if so, do they get the same problem when using that in the same system? Is the problem also affecting other software that uses DirectSound output, not only BASS? What about if they try XMPlay with its DirectSound output plugin (activated in the "Output" options page)? If that is affected, what happens if they try XMPlay's default (waveOut) output system?

If you have a recording of the crackling noise, please upload that here:

   ftp.un4seen.com/incoming/

asp

  • Posts: 53
Re: Crackling sound
« Reply #10 on: 24 Nov '16 - 17:13 »
It plays fine with Windows Media Player and even with BASS 2.3. I will tell my user to try XMPlay.

I have uploaded two mp3 files: one playing fine with BASS 2.3 and another with the crackling sound and BASS 2.4.

asp

  • Posts: 53
Re: Crackling sound
« Reply #11 on: 27 Nov '16 - 10:35 »
The user says XMPlay works fine with both outputs.

Ian @ un4seen

  • Administrator
  • Posts: 26223
Re: Crackling sound
« Reply #12 on: 28 Nov '16 - 17:07 »
Very strange. To try to find out when (and then hopefully why) the problem began, I will send you some older 2.4 releases for the user to try. What is the oldest 2.4 version that you have already tried so far?

asp

  • Posts: 53
Re: Crackling sound
« Reply #13 on: 30 Nov '16 - 09:47 »
The oldest version I have tried is 2.4.4.

Ian @ un4seen

  • Administrator
  • Posts: 26223
Re: Crackling sound
« Reply #14 on: 30 Nov '16 - 17:36 »
OK. I have sent you a few older releases for the user to try.

serkanp

  • Posts: 135
Re: Crackling sound
« Reply #15 on: 5 May '17 - 19:45 »
hi ian,
i have the same problem on armv7 and some windows computers.
after working more then 3-4 hours of playback (40-50 songs), we hear a crackling sound on random parts of songs.
when moving to the next song, the crackling stops and playback works without any problem.
but then it starts on any time.
we changed / updated audio drivers on both raspberry pi 3 and windows. also tried to cool or heat the cpu to reproduce the problem again to find a pattern but its randomly happening.

do you have any idea to fix it?

Ian @ un4seen

  • Administrator
  • Posts: 26223
Re: Crackling sound
« Reply #16 on: 8 May '17 - 16:57 »
To confirm what sort of sound it is, can you upload a recording of it?

   ftp.un4seen.com/incoming/

In the ARM Linux case, are you enabling the BASS_CONFIG_DEV_NONSTOP option, and does changing that setting make any difference? Also confirm what BASS_CONFIG_DEV_BUFFER and BASS_CONFIG_DEV_PERIOD settings you're using.

serkanp

  • Posts: 135
Re: Crackling sound
« Reply #17 on: 9 May '17 - 08:37 »
We have uploaded a sample of the crackling to your FTP. We can't ls the directory, though. We can re-upload if the file on your FTP is corrupted.

As for the config bits;

- Our use case cannot use the BASS_CONFIG_DEV_NONSTOP config, so we don't have anything there
- We are currently working on the DEV_PERIOD and DEV_BUFFER configs. We'll provide details on those after our tweaking is done.

Ian @ un4seen

  • Administrator
  • Posts: 26223
Re: Crackling sound
« Reply #18 on: 9 May '17 - 15:39 »
Your recording was received. It sounds very strange. Are you having the same problem on Windows? If so, can you make a WAV recording of it within Windows (you could use the pre-compiled RECTEST.EXE example in the BASSWASAPI package to capture the output) rather than with a phone, as a phone/encoding may add its own noise? Please also confirm what file format was playing in the recording. Does the problem happen with other file formats too, eg. WAV?

serkanp

  • Posts: 135
Re: Crackling sound
« Reply #19 on: 10 May '17 - 13:59 »
hi ian,
unfortunately we cannot record in windows because as i told before, it happens on "some" computers.. not all.. not every time..
luckily we have a raspberry pi 3 that came from a customer having that problem , this raspberry pi makes crackling sound while we listen it..
sometimes after 1-2 hour, sometimes in 15 minutes, sometimes after 6-7 hours of playback.. there is no pattern..
the sound that you hear from the recording is actually the exact sound we got.. there is no extra noise :)
if you listen till the end, you will hear that music becomes normal after a time, and playback continues as normal..

if we find a windows device that causes this problem, we will request it from customer. and will try to record it.


serkanp

  • Posts: 135
Re: Crackling sound
« Reply #20 on: 10 May '17 - 15:36 »
Please also confirm what file format was playing in the recording. Does the problem happen with other file formats too, eg. WAV?

we only use mp3 files, i can provide you one example file that we are using..
all files have our standart encoding.
we re-encode all files to make them standart on max volume and min volume..

Ian @ un4seen

  • Administrator
  • Posts: 26223
Re: Crackling sound
« Reply #21 on: 10 May '17 - 17:15 »
Does the problem always happen with the same MP3 file(s) or is it random? To check if the problem may be something specific to MP3 files, could you test with WAV or AIFF files instead and see if the problem still happens then?

serkanp

  • Posts: 135
Re: Crackling sound
« Reply #22 on: 12 May '17 - 15:32 »
the problem is random.
sometimes it plays 10 days without any problem, sometimes after 10 songs, continuously.. when you skip to the next song, it becomes normal, or when song finishes , next song plays normally..
sometimes after 15 song 10 seconds.. then same song plays normally..
we have over 8.500 locations using the same player on different os'. some of them macos, some are windows (from xp to 10,2008, 2012), linux (ubuntu or debian), arm7 raspberry pi 3, arm6 raspberry pi 1..
nearly 900 of players have this problem randomly on windows and raspberry pi devices.. (only those customers reported this, we are not sure if it happens on macos or ubuntu)

in office we have a raspberry pi 3 device (with 16gb sandisk class 10 sdcard) that came from a customer having the problem. in a complete day (10 hours) , we see the problem 2-3 times a day.
while the problem occurs, we check the ram, cpu % usage, disk io etc.. all normal..

that recording is captured with phone from this raspberry pi.
do you have any debug version of bass which saves all internal events etc to a file?
so that we can maybe easily investigate the problem..

ps: we only use mp3, no aiff or wav files.. all player features are designed based on it.
ps2: we also have hifi berry sound card, it also happens with it.. so it is not a sound card problem (i guess)
« Last Edit: 12 May '17 - 15:36 by serkanp »

Ian @ un4seen

  • Administrator
  • Posts: 26223
Re: Crackling sound
« Reply #23 on: 12 May '17 - 16:43 »
If you're unable to try non-MP3 files, could you try the "mp3-free" BASS version instead? Or the standard BASS version if you are currently using the "mp3-free" version. When using the Linux "mp3-free" version, the libmpg123 library needs to be installed for MP3 support. Please also confirm whether you're using BASS_StreamCreateFile to open the files, or your own file routines with BASS_StreamCreateFileUser.

Regarding a debug BASS version, I'm not sure at this stage what events should be logged for this problem. If we can narrow it down to the MP3 decoder, then that would give us a starting point for further investigation.

serkanp

  • Posts: 135
Re: Crackling sound
« Reply #24 on: 18 May '17 - 12:45 »
yes i am using BASS_StreamCreateFile to open files.

today we will start to use mp3-free hardfp version and i will inform you about status.