# Performance problem with "GetParameterValue" and "GetPlaybackState"

**URL:** <https://qa.fmod.com/t/performance-problem-with-getparametervalue-and-getplaybackstate/13872>\
**Category:** Unity\
**Created:** [May 14, 2018, 10:35am UTC](https://qa.fmod.com/t/performance-problem-with-getparametervalue-and-getplaybackstate/13872 "2018-05-14T10:35:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pelle](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/pelle/32/79_2.png) [@Pelle](https://qa.fmod.com/u/Pelle)\
**Post date:** [May 14, 2018, 10:35am UTC](https://qa.fmod.com/t/performance-problem-with-getparametervalue-and-getplaybackstate/13872/1 "2018-05-14T10:35:31Z")

</div>

Hi,  
We are profiling our game that has some frame rate problem, specially on PS4, that is ten times slower of a basic VR ready PC. We are updated to FMOD 1.10.04, but I integrated the fix for the callback (that cameron shared with me), that make the game crash on PS4  
Using deep profiling in Unity we noticed a problem with two native FMOD functions (the showed times here are on pc and not PS4):

-GetParameterValue: It seems that this take a lot of time the first time I try to get the “Final Value” on every any created with programmer sounds.  
Here is a screenshot of the Unity profiler: [https://ibb.co/b7AG5d](https://ibb.co/b7AG5d)  
And here a screenshot of the same function applied to an eventInstance not created with programmer sound: [https://ibb.co/gWECBJ](https://ibb.co/gWECBJ)

-GetPlaybackState: This function take a lot of time the first time is called on any event (didn’t tested on programmer sounds). Here a script that call the function: [https://ibb.co/iMpnBJ](https://ibb.co/iMpnBJ) and here the same script the frame after that: [https://ibb.co/gWECBJ](https://ibb.co/gWECBJ)

Don’t know what could be the problem, maybe some initialization issue, but I’ll be grateful if you could make some test on your side.  
Doing a bunch of tests I noticed that sometimes these issues doesn’t come out. I really can’t understand why…

PS: after a few other tests on PS4 we found out that every time we create a programmer sound the update of the “StudioListener” is also taking a lot… [https://ibb.co/mQVBrJ](https://ibb.co/mQVBrJ)

Thank you in advance for your help,  
Simone

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [May 16, 2018, 2:06am UTC](https://qa.fmod.com/t/performance-problem-with-getparametervalue-and-getplaybackstate/13872/2 "2018-05-16T02:06:32Z")

</div>

Would you be able to connect the Studio Profiler to record a capture, this will give us a bit more information on what is going on inside FMOD.

Feel free to email it (or a link) to [support@fmod.com](mailto:support@fmod.com) and I will take a look for you.
