Solved

Playing .wav -files from C(++)

Posted on 1998-08-18
3
186 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
computer science syllabus 3 117
c++ syntax question 9 67
Which Linux flavors will this run on? 6 116
Gaming Software 1 39
When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

752 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