Jump to content

  • Log In with Google      Sign In   
  • Create Account


DirectSound problem!


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
7 replies to this topic

#1 Gf11speed   Members   -  Reputation: 136

Like
Likes
Like

Posted 26 November 1999 - 02:55 AM

Does anyone know what would cause a program to just exit when trying to play a sound? In my game, the program just exits on the play sound command. The odd thing is, it only happens with some sounds! Not all. I have no idea what may be causing this, and I have worked at least 6-10 hours trying to figure it out. Help is appreciated! Thanks.


Sponsor:

#2 korybricker   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 November 1999 - 02:57 PM

Make sure that the pointer you are calling the play method on is valid. I ran into a similar problem before when I first started playing around with DX and I was being a VERY BAD PROGRAMER and not checking my return codes. Every once in a while loading the wav files would fail for some reason and since I wasn't checking the app would just die later. No GPF (as you would expect) so it took me a little while to realize what was going on. Maybe this is your problem as well. I would say that nearly 80% of the DX problems I have seen and helped out on are a result of not checking the HRESULTs being returned.

#3 Melo   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 November 1999 - 03:11 AM

Hmmm...
This happens to me, if I run a program like WinAmp in the Background.

(But i don't get any error MSGs)


#4 Tuan   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 November 1999 - 03:11 PM

The DirectSound creation will fail if there are another program which's using the sound card! It means you cannot use WinAmp, AVI with MCI, ... in background and your program (use directx) at the same time! Currently, if the DirectSound creation fail, I'll disable all my sound functions! Anyone else know how to continue using DirectSound in this case, please let me know.
My email is hdtuan@hotmail.com

#5 Reaver   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 November 1999 - 07:23 PM

What? From what I understand, DirectX should let multiple applications share
the same soundcard. It's the standard Windows MultiMedia library that only allows
one application to use the soundcard at a time.

What I mean is that when you change focus from one application to another,
the control to the soundcard should also transfer as well.

But, hmmm... you probably can't have a foreground program and a background program
trying to use the same soundcard under DirectX at the same time, so you're probably
right.

Reaver

[This message has been edited by Reaver (edited November 25, 1999).]


#6 Melo   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 November 1999 - 04:25 AM

I don't get any errors while creating the DS-Object, etc.
(I think that's the strange thing)
But on my friend's machine my program works perfectly - i think that's because he's got a SB live that's got more wave interfaces (so he told me).
I've got a good old SB32...

#7 Splat   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 November 1999 - 02:35 PM

Its pretty simple: You can't have two applications with the DirectSound object in EXCLUSIVE cooperative mode. By principle, exclusive means just for one. However, as long as your application can deal with another application having exclusive access (meaning you can't change the output settings) then you should just default to priority cooperative level.

- Splat


#8 Melo   Members   -  Reputation: 122

Like
Likes
Like

Posted 26 November 1999 - 02:55 AM

But I should get a Error MSG when I set the CoopLevel. I don't.
(But that's only with WinAmp or ModPlug Player).




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