Main siteMain site  ForumForum  ForumSearch  Private messageEmail contact  RegisterRegister  Log inLog in 
Topic: crack audio file (playing mp3)
Reply to topic
Author Message
Giannis76



Joined: Jan 11, 2023
Posts: 40

PostPosted: Jun 20, 2024 1:49 PM    Post subject: "cracking/clicking" sound when playing an mp3 file

Hi Jarek and others,

I have a simple design - basically an amplitude training protocol. When using mp3 audio files, I always here some
ckracking/clicking disturbing sound. To get rid of it, I tried different things:

1) changing buffer length (that helped a bit)
2) changing windows audio settings (helpful advices found in the net)
3) editining mp3 file (creating fade in and out in the audio file)
4) buying an external soundcard

All the things di not help. So I conclude, that there is a design issue. Can anybody help me with that or has solutions - already mastered that problem?

My design is:
Input (logical On/off) of a sound file reader element is triggered by threshold movement, as in the example files. Configuration of Soundfilreader is: output buffer length 0.2, read at start, caches files during runtime, sample rate: 44100.
From sound file reader scalar left and scalare right go out and into PCMAudioPlayer (device: default, buffer length 0.3, sample rate: auto detect). Request Event of PCMAudioPlayer goes back to sound file reader.

What else can I do to solve the issue?

Thanks for feedback!
jarek



Joined: Oct 22, 2007
Posts: 1044

PostPosted: Jun 23, 2024 6:12 PM    Post subject:

Changing the buffer size in PCMAudioPlayer would be my first idea.

Change it to something much higher like 0.5 seconds.

It might be best to test it with the ContinuousTone example to make sure the PCMAudioPlayer is properly configured.
Giannis76



Joined: Jan 11, 2023
Posts: 40

PostPosted: Jun 24, 2024 6:47 AM    Post subject:

Ok. I will try it. Is it also a good idea to put the PCMEnvelope element between the soundfilereader element and the PCMAudioPlayer?
jarek



Joined: Oct 22, 2007
Posts: 1044

PostPosted: Jun 29, 2024 9:06 PM    Post subject:

Probably not unless you know exactly what you are doing. PCMEnvelope modulates the amplitude, it has been used with pure sine artificially generated sounds, not sure how useful it can be with MP3.
Reply to topic