# Pause FMOD thread

**URL:** <https://qa.fmod.com/t/pause-fmod-thread/11886>\
**Category:** FMOD Engine\
**Created:** [April 14, 2015, 11:57am UTC](https://qa.fmod.com/t/pause-fmod-thread/11886 "2015-04-14T11:57:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tristam92](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@tristam92](https://qa.fmod.com/u/tristam92)\
**Post date:** [April 14, 2015, 11:57am UTC](https://qa.fmod.com/t/pause-fmod-thread/11886/1 "2015-04-14T11:57:46Z")

</div>

Hi, everyone!

I using FMOD 5 low level api, to play sound in my game. As render engine I using the PlayFirst Playground SDK. On each frame I updating my sound manager(wrapper for FMOD). But I have one little problem. When i hitting Win+L on Win8, engine stop receiving messages in window message loop. So I cann’t stop Fmod system, and sound still playing, while all game thread paused. Can you help please to resolve that problem? Also i does not have access to message loop, cause impletementation of SDK not presenting sources for message loop.  
I also trying to SetWindowHookEx and trying to receive messages, but i still fail.

How I can sync FMOD thread with main thread?

---

<div class="post-metadata">

**Author:** ![nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nick1](https://qa.fmod.com/u/nick1)\
**Post date:** [April 15, 2015, 3:35am UTC](https://qa.fmod.com/t/pause-fmod-thread/11886/2 "2015-04-15T03:35:04Z")

</div>

You can detect the desktop being locked in the windows message loop. Then use System::getMasterChannelGroup() and ChannelGroup::setPaused() to pause all audio.

---

<div class="post-metadata">

**Author:** ![tristam92](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@tristam92](https://qa.fmod.com/u/tristam92)\
**Post date:** [April 15, 2015, 7:16am UTC](https://qa.fmod.com/t/pause-fmod-thread/11886/3 "2015-04-15T07:16:29Z")

</div>

> [@](#):
>
> You can detect the desktop being locked in the windows message loop. Then use System::getMasterChannelGroup() and ChannelGroup::setPaused() to pause all audio.

When i hitting Win+L on Win8, engine stop receiving messages in window message loop. So I cann’t stop Fmod system.

---

<div class="post-metadata">

**Author:** ![nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nick1](https://qa.fmod.com/u/nick1)\
**Post date:** [April 15, 2015, 7:53am UTC](https://qa.fmod.com/t/pause-fmod-thread/11886/4 "2015-04-15T07:53:40Z")

</div>

You can get a message from windows when the desktop is locked. If you cannot get such a message in your engine I suggest contacting that developer for support.

---

<div class="post-metadata">

**Author:** ![tristam92](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@tristam92](https://qa.fmod.com/u/tristam92)\
**Post date:** [April 15, 2015, 10:31am UTC](https://qa.fmod.com/t/pause-fmod-thread/11886/5 "2015-04-15T10:31:57Z")

</div>

This engine no supporting (since 2009). But I found solution alredy. I create thread which monitoring state of rendering. And if update thread paused, I pausing sound enginge.
