# Studio::VCA::getVolume finalvalue bug?

**URL:** <https://qa.fmod.com/t/studio-getvolume-finalvalue-bug/16829>\
**Category:** FMOD Engine\
**Created:** [March 2, 2021, 11:58pm UTC](https://qa.fmod.com/t/studio-getvolume-finalvalue-bug/16829 "2021-03-02T23:58:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aishi](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/aishi/32/82_2.png) [@aishi](https://qa.fmod.com/u/aishi)\
**Post date:** [March 2, 2021, 11:58pm UTC](https://qa.fmod.com/t/studio-getvolume-finalvalue-bug/16829/1 "2021-03-02T23:58:36Z")

</div>

Hi,

I’m running tests for a Win32 application and for some reason when I use Studio::VCA::getVolume, even after using setVolume and updating the Studio System in a loop that waits for the value to change, the finalvalue parameter always outputs 1.

I’m using FMOD Studio 2.01.04 API. Also I’m not playing any events connected to this VCA since it’s just testing a get/set function. Regardless if I put modulation/automation on the volume or remove all parameter automation in the bank it results in 1. The regular volume output value works as expected.

This isn’t critical to my app, but just wanted to see if it is possibly a problem on FMOD’s side. It may also be a GameMaker Studio extension plugin problem, but I doubt it because every other function works as expected.

Thank you for your time.

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [March 9, 2021, 11:49pm UTC](https://qa.fmod.com/t/studio-getvolume-finalvalue-bug/16829/2 "2021-03-09T23:49:40Z")

</div>

I have been testing getVolume on a VCA and both value and finalvalue return the expected values. I suspect what might be happening is the “getVolume” command is being called between calls to system update, causing finalvalue to return an old value.

I’m not sure how this custom GameMaker Studio implementation works, but it would be good to have getVolume exist within the scope of the system update call in order to ensure it gets the proper final value.

---

<div class="post-metadata">

**Author:** ![aishi](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/aishi/32/82_2.png) [@aishi](https://qa.fmod.com/u/aishi)\
**Post date:** [March 14, 2021, 12:55am UTC](https://qa.fmod.com/t/studio-getvolume-finalvalue-bug/16829/3 "2021-03-14T00:55:55Z")

</div>

Hi Richard,  
Thank you for your time testing and for your response. The implementation is just a wrapper around the individual studio functions, and it’s all on a single thread, getVolume is called right after the call to update is made - though I believe I just found the issue.

Playing an event attached or non-attached to the VCA, the finalvalue now updates. I was expecting this to change without having had any events or audio playing yet. Is this the correct behavior?

Thanks again.

Edit: I updated the api to 2.01.07

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [March 22, 2021, 12:55am UTC](https://qa.fmod.com/t/studio-getvolume-finalvalue-bug/16829/4 "2021-03-22T00:55:27Z")

</div>

It appears that the VCA will return `1` if it does not exist, and it does not exist unless there is something playing through the VCA first. This is a bug and will be looked at in a future release. Thank you for bringing this to our attention.

Unfortunately I don’t think there’s any workaround other than to only start checking once an event first plays through it.

---

<div class="post-metadata">

**Author:** ![aishi](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/aishi/32/82_2.png) [@aishi](https://qa.fmod.com/u/aishi)\
**Post date:** [March 22, 2021, 7:00am UTC](https://qa.fmod.com/t/studio-getvolume-finalvalue-bug/16829/5 "2021-03-22T07:00:08Z")

</div>

You’re welcome, thank you for confirming this. Will this be fixed in an upcoming release? I want to be aware to keep the Game Maker integration docs up-to-date.

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [March 29, 2021, 12:57am UTC](https://qa.fmod.com/t/studio-getvolume-finalvalue-bug/16829/6 "2021-03-29T00:57:47Z")

</div>

This issue is going to be considered for a future release, but I can’t guarantee when as we need to balance our available resources with priorities of other issues/features. I will poke our development team to look at it sooner rather than later, hopefully.
