O'Reilly logo

DarkBASIC Pro Game Programming, Second Edition by Joshua R. Smith, Jonathan S. Harbour

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Playing Sound Files

Boom! The enemy ship just exploded and you can hear it. Now you get to program the playing of the sounds. After the sounds are loaded, you can use them in the game. Playing back sounds is just as easy as loading them. No need to know the frequency of the sound or the timing of the sound card; just a simple command and presto, you hear the firepower of your awesome ship blasting away another alien scumbag. The sound playback commands use the same integer buffers as the load commands. They also give you a few more options for playback control. It only takes one command to play back a sound.

Playing and Looping a Sound Buffer

The PLAY SOUND command is the most basic sound playback command. You can specify an optional start position ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required