programmingsite : code , tutorials and scripts
Navigation

home


ASP
ASP.net
PHP
JavaScript
C
C++
Java
Visual Basic


Resources
code
tutorials
training

Ads
Products

 

 

play synchronous sound in C





play synchronous sound

This example plays a wav file synchronously , Put the wav file in the same location as the source code .


#include <windows.h>
#include <stdio.h>

int main()
{

printf("Playing synchronous sound...\n");
PlaySound("The Microsoft Sound.wav", NULL, SND_FILENAME | SND_SYNC);
return 0;
}



tested using Visual C++ 6

You have to add a library to the project or you will get errors . To do this do the following .

1/ Go to the Project menu and click on settings or press Alt F7
2/ Click on the Link tab
3/ Where it says Object/library modules type in winmm.lib. I usually go right to the end and do this .
4/ Now click on OK .





Products
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals
Asp Studio 2005
Xtra PHP
Online PHP Script Encoder
Comparison

Links
Make money selling software
Golf resource site
UK price comparison
UK shopping
free articles
free stuff
Gambling resources
Software directory
Health and fitness
Sexy free wallpapers
Hosting resources
ASP site
Beginners PHP
Anime videos
Domain names
Dating site
Programming resources
Dropshippers
Maxi directory
free recipes
Coupons and deals
iPod resources

Ads