Board index » delphi » DirectSound: Playing sound while in the background

DirectSound: Playing sound while in the background


2003-12-31 04:04:16 PM
delphi230
My program play sounds (PCM wav files) using IDirectSoundBuffer.Play. It
works very well except when the application is in the background. It has to
have focus to play sound. What do I have to do to make the application play
sound while in the background, or minimized or in the systray ?
btw: I use Jedi DirectX header translation and code from Eric Van Bilsen
published in "The Delphi Magazine", aug 2003 (download code from
www.thedelphimagazine.com/disks/dmag96.zip)
--
XXXX@XXXXX.COM
The author for the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
www.overbyte.be
 
 

Re:DirectSound: Playing sound while in the background

Answering my own question: The use of DSBCAPS_STICKYFOCUS flag solved the
problem.
"Francois Piette" <XXXX@XXXXX.COM>a écrit dans le message de
Quote
My program play sounds (PCM wav files) using IDirectSoundBuffer.Play. It
works very well except when the application is in the background. It has
to
have focus to play sound. What do I have to do to make the application
play
sound while in the background, or minimized or in the systray ?

btw: I use Jedi DirectX header translation and code from Eric Van Bilsen
published in "The Delphi Magazine", aug 2003 (download code from
www.thedelphimagazine.com/disks/dmag96.zip)

--
XXXX@XXXXX.COM
The author for the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
www.overbyte.be