Solved

Playing .wav -files from C(++)

Posted on 1998-08-18
3
185 Views
Last Modified: 2012-05-04
I am a little bit new to C++( although I know the basic skills). What I 'd like to do is playing a .wav - file from without C++.
0
Comment
Question by:TomX
3 Comments
 
LVL 6

Expert Comment

by:snoegler
ID: 1170629
What os/compiler are you using?
0
 
LVL 6

Accepted Solution

by:
WxW earned 100 total points
ID: 1170630
If it is a windows application you have many ways to play a wav file . If you just want to play it , call sndPlaySound() as follows :

BOOL sndPlaySound(LPCTSTR lpszSound,UINT fuSound)

for example sndPlaySound("C:\\MEDIA\\MYWAVE.WAV",SND_SYNC)
This will play your wav and wait until it has finished . SND_ASYNC does the work asynchronously . If you want more details on managing wav's , lemme know :)
0
 
LVL 1

Expert Comment

by:jdyer
ID: 1170631
PlaySound also will work, and provides a little more control over how it is played

Regards,
 jdyer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question