About me

Vladimir Nabokov

Books
Programming
Biochemistry
Aim | Communicate

Search
 


 
   
Letters from Terra - Life in water warmed by sunlight
 
 

     
 
 
     

CD Audio

Although it is of course possible to generate background music ona a site by the looping of MIDI sound, or the inclusion of simple recorded sound effects at various intervals, none of these even approach the quality of genuine CD audio. In the case of MIDI, the rather monotonous and shrill strains will eventually annoy, especially on those games that give you time to stop and thing, and due to the size and difficulties in the oganisation of the more detailed WAV sounds the range that can be played as the game is running is likely to be highly limited. Indeed, in either case it's difficult to adjust the background sound so it suits all of your users' tastes. One of the simplest, easiest to implement and effective ways to overcome this problem is by the provision for your users to create their own background music, the program playing a CD whilst the rest of the code is running. This module allows this to be accomplished, and is fairly simple to use, offering a wide range of control over the CD drive, including automatic opening and closing, extraction of track data from the CD, and full playing of any section. Writing a simple CD player is a straitforward task, and all activity occurs in the background, hardly impinging upon the running of your program, and barely increasing the size of your compiled program. Certainingly an interesting unit for novices to experiment with, and also contains some interesting interrupt code. Practically us extremely effective at introducing background sound to games, and requires minimal effort. Again, this unit was not written by myself, so I have left it in the intact distribution copy form including several demonstration programs, as well as a simple CD player written in Pascal. The CD unit comes with full source for your delictation.

Download the CD Audio unit (32 Kb, zipped) | Back to Unit & Tools

 
 
Letters from Terra | Updated 15th December 2004 | By Jonathan Ayling