Windows API Reference - Multimedia
Multimedia APIs
Explore the Windows API functions for audio, video, and other multimedia operations.
MediaPlayer::Play()
Starts playback of the current media item.
Parameters:
mediaItem
(Input): A reference to the media item to be played.
Returns:
HRESULT
: ReturnsS_OK
if playback was started successfully, or an error code otherwise.
AudioContext::Create()
Initializes a new audio rendering context.
Parameters:
deviceGuid
(Input, Optional): The GUID of the audio device to use. If not specified, the default audio device is used.sampleRate
(Input): The desired sample rate for the audio context.numChannels
(Input): The number of audio channels.
Returns:
IAudioContext*
: A pointer to the newly created audio context object, ornullptr
if creation failed.
Remarks:
- This function allocates resources for audio processing. Ensure to call
AudioContext::Destroy()
when finished.
VideoRenderer::PresentFrame()
Displays a video frame on the screen.
Parameters:
frameData
(Input): A pointer to the buffer containing the video frame data.frameWidth
(Input): The width of the video frame in pixels.frameHeight
(Input): The height of the video frame in pixels.format
(Input): The pixel format of the frame data.
Returns:
bool
: Returnstrue
if the frame was presented successfully,false
otherwise.
AudioMixer::AddInputStream()
Adds an audio input stream to the mixer.
Parameters:
stream
(Input): A pointer to the audio input stream to add.gain
(Input, Optional): The gain level for the stream (0.0 to 1.0). Defaults to 1.0.
Returns:
bool
: Returnstrue
if the stream was added successfully,false
otherwise.