# Set pan on pause problem

**URL:** <https://qa.fmod.com/t/set-pan-on-pause-problem/21856>\
**Category:** FMOD Engine\
**Created:** [July 9, 2024, 12:55pm UTC](https://qa.fmod.com/t/set-pan-on-pause-problem/21856 "2024-07-09T12:55:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![maksimomelyanchuk](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@maksimomelyanchuk](https://qa.fmod.com/u/maksimomelyanchuk)\
**Post date:** [July 9, 2024, 12:55pm UTC](https://qa.fmod.com/t/set-pan-on-pause-problem/21856/1 "2024-07-09T12:55:03Z")

</div>

Hello, we discovered an issue connected to setPan method. It doesn’t depend on particular platform. FMOD version is 2.02.22.  
It works fine when a sound is playing. But if you call setPan for paused (setPaused method) sound it will be still with the old pan value.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [July 10, 2024, 3:08am UTC](https://qa.fmod.com/t/set-pan-on-pause-problem/21856/2 "2024-07-10T03:08:23Z")

</div>

Hi,

Thank you for the information.

Unfortunately, I was not able to reproduce the issue. Using our Core API Example: `C:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\examples\vs2019\examples.sln`. I modified the `play_sound` example with the following:

```auto
/*
    Main loop
*/
do
{
    Common_Update();

    if (Common_BtnPress(BTN_ACTION1))
    {
        result = system->playSound(sound1, 0, false, &channel);
        ERRCHECK(result);
    }

    if (Common_BtnPress(BTN_ACTION2))
    {
        //result = system->playSound(sound2, 0, false, &channel);
        //ERRCHECK(result);
        channel->setPan(-1);
    }

    if (Common_BtnPress(BTN_ACTION3))
    {
        //result = system->playSound(sound3, 0, false, &channel);
        //ERRCHECK(result);
        channel->setPan(1);
    }

    if (Common_BtnPress(BTN_ACTION4))
    {
        bool isPaused = false;
        channel->getPaused(&isPaused);
        channel->setPaused(!isPaused);
    }

```

I just swapped the audio file to something longer for `sound1`. Would it be possible to test this on your side orlet me know if the issue persists or if I have misunderstood?

Thank you for bringing this to our attention.

---

<div class="post-metadata">

**Author:** ![maksimomelyanchuk](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@maksimomelyanchuk](https://qa.fmod.com/u/maksimomelyanchuk)\
**Post date:** [July 11, 2024, 12:48pm UTC](https://qa.fmod.com/t/set-pan-on-pause-problem/21856/3 "2024-07-11T12:48:19Z")

</div>

I’ve managed to reproduce the issue with your example. You need this example: `api\studio\examples\ vs2019\examples.sln`. There please replace file with mine and try (I replace the extension from cpp to txt to be able to upload it here).  
[simple\_event.txt](https://qa.fmod.com/uploads/short-url/7PFlK61rf9YpJh36gJYB0mG8MkH.txt) (5.3 KB)

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [July 12, 2024, 1:27am UTC](https://qa.fmod.com/t/set-pan-on-pause-problem/21856/4 "2024-07-12T01:27:45Z")

</div>

Using the Studio API was the missing link. Thank you for the code, I have been able to reproduce the issue and have passed it on to our development team to investigate further. Thank you for bringing this to our attention.
