Heb
Heb

Reputation: 43

What libraries/how to play wav file on Windows32 in C?

What libraries for C do I need to play a wav file on a Win32 system?

And what is the code to use those libraries?

Upvotes: 4

Views: 2249

Answers (1)

Brian R. Bondy
Brian R. Bondy

Reputation: 347196

Use the Win32 API: PlaySound

Include library: Winmm.lib
Header include: Mmsystem.h (include Windows.h)
Example:

PlaySound(TEXT("recycle.wav"), NULL, SND_FILENAME);

Upvotes: 10

Related Questions