Jump to content
  • Advertisement


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


Pausing Sounds in DirectX Audio

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

Hi, I''ve written a wrapper class for DirectX audio, so I can do basic things like play a sound, or stop a sound... But does anyone know how to Pause a sound??? I''ve been looking everywhere for some idea on how to do this and I can''t seem to figure it out. I think maybe it has to do with some buffer manipulation, or maybe you have to store some variable for each segment that says "what position in the sound file is being played" so that you can resume playing from that position... If anyone has an idea on how to do this, I''d *really* appreciate it. Thanks! Rajan

Share this post

Link to post
Share on other sites
Hi Rajan,

This is what I do (it may give you a hint):

MUSIC_TIME musicTimeStopped;
m_pPerformance->GetTime(NULL, &musicTimeStopped);
m_pPerformance->Stop(NULL, NULL, 0, 0);

Then when you play again the segment, it''ll start from where it was stopped.

I use it to pause the whole thing, but it may work to pause for a specific sound.

Hope it helps,

Jose Manuel Guerra

Share this post

Link to post
Share on other sites

  • 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!