Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


DirectSound Behavior Quirk


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 Xai   Crossbones+   -  Reputation: 1459

Like
Likes
Like

Posted 23 February 2000 - 02:32 AM

This post is not primarily a question, I just wanted to tell everyone about the strange behavior I was just having with DirectSound. I''d also like to hear if anyone has had a similar experience or perhaps if i''ve just ignored some issue I wasn''t aware of. Here''s the deal: I was playing DirectSound buffers, and with 2 of my 3 sounds, they would only play ONCE and then all subsequent calls to play would do nothing ... they would return DS_OK but they would NOT make sound. Necessary information: I was (and am) reseting the current position of the sound to 0, before EVERY call to play, reguardless of the state of the buffer. I also tested playing the sound again both while it was playing and well after it had stopped, no difference. I then removed the first sound (the one that worked), both it''s creation and use, and the other two STILL did not work right. I then opened SoundRecorder and ensured that ALL three sounds matched my primary buffer (22,050 Hz, 16 bit, mono) and the DID ... so still no reason for the behavior. Additional Info: I am on a Win98 SE machine, coding to DirectX 6 SDK, DirectX 7 runtime installed, using an Aureal Vortex 1 based sound card in one test rig, an el cheapo sound card in another (same behavior on both). MY FIX: when I force called Stop() on the sound buffer prior to calling Play() (so the order is now Stop(), SetCurrentPosition(), Play() ... ) the sound works right for all three sounds buffers. SUMMARY: So if you have a DirectSoundBuffer silently (correct return code) failing to play, you might try stopping it first. Good Luck.

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS