# Sound problem in game

**URL:** <https://forum.kirupa.com/t/sound-problem-in-game/236848>\
**Category:** programming\
**Created:** [August 24, 2007, 5:36am UTC](https://forum.kirupa.com/t/sound-problem-in-game/236848 "2007-08-24T05:36:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![toast](https://avatars.discourse-cdn.com/v4/letter/t/6f9a4e/32.png) [@toast](https://forum.kirupa.com/u/toast)\
**Post date:** [August 24, 2007, 5:36am UTC](https://forum.kirupa.com/t/sound-problem-in-game/236848/1 "2007-08-24T05:36:14Z")

</div>

Hi,

I’m building a simple racing game, and I have used attachSound to place sounds on the various control buttons. I am using the Space Bar as the accelerator, but when I play the game and push the Space Bar the sound plays back with a weird echo???

Any ideas on how I can solve this?

if (Key.isDown(Key.SPACE) && this[“speed”+who]\<\_root.maxSpeed) {  
this[“speed”+who] += \_root.acceleration;  
kirupaSound.stop(“car\_idle2”);  
kirupaSound = new Sound(this);  
kirupaSound.attachSound(“shifting”);  
kirupaSound.start();  
kirupaSound.setVolume(20);  
}else if(!Key.isDown(Key.SPACE)) {  
kirupaSound.stop(“shifting”);  
kirupaSound2 = new Sound(this);  
kirupaSound2.attachSound(“car\_idle2”);  
kirupaSound2.start(0,9999);  
kirupaSound2.start();  
kirupaSound2.setVolume(5);  
}
