Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

Sedo - Buy and Sell Domain Names and Websites project info: programmershelp.co.uk Statistics for project programmershelp.co.uk etracker® web controlling instead of log file analysis

   Misc

   Amazon

   Links

    


Synchronous sound
 

 

Description

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

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;
}

Information

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 .

 

 
 

 

Download

syncsound.txt
The Microsoft Sound.wav


 




   Sponsors
 

   Software
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

   Source Code
fahrenheit to celsius conversion(C Sharp)
id of user using cookie(Javascript)
Show and hide the taskbar(VB)
For loop(Javascript)
Join array items to form a string(ASP)
Display the current time(PHP)
Octal, hex and decimal(C++)
caret blink time(VB)

    




Copyright © 2003 by programmershelp.co.uk