Archived

This topic is now archived and is closed to further replies.

How can I use VC++ to play a WAV file?

This topic is 5308 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I wrote this a long time ago and since then I no longer use winshit but for your need it seems perfect.

http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=3855&lngWId=3

Its a hole media engine that can even play more then wav files(mp3s wma midi ect). So you can use it in your engine just give me credit for the media part

Share this post


Link to post
Share on other sites
although the statement PlaySound("c:\windows\media\chime.wav", NULL, SND_LOOP|SND_ASYNC); works, but the program can not be quitted, I have to power off my PC every time.

Share this post


Link to post
Share on other sites
At the risk of being impertinent -

You know, I''ve advised you... how many times now?... to read the documentation. If you were capable of following advice, you''d have read that passing NULL as the file name stops the noise.

I probably shouldn''t tell you that. I like the mental image of a frustrated pinhead re-booting his machine because it''s incessantly chiming...

Share this post


Link to post
Share on other sites
Hey, what a way to offer some help! Make him feel like an idiot for your own personal amusement!!

At the risk of being impertinent, I really bugs the hell out of me when people have that kind of attitude toward a question. Did it occur to you that he might possibly not have understood the documentation? Or perhaps he just missed that part by accident?

If you''re going to answer a question, do so. If you want to be a smart-ass, stop wasting everyone else''s time.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
no i agree with Ferdinand the Bull completely, he offered advice the first time with a link, that contained all of the answers yet the op was too lazy to read it, he deserves what he gets.

Share this post


Link to post
Share on other sites
well, tmoneyksu -
I offered the first line from the relevant entry the first time, and urged him to read the documentation three times.

Tell you what. After you''ve written three (no, four) entries to make your point, you may then be impertinent.

But not until then.

Share this post


Link to post
Share on other sites