Written by J. Laroche at the Center for Music Experiment at UCSD, San Diego California. December 1990.

C functions.

There is a bunch of C functions dealing with all sorts of things in the NeXT machine, some of which may even be useful! You'll find:

· The SOUND functions, with a prefix SND, like in SNDReadSoundFile(), help you open, play, record, save, convert sound files. It is a good idea to read the documentation's corresponding chapter before doing anything, just to get an idea of what already exists and what doen't. (that might save you some time!)
These functions can be used for basic sound recording, playing, conversion, and provide several other utilities. They do not provide any environment for real-time sound processing, (recording a sound, processing it and playing it in real time.) For this, you'll need the Sound/DSP driver functions.
The Sound functions' include files are in /usr/include/sound.
You'll need the -lsys_s flag at compilation time.

· The Sound/DSP driver functions, prefix snddriver, like in snddriver_dsp_boot(), are low-level functions that enable you to set-up connections (streams) between sound devices (Microphone, DACS, DSP, or memory), and pass sound data through these connections. You want to use these functions whenever you need to do something not provided by the SOUND functions: real time sound processing using the Digital Ears for example...
This document will focus mainly on the use of these functions.
The Sound/DSP driver functions' include files are also in /usr/include/sound.
You'll also need the -lsys_s flag at compilation time.

· The DSP functions, with a prefix DSP, like in DSPBootFile(), are less useful in a musical context. They're provided to open, communicate with, and close the DSP in a very basic way which does not enable Direct Memory Access (DMA).
The DSP functions's include files are in /usr/include/dsp. If you want to use them, you'll need to compile with -ldsp_p -ldsp_s flags.

· Mach Functions are useful for everything that has to do with ports, messages, virtual memory managment, etc. You'll need to used them, from time to time, because the Sound driver is built around the notions of ports and messages.