Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Playing .wav -files from C(++)

Posted on 1998-08-18
3
Medium Priority
?
188 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 200 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

715 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