Multimedia API Reference for Windows
Explore the Windows multimedia APIs that enable applications to handle audio, video, and other media streams. This reference provides descriptions, usage examples, and best‑practice guidelines.
Key APIs
-
PlaySound
Plays a waveform sound. Simple API for synchronous or asynchronous playback of .wav files.
-
waveOut*
Legacy wave output functions for low‑level audio rendering. Includes waveOutOpen, waveOutWrite, etc.
-
DirectSound
Provides low‑latency sound playback with support for 3‑D positioning and hardware acceleration.
-
Media Foundation
Modern framework for audio/video codecs, streaming, and playback. Supports hardware acceleration and DRM.
Sample: Play a WAV File
#include <windows.h>
#pragma comment(lib, "winmm.lib")
int main() {
// Play a sound synchronously
PlaySound(TEXT("example.wav"), NULL, SND_SYNC);
return 0;
}
Comments