Since the advent of the Windows Driver Model, there are no advantages to writing directly to the primary buffer, in fact it is simply an abstract concept now – there is no physical buffer available to the app where all audio gets mixed (so you cannot apply global effects on the primary buffer – you’ll have to mix the stuff yourself if you want post submix effects).< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
All applications, even those with simple audio requirements, such as using one stream of audio data that does not require mixing, should use secondary buffers instead of directly accessing the primary buffer. The larger buffer size provides more time to write the next block of data, thereby minimizing the risk of gaps in the audio and achieving better performance.
How to use DSSCL_WRITEPRIMARY mix the sound?how write the primary buffer?
unreal-xan
Since the advent of the Windows Driver Model, there are no advantages to writing directly to the primary buffer, in fact it is simply an abstract concept now – there is no physical buffer available to the app where all audio gets mixed (so you cannot apply global effects on the primary buffer – you’ll have to mix the stuff yourself if you want post submix effects).< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
All applications, even those with simple audio requirements, such as using one stream of audio data that does not require mixing, should use secondary buffers instead of directly accessing the primary buffer. The larger buffer size provides more time to write the next block of data, thereby minimizing the risk of gaps in the audio and achieving better performance.
More info is available here: http://msdn.microsoft.com/library/default.asp url=/library/en-us/directx9_c/directx/htm/writingtotheprimarybuffer.asp