Partager via


Building DirectSound Projects

[The feature associated with this page, DirectSound, is a legacy feature. It has been superseded by WASAPI and Audio Graphs. Media Casting have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Media Casting instead of DirectSound, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Projects need to include the Dsound.h header file. If you are using the DirectSound API directly and want to be able to use helper functions such as DirectSoundCreate8, be sure to link to Dsound.lib and include the appropriate folder in the library search path.

You must also ensure that your application has access to the GUIDs used by DirectSound. Define INITGUID before all other preprocessor directives, or link to Dxguid.lib.