Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Doominator2

How to play a .WAV file in C?

Recommended Posts

Any programmers here know how to play a .wav file in C? I've been trying to figure it out but to no luck, here is what I have 

 


#include <stdio.h>
#include <string.h>
#include <time.h>
#include <windows.h>
#include <stdlib.h>

#pragma comment(lib,"winmm")

 

int main()
{

    
    PlaySound(C:\\MSDOS\\Manoir de Mes Reves.wav), NULL, SND_FILENAME | SND_ASYNC);
  

return 0; 

}

 

 

Any help would be appreciated.

Share this post


Link to post

Where are the quotes around your string? Why is there a ')' in the middle of your parameters (suspiciously where a quote should be)?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×