Compartilhar via


Duplicating Buffers

[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.]

You can create two or more secondary buffers containing the same data by using the IDirectSound8::DuplicateSoundBuffer method. You cannot duplicate the primary sound buffer. Because the duplicate buffer shares memory with the original buffer, changes to the data of one buffer will be reflected in duplicate buffers.