- Home /
Clicking Audio - Is it just me?
https://docs.unity3d.com/ScriptReference/AudioSource.Play.html
When I use the default script above for playing audio, when I the pause or continue, i get a clicking sound upon pause.
Is this a known issue, or is it my computer?
I believe its something within the editor itself. I found that AudioSource.PlayOneShot() gave smoother and much nicer sounding results. However, it takes in parameters such as a position in world space and a volume to play at. If the audiosource is on the camera, then setting the position in world space to the camera.transform.position would result in the same level of volume, as well as having a nicer sounding audiosource upon pause or when playing multiple instances of the same audiosource at once.
Answer by JonPQ · Aug 28, 2020 at 07:37 AM
its a common issue, if you pause a wave-form and it suddenly goes to 0, or vice versa, un-pause and it goes from 0 to a large value... (rather than on a smooth curve) you can hear a click. ( square edge to a wave instead of smooth curve) This is also caused by poorly cropped/edited sound files that are just chopped. You can fix this by adding a short volume fade out and in, as part of the pause.
Audio engineer here, not the issue. The issue was a misunderstanding of how to properly use audio in unity.
The audio source needs to exist in your scene and not be created every time you want to use it. When I asked this it was my first few weeks using unity.
Your answer
Follow this Question
Related Questions
Clicking noise problem while combining 2 sounds in Unity 1 Answer
Using input.getbuttondown to play audio = NOT WORKING? :( 2 Answers
Song Allowments 1 Answer
How do I reduce the CPU load spike caused by playing an audio clip? 1 Answer
How can i choose what channel to play my audio by myself? 1 Answer