RE: [GD-Windows] Latency of wavOutWrite vs. DSound
Brought to you by:
vexxed72
From: Jon W. <hp...@mi...> - 2001-11-05 18:36:37
|
It's been my experience that PlaySound() goes through the file system in a synchronous kind of way, so not only do you pay the cost of opening and parsing the file ; you also suffer the event loop hit of being blocked waiting for all that (including loading the entire sound into memory). Also, PlaySound() only plays one sound at a time, because it needs a WAV device, which only allows a single stream. Some hardware actually publishes more than one WAV device, but that's the minority. I'm assuming you'd want to do something basic like keeping a stream of buffers going and mix into that stream as sound events start happening. Perhaps even that is overkill for whatever you're doing. If you're writing a card game, and you know you'll be installed on a hard disk that's never spun down, and the sounds are small, and there is no background music, PlaySound() may be good enough. Depends on what your requirements for "latency" really are. Cheers, / h+ > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...]On Behalf Of > Brian Hook > Sent: Monday, November 05, 2001 10:24 AM > To: gam...@li... > Subject: RE: [GD-Windows] Latency of wavOutWrite vs. DSound > > > > > > -----Original Message----- > > From: Jon Watte [mailto:hp...@mi...] > > > Is there a significant difference between PlaySound( resource ) vs. > > > waveOutWrite? > > > > Yes. > > Can you elaborate? I assume you mean that PlaySound has significantly > worse latency? > > Brian > > > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > |