- Home /
Why is this AudioClip quieter 2nd time played?
Try it here: http://beanalby.net/unityAnswers/audioBug.html
Project source: http://beanalby.net/unityAnswers/audioBug.zip
Video of what I hear: http://www.youtube.com/watch?v=4C6oGh8H8kQ
EDIT: Apparently this is just my desktop's onboard sound (Realtek ALC662); using my Logitech G330 USB headset doesn't have the problem. Happens in Unity editor, web player, and standalone build, and persists through reboot.
Play clip1, clip2, and then clip1 again - clip1 is quieter the 2nd time. Why? There's nothing in the script that does it:
public void OnGUI() {
if(GUI.Button(new Rect(0, 0, 300, 200), "Play1")) {
source.clip = clip1;
source.Play();
}
if(GUI.Button(new Rect(400, 0, 300, 200), "Play2")) {
source.clip = clip2;
source.Play();
}
}
Here's a waveform of the output. I did clip1, clip2, clip1, clip2.
Try putting Debug.Log(source.volume)
before source.Play()
. Also try setting source.volume = 1 explicitly.
Confirmed that source.volume
is 1 throughout the program.
Are you sure it's actually quieter? Sounds the same to me. Perhaps because the second one is so much louder than the first clip that there's the illusion that it's quieter.
It's definitely quieter, the waveform image verifies it. It could be something specific to my desktop, though. I'll have to try it on another machine.
Same here, can't tell any change in the volume of the clips..