Skip to content
Permalink
Browse files

Use the sticky focus flag so audio isn't muted when application is sw…

…itched.
  • Loading branch information
slouken committed Oct 25, 2001
1 parent 3588002 commit 1cc45bdb08d5ece74c16663c56e2cc82e63b5680
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/audio/windx5/SDL_dx5audio.c
@@ -441,6 +441,7 @@ static int CreatePrimary(LPDIRECTSOUND sndObj, HWND focus,
memset(&format, 0, sizeof(format));
format.dwSize = sizeof(format);
format.dwFlags=(DSBCAPS_PRIMARYBUFFER|DSBCAPS_GETCURRENTPOSITION2);
format.dwFlags |= DSBCAPS_STICKYFOCUS;
#ifdef USE_POSITION_NOTIFY
format.dwFlags |= DSBCAPS_CTRLPOSITIONNOTIFY;
#endif
@@ -525,6 +526,8 @@ static int CreateSecondary(LPDIRECTSOUND sndObj, HWND focus,
#endif
if ( ! focus ) {
format.dwFlags |= DSBCAPS_GLOBALFOCUS;
} else {
format.dwFlags |= DSBCAPS_STICKYFOCUS;
}
format.dwBufferBytes = numchunks*chunksize;
if ( (format.dwBufferBytes < DSBSIZE_MIN) ||

0 comments on commit 1cc45bd

Please sign in to comment.