Sound and Lingo:
Director imports
AIFF and WAV sounds (both compressed and uncompressed), AU, Shockwave Audio,
MP3, and Macintosh System 7 sounds.
For best results, use sounds that have:
8- or 16-bit depth and a sampling rate of 44.1, 22.050, or 11.025 kHz.
Director can stream the following sounds:
QuickTime, Shockwave Audio, and MP3 sounds that are linked via a URL |
|
QuickTime, Shockwave Audio, MP3, AIFF, and WAV sounds that are linked to a local file |
Useful Lingo
To play sound cast members regardless of the settings in the Score:
Use the queue()
and play()
functions. The queue()
function loads the
sound into Director's RAM buffer so that it can be played immediately when called
for. The play()
command starts the sound playing. If you omit the
queue()
function, the sound may not play immediately when called
for. See queue()
and play()
(sound)
.
The following statements load the sound called Siren into RAM and start it playing in sound channel 1:
sound(1).queue(member("Siren")) sound(1).play()
To queue more than one sound to play in succession:
Use the queue()
function to list each sound in the order you want them to play. If you queue
them before they are played, Director plays the sounds with no pauses between
the sounds. Once the sounds are queued, only one play()
command
is needed.
These statements queue the sound members Explosion and Siren and play them in succession in sound channel 2:
sound(2).queue(member("Explosion")) sound(2).queue(member("Siren")) sound(2).play()
To control how a queued sound plays:
Include optional
parameters in a property list within the queue()
function. See
queue()
.
When setPlayList()
is used, any previously set queue of sounds will be replaced by the new playlist.
Once sounds are
queued, you can still control whether the queue is obeyed. You can choose to
interrupt loops with the breakLoop()
command, or to pause playback
with the pause()
function. The playNext()
command
lets you skip immediately to the next sound in the queue. See the Lingo
Dictionary for details on these and other sound commands.