Jump to content
  • Advertisement

Archived

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

m_grinder

Loosing DS Buffer

This topic is 6926 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''m using a DirectSoundBuffer to get sound fx in my game and all of a sudden I get a DSERR_BUFFERLOST return from the Play() function. I''ve tried restoring it but with no luck ... any ideas? //m_grinder

Share this post


Link to post
Share on other sites
Advertisement
Since non of you seem to be able to answer my complex DSound question so I tought I should flame you so you feel my frustration.
You all suck!

Microsoft rules.
Linux sux.
Mac is the best platform for gamedeveloping ever and game programmers never get any.
Oh by the way did I mention that OpenGL sux!

m_grinder - I rule U suck!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yeah, that''s the way to get people to help you.

Share this post


Link to post
Share on other sites
Well, I''ll just assume you''re joking, m_grinder. I''m sorry that I personally can''t help you with this particular problem, but you need to give it a little more time for people to help you. For one thing, it''s still pretty early in the day here in the US, so many of the American programmers probably weren''t awake yet to help when you posted.

Give it a little time and I''m sure you''ll get a helpful response.

Share this post


Link to post
Share on other sites
If I remember corectly a DSERR_BUFFERLOST error occurs whenever the memory allocated for the buffer(hardware or software) is lost and possibly in use by some other process. You need to have the code in your play function check for this, restore the buffer and reload it''s wave data if needed.

Like:


if (lpDDSBuffer->Play(0, 0, NULL) == DSERR_BUFFERLOST)
{
if (lpDDSBuffer->Restore())
{
ReloadBufferWave(lpDDSBuffer, whatever);
lpDDSBuffer->Play(0, 0, NULL);
}
}


I hope that shows up right. I''m sure it won''t; I don''t remember the tag for a tab and I''m not sure if this poster takes spaces into account.

Good luck.



~Tim the Enchanter~
Arthur: Ohh great enchanter, tell us, what is your name?
Enchanter: Some call me Timmmmmm.
Arthur: Tell us great enchanter, how to you make fire without flint and tinder?
Enchanter: Silence!

Monty Python:The Search For The Holy Grail

Share this post


Link to post
Share on other sites
Hehe, this is no help but...
Remember the good ol'' days when DS meant data segment?
I used to use DS as an emergency variable when I ran out of registers... caused me a heck of a lot of problems, that did... EBP too...

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!