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 / Sound system volume bug?

Author
Message
Jambo B
14
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 28th Dec 2014 15:01
Hello all,

I wonder if I've found a bug with the getting and setting of sound volume. Would someone mind trying this:



For me, the getsoundinstancevolume always returns zero, and setsoundinstancevolume has no effect at all. This is using Alpha 10.

Thanks,

James
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 28th Dec 2014 15:09 Edited at: 28th Dec 2014 15:13
You are not using the SoundInstance. PlaySound returns the instance value.

instance = PlaySound(isound,100,1)
SetSoundInstanceVolume(instance,10)

The instance is ONLY valid whilst the sound is playing.

Then it should be:

do
print(GetSoundInstanceVolume(instance))
sync()
loop

It is like this because you may have many instances of a sound playing at the same time. You can now change the volume, pan and rate of any sound instance whilst it is playing.

-- Jim - When is there going to be a release?
Jambo B
14
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 28th Dec 2014 15:10
D'oh!

Thanks, Jim - I'll give that a shot.

James
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 28th Dec 2014 15:12
See my example:

http://forum.thegamecreators.com/?m=forum_view&t=212419&b=41

-- Jim - When is there going to be a release?

Login to post a reply

Server time is: 2024-05-19 22:02:11
Your offset time is: 2024-05-19 22:02:11