Microsoft DirectX 8.1 (Visual Basic) |
The EnumDevice sample shows how to enumerate and create playback and capture devices.
Source: (SDK root)\Samples\Multimedia\VBSamples\DirectSound\EnumDevice
Executable: (SDK root)\Samples\Multimedia\VBSamples\DirectSound\Bin
Select a playback and capture device from the dropdown lists. Click Create.
The LoadEnum procedure populates the listboxes. The primary devices on the system are always enumerated twice, once under their proper names and once as "Primary Sound Driver" or "Primary Sound Capture Driver." The value returned by DirectSoundEnum8.GetGuid for the primary driver is all zeros.
The DirectSound8 object is released as soon as it has been created. On systems that do not support full duplex, the creation of DirectSoundCapture8 could fail if the DirectSound8 object exists.