• Advertisement

Archived

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

Playing Tones in the Background

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