Jump to content
  • Advertisement

Archived

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

tppramod

Playing Tones in the Background

This topic is 5239 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 want to play a tone alongwith the movement of a sprite. I am generating the tone using the function sound() and nosound() in C (Ver. Turbo c 3.0 for DOS). The problem is when the tone is being played the animation is halted till the tone is fully played. Can anyone tell me how to play the tones in the background so that my sprite moves simultaneously without any disturbance. i would appreciate if you can help me with the code sample or any appropriate link. Thanks pramod New Delhi INDIA

Share this post


Link to post
Share on other sites
Advertisement
Ugh... in Dos you''d probably have to hook into the timer interrupt for playing background sounds.
To play sound if possible choose a sound-command that only sets the speakers frequence but doesn''t wait a certain time. Therefore whenever the interrupt kicks in you can play the next note from e.g. an array.

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!