• Advertisement
Sign in to follow this  

How do you just play a wav file with XACT?

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