Jump to content
  • Advertisement


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



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

hmm, I am not sure.

the 2 sound cards shouldn't be an issue, as long as you use the default sound card with setting up dmusic.

The only thing I can see is this..

Here is my code in the order I init it, and i never had those probs.

See if this perchance works ? The only differenct is changing from 64 t0 128, and I init audio BEFORE I create the loader.

Perhaps this is causing the "Already init.." errors?


return E_FAIL;


EDIT: See the difference? I create the performer before I init audio, then I create the loader.

I am pretty sure this is your issue!

[edited by - RhoneRanger on November 28, 2003 11:35:54 PM]

Share this post

Link to post
Share on other sites
I know these are warnings, but that is why the compiler is bitching (I assume).

My sound sounds great! No distortion or bad things happening.

Remember though, you need to create a different "buffer" for each sound. You can''t (or shouldn''t) play 2 sounds on the same buffer.

Also make sure you only select one of your cards for rendering sound. It is a possiblility that both are being played at the same time, making it sound delayed, echoed or distorted.

Share this post

Link to post
Share on other sites
Sorry, Phoneranger, my post was meant for designlord.
I'm simply pointing out that these are warnings and not errors because in one of my own programs that uses DirectMusic, I get the same warnings, yet the sound plays perfect when the app is compiled in release mode. It appears the noise in debug mode is simply due to the latency of the overflow of debug output. Also in other DirectX interfaces, some warnings are common and can be safely ignored, as they were meant more for the DirectX dev team than for you.

[edited by - Mastaba on November 28, 2003 12:40:29 AM]

Share this post

Link to post
Share on other sites
Is there any particular reason you need to play the first sound in the primary buffer? I play all mine only in secondary buffer and playback is fine, even 16 overlapping sounds.

Share this post

Link to post
Share on other sites
@ Mastaba

The primary buffer is the one that runs continous.
All seconday buffers play at a specific place, or in otherwords they set a start time to copy data to the primary.

The primary SHOULD BE the only one that is playing.

Share this post

Link to post
Share on other sites
PhoneRanger, I have no issues using DirectMusic the way I do. I know the primary buffer is the only one that actually plays, that's not the issue. The issue is he can't get overlapping sounds to work right. Which I have no problem with, when I only designate the segments to be played as secondary segments. It makes perfect sense to me. If you force something to be played as the primary segment, then it would obviously control how any secondary segments are played. If your primary segment doesn't contain any control information, then DirectMusic has to fallback on some kind of default control. Which for your typical .wav files is less than desireable. But if you only have secondary segments playing, then DirectMusic mixes them nicely into the primary buffer.

I'll simply suggest that designlord should stop using the primary segment if he wants overlapping sounds. Creating additional audiopaths or performances is overkill. Though additional audiopaths can be useful for other reasons.

Playing a wave based .sgt file may make it easier to use wave sounds as primary segments without them interfering with the secondary segments. Though, I haven't been bothered enough to try loading DirectMusic Producer to see if that's the case.

[edited by - Mastaba on November 29, 2003 5:52:46 PM]

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!