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 Studio Chat / [SOLVED] Sound Instance Volume

Author
Message
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 18th Oct 2019 19:05
Hello guys,

Does anyone encountered the same problem regarding "setsoundinstancevolume" not modifiying the properties and "getsoundinstancevolume" always outputting 0?

Here is an example code:



Thank you very much!
www.alexmatei.com

The author of this post has marked a post as an answer.

Go to answer

Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 18th Oct 2019 19:17
This post has been marked by the post author as the answer.
The sound ID is not the same as the instance ID.

AGK's PlaySound() Documentation wrote: "This command can be called multiple times for the same sound ID and it will start multiple copies of that sound playing as instances. The command will return an instance ID that can be used to interact with this instance whilst it is still playing. When an instance stops playing then it is automatically deleted and can no longer be referenced."


You should get the instance id returned from playsound() and then use that to check or control the volume


MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 18th Oct 2019 21:31
Thank you!
www.alexmatei.com

Login to post a reply

Server time is: 2024-03-29 10:00:56
Your offset time is: 2024-03-29 10:00:56