Jump to content
  • Advertisement

Archived

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

Rudan

DirectMusic and sound quality

This topic is 5657 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 have a problem with DirectMusic. When I want to play a segment I use this: performance->PlaySegment(segment, DMUS_SEGF_SECONDARY, 0, NULL); It works, but the problem is that it sounds horrible. The sound quality isn''t even close to the original wave file. However, if I play it without the DMUS_SEGF_SECONDARY flag, it sounds fine. But then, of course, I can only play one sound at a time. Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
Use DirectSound to play more than a sound at a time, Use DirectMusic for background music

If God with me, Who against me?

Share this post


Link to post
Share on other sites
yes, I had this exact same problem once.

I think you are actually playing the file many times over at teh same instant!

I.e. you called performance->PlaySegment(...) repeatedly for a split second when you pressed a key to actually start playing the wave..

Ie.

while(true) {
if(kbhit()) performance->PlaySegment(...);
};

this code will play the performance many times all dubbed on itself (ruining the sound quality) when you only want to play it once!! Only if you press the keyboard very quickly will you get it to play just once..

www.cppnow.com

Share this post


Link to post
Share on other sites
superdeveloper: You''re right. I should have thought about that myself. Thanks!

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!