Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

Playing .wav -files from C(++)

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
TomX
Asked:
TomX
1 Solution
 
snoeglerCommented:
What os/compiler are you using?
0
 
WxWCommented:
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
 
jdyerCommented:
PlaySound also will work, and provides a little more control over how it is played

Regards,
 jdyer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now