|Microsoft DirectX 9.0|
The highest cooperative level is write-primary (DSSCL_WRITEPRIMARY). When using a DirectSound device with this cooperative level, your application has direct access to the primary sound buffer on non-WDM drivers. In this mode, the application must write directly to the primary buffer. Secondary buffers cannot be played while this is happening.
An application must be set to the write-primary level in order to obtain direct write access to the audio samples in the primary buffer. If the application is not set to this level, then all calls to the IDirectSoundBuffer::Lock method on the primary buffer will fail.
Note The primary buffer supports only the IDirectSoundBuffer interface, not IDirectSoundBuffer8.
When your application is set to the write-primary cooperative level and gains the foreground, all secondary buffers for other applications are stopped and marked as lost. When your application in turn moves to the background, its primary buffer is marked as lost and must be restored when the application again moves to the foreground. For more information, see Buffer Management.
You cannot set the write-primary cooperative level if a DirectSound driver is not present on the user's system. To determine whether this is the case, call the IDirectSound8::GetCaps method and check for the DSCAPS_EMULDRIVER flag in the DSCAPS structure.