Welcome
Welcome to the forums of AntiRTFM's Absolute N00b Spoonfeed C++ Tutorials!

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, <a href="/profile.php?mode=register">join our community today</a>!

WHY IS PLAYING AN ORDINARY SOUND SO TRICKY??

Ask ALL your questions here

WHY IS PLAYING AN ORDINARY SOUND SO TRICKY??

Postby glinka57 on Sun Oct 11, 2009 1:14 pm

as in what is 'the reason'.

why is that LPRCT so hard to grasp, even from the msdn website
AAARGH! pardon my noob frustration and noob impertinence
User avatar
glinka57
 
Posts: 195
Joined: Fri Feb 27, 2009 7:32 pm

Re: WHY IS PLAYING AN ORDINARY SOUND SO TRICKY??

Postby Vevix on Sun Oct 11, 2009 6:36 pm

What don't you understand about it? An example would be:

Code: Select all
PlaySound("PathToFile.wav", NULL, SND_FILENAME);


If your use for this is to play multiple sounds, i.e a game - I would look into a sound library rather than this API
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg. -- Bjarne Stroustrup
User avatar
Vevix
 
Posts: 142
Joined: Sat Oct 10, 2009 9:24 pm
Location: kernel32.dll

Re: WHY IS PLAYING AN ORDINARY SOUND SO TRICKY??

Postby glinka57 on Mon Oct 12, 2009 12:39 am

But what does the NULL and SND_FILENAME arguments do?? and why would it need SND_FILENAME if you already enter the string "PathToFile.wav"
User avatar
glinka57
 
Posts: 195
Joined: Fri Feb 27, 2009 7:32 pm

Re: WHY IS PLAYING AN ORDINARY SOUND SO TRICKY??

Postby Vevix on Mon Oct 12, 2009 1:40 am

That is all explained on the MSDN article. http://msdn.microsoft.com/en-us/library/dd743680(VS.85).aspx
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg. -- Bjarne Stroustrup
User avatar
Vevix
 
Posts: 142
Joined: Sat Oct 10, 2009 9:24 pm
Location: kernel32.dll


Return to QA

Who is online

Users browsing this forum: No registered users and 0 guests