Jump to content
  • Advertisement
Sign in to follow this  
CodaKiller

How do you just play a wav file with XACT?

This topic is 3215 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

Every tutorial I read says you have to create a wave bank and a sound bank but this won't work for what I need, is there any way I can just get it to load a wav file in to memory and then play it?

Share this post


Link to post
Share on other sites
Advertisement
If you're using XNA, you can use the SoundEffect class. Some more information on what you're using / trying to do and why XACT is wrong for it might be helpful.

Share this post


Link to post
Share on other sites
Quote:
Original post by f8k8
If you're using XNA, you can use the SoundEffect class. Some more information on what you're using / trying to do and why XACT is wrong for it might be helpful.


Not using XNA and the only reason XACT seems like it won't work is because I need to use wave files not precompiled libraries.

Share this post


Link to post
Share on other sites
You can play a wav file directly using the windows API quite simply,


PlaySound(filename, NULL, SND_FILENAME | SND_NODEFAULT | SND_ASYNC )

Share this post


Link to post
Share on other sites
Quote:
Original post by direwulf
You can play a wav file directly using the windows API quite simply,

*** Source Snippet Removed ***


Hmmm didn't know about that, is there a way to modify how it is played?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!