This chapter describes the hardware and software provided for recording, manipulating, playing back, and displaying sounds. The chapter is divided into three parts:
Typical sound hardware
A brief tutorial on sound and how it's represented on a computer
The SndKit
At the heart of the MusicKit Project sound facilities are the Objective-C language classes provided by the SndKit. The SndKit manages the details of operating system communication, data access, and data buffering that are necessary for recording and playing sounds.
A number of system beep-type sounds are provided in files on the disk. You can easily incorporate these sounds into your application; the playback of an effect can be made to correspond to user actions or application events, such as the completion of a background process.
The sound software gives you full access to the data that makes up a sound. With some simple programming you can manipulate this data. For instance, you can alter the pitch of a sound or affect its playback speed. A sound can be played backwards, looped end to end, or chopped into pieces and reassembled in a different order. You can digitally splice and mix together any number of different sounds: A dog bark can be spliced into the middle of a doorbell; a clarinet tone can turn into a snore.