[SDL] Win32 sound stops

Sam Lantinga slouken at devolution.com
Tue Apr 11 18:54:05 PDT 2000

> Hi,
> 	Why does the SDL audio stop playing in Win32 when the window
> loses focus, and how can I get rid of this behavior? Thanks...

This is because SDL is writing directly to the audio hardware, and when
the window loses focus, DirectX removes exclusive access to the audio.
If you want to see how DirectSound performs without primary write access,
just comment out the line "CreatePrimaryBuffer" (or something like that)
in SDL_dx5audio.c

See ya,
	-Sam Lantinga, Lead Programmer, Loki Entertainment Software

More information about the SDL mailing list