Partager via


Implementing an Audio DSP Plug-in

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

To create a Windows Media Player DSP plug-in that processes audio, you'll need to modify the sample code in the function named DoProcessOutput. DoProcessOutput is called each time Windows Media Player successfully calls IMediaObject::ProcessOutput. It is the function that performs the digital signal processing tasks that produce the audible result that the DSP plug-in is intended to produce.

Processing an audio stream is like handling a timed event. DoProcessOutput will be called repeatedly and at specific intervals. Each time your code executes, it will need to process a specific number of bytes of data. DoProcessOutput contains the following parameters:

Parameter Description
pbOutputData This is a BYTE pointer to the buffer where your implementation of DoProcessOutput must copy its processed data.
pbInputData This is a constant BYTE pointer to the buffer that contains the data to be processed.
cbBytesToProcess This is a DWORD value that contains a count of the number of bytes in the input buffer to be processed.

 

The following sections provide details about how to modify the code generated by the Windows Media Player Plug-in Wizard to create your own audio DSP plug-in:

About DSP Plug-ins