loveablepocky
15th February 2011, 22:42
Hi,
I'm new to Qt and lately I've been working on a project that has is using setDown() to hold down a button when the user holds down a key on the keyboard. I linked a sound to it as well and it seems to be playing when the user holds down the key and stops when the user no longer holds the key down. I'm using QSound since I'm unable to configure Phonon onto my windows computer.
The problem is, when the sound is played for longer than a second or so, it starts looping itself, making it sound like a glitch. It's similar to if you hold down the letter "a", then the first one appears, but a whole bunch of "a" appears after it. Is there a way to fix this so that when the key is held down, the sound is only played once so it doesn't sound like a glitch sound?
Thank you.
I'm new to Qt and lately I've been working on a project that has is using setDown() to hold down a button when the user holds down a key on the keyboard. I linked a sound to it as well and it seems to be playing when the user holds down the key and stops when the user no longer holds the key down. I'm using QSound since I'm unable to configure Phonon onto my windows computer.
The problem is, when the sound is played for longer than a second or so, it starts looping itself, making it sound like a glitch. It's similar to if you hold down the letter "a", then the first one appears, but a whole bunch of "a" appears after it. Is there a way to fix this so that when the key is held down, the sound is only played once so it doesn't sound like a glitch sound?
Thank you.