QSoundEffect problem :/
Hi Qt Community ,
So in my program , i have 1 QSound and 1 QSoundEffect that is configured in a certain volume .My QSoundEffect is brief , but the other QSound is used for background theme , the problem is when the brief sound is activated , it imposes its volume level on myother background sound , causing it to be almost muted.
Any ideas :) ?
I'll be grateful for your help.
I'm gonna lean out of the window a bit here.... Why not using
QSoundEffect::setVolume()to lower the volume of the sound effect?
Maybe I'm misunderstanding the problem... feel free to yell at me.
Hhhh , don't feel like yelling right now :b
But yeah , i don't think you understood clearly.
The problem in other terms is visible in these small lines of code :
backgroundTheme = new QSound("://sounds/Background.wav",this); backgroundTheme->setLoops(QSound::Infinite); backgroundTheme->play(); correctAnswer.setSource(QUrl::fromLocalFile("://sounds/Correct Answer.wav")); correctAnswer.setVolume(0.05);
As you can see , the QSoundEffect is set to low volume (because it's very loud) , while the QSound is in full volume , the problem is when i run the program , the background music is working just fine , but when the QSoundEffect plays , the background music's volume gets low (i think its volume got set to my QSoundEffect's volume)
Any ideas how to fix that :) ?
I'm afraid the answer can be really obvious ^^'
Take a look at this thread. Unless I'm mistaken it's still relevant for what you are experiencing.
Huge thanks for the shared link :)