Fullscreen does not pause music - Windows 7

I'm using Unity 3.0.0f5, on Windows 7, 32bit Home Premium.

I've compiled a project to an EXE, and ran the game in fullscreen. If I then alt-tab, or press the Windows key or do other things to move away from the game, the music continues to play, while it should pause instead.

The OnApplicationFocus and OnApplicationPause functions doesn't get called either.

It works fine while in Windowed mode though, but not fullscreen mode. I haven't tried it on Unity 2 but I assume it works fine there.

I'm starting the music in Start() on my scene using this code:

public AudioSource TheMusic;


Have anyone else experienced this, or is it something in my project? I've created a very simple project that simply plays a song too, and it happened there, on all my Windows computers...

I've tried to manually detect when focus is lost by using Win32 DLL functions, but it doesn't seem to work all the time.


Any fix for this yet or a work around?