1

I tried to use in my Unity game a sound I found on the internet that I slightly changed through Audacity. But I ran into a problem: when I close my game and the sound abruptly stops, there's a distortion, like a clap sound. So I decided to check if the reason in my sound, not in game settings, and loaded some song instead of it, and had no distortion in that case. So, it seems like the problem is in my audio clip and its settings, but I'm apparently very new to audio production, so I have no idea what could be the reason. Thanks in advance.

Here is the sound I used in my game: https://freesound.org/people/Lemoncreme/sounds/231578/

3
  • I can't repro the click in either Audacity or Cubase.
    – Tetsujin
    Jun 27, 2020 at 17:56
  • @Tetsujin On a cheap speaker, as the one on my phone you'd hear that. Other songs, sounds don't have such problems on the same phone, so it seems like there's something specific about that audio. It's not that I cannot live without it, but I need to understand what to do to avoid such problems with other sounds. Thank you for trying to help me.
    – g.hagmt
    Jun 27, 2020 at 19:24
  • I had a quick look at that clip as well - in audacity, and in cubase - I can't reproduce it either.
    – Rory Alsop
    Jul 28, 2020 at 20:34

2 Answers 2

1

Without seeing the waveform, the best guess is it could be DC Offset, or it could be a limitation of the audio engine.

If a waveform is at any non-zero value when the sound is abruptly stopped, then the speakers are suddenly released back to zero with no smoothing. An audio app ought to be able to handle this itself in consumer applications, but if this isn't the case, then it may happen with any wave that's stopped at a non-zero cross point.
If this is only happening on one wave, then DC offset might be the culprit.

Audacity has an option in Normalise to check & correct for this.

enter image description here

From Audacity manual - DC Offset

3
  • Thanks for your answer. No, it's not DC offset b/c I tried to normalize with DC offset correction though it looked ok already, and I got no improvements.
    – g.hagmt
    Jun 27, 2020 at 13:07
  • Then we're back to my opening statement… 'without seeing the waveform' or indeed hearing it.. there's nothing else I can add.
    – Tetsujin
    Jun 27, 2020 at 13:17
  • Ok, here is the sound: freesound.org/people/Lemoncreme/sounds/231578. Now I imported it not changing anything, and it seems like the original audio has something that causes those problems.
    – g.hagmt
    Jun 27, 2020 at 16:52
1

You need to re-edit the sound and implement a very short fade-in and fade-out at the start and end of the sample.

1
  • How that would help, considering that I have problems when stopping my audio clip in the middle?
    – g.hagmt
    Jun 29, 2020 at 9:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.