SFML community forums
Help => Audio => Topic started by: freesoul on September 22, 2012, 11:42:42 pm
-
I have no problem with usage of sf::Music since I will use a single ambiental music for my game.
But I have doubts with the usage of sf::Sound.
I will need shot sounds and maybe other little sounds too, but what's better, a single Sound instance which plays these little sounds when is needed -stopping the previous one if is necessary- or an instance for each type of sound: shot, attack, bird, ....
Ah btw, when I run my program, even if I dont declare any sound, any music or anything that relies to audio, I hear a continuous BEEE in my speakers :S
-
I will need shot sounds and maybe other little sounds too, but what's better, a single Sound instance which plays these little sounds when is needed -stopping the previous one if is necessary- or an instance for each type of sound: shot, attack, bird, ....
It depends on what you want to do. If there can be multiple sounds at once, then use multiple objects, otherwise one instance should be enough.
Ah btw, when I run my program, even if I dont declare any sound, any music or anything that relies to audio, I hear a continuous BEEE in my speakers :S
I guess that 'BEEE' is just a high pitched humming, right?
Some graphics card can produce such strange noises (somehow) when they are at their limits.
Try to use window.setFramerateLimit(60); or similar.
-
Some graphics card can produce such strange noises (somehow) when they are at their limits.
Including when the audio cable is ungrounded (as most 1/4" or 1/8" audio cables are) and located near a power cable/source. This is called a ground-fault loop.