Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / can still hear sound instance despite volume set to 0

Author
Message
TDavid
11
Years of Service
User Offline
Joined: 7th Feb 2013
Location:
Posted: 20th Oct 2015 15:15 Edited at: 20th Oct 2015 18:09
Edit: My bad, I screwed up somewhere. It works as intended.

Hi,

I wanted a sound to go mute at a particular moment. So I saved the instance number of the sound when I played it with :
sound_instance = playsound(1)

Then, when needed, I put :
SetSoundInstanceVolume(sound_instance, 0).

During my tests, the sound didn't mute completely. The volume goes down by about 50% but I can still clearly hear it.

Did I overlook something or is it a known issue ? I'm using agk 2.014b and testing on PC.

Thanks and have a nice day.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 20th Oct 2015 16:49
hmmm, maybe u call playsound more than once?
or its a bug.
AGK (Steam) V2 Beta .. : Windows 10 Pro 64 Bit : AMD (15.7.1) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
TDavid
11
Years of Service
User Offline
Joined: 7th Feb 2013
Location:
Posted: 20th Oct 2015 17:50 Edited at: 20th Oct 2015 18:09
Thanks for your input.

I'll double check but it is highly unlikely that i called it twice because I call playsound only once in my program at the moment, and it's in a loading sequence (so not in a loop).

I think I got the right sound instance since the volume of the sound I wish to mute decreases.

edit : hold that thought, I might have screwed somewhere, it works in game mode b.

edit2 : Yep, yep, I screwed somewhere else. It works as intended. Many sorries.

Login to post a reply

Server time is: 2024-11-16 22:05:49
Your offset time is: 2024-11-16 22:05:49