
966
Chapter 14: Properties
sampleCount
Usage
-- Lingo syntax
soundChannelObjRef
.sampleCount
// JavaScript syntax
soundChannelObjRef
.sampleCount;
Description
Sound Channel property; specifies the number of sound samples in the currently playing sound
in a sound channel. Read-only.
This is the total number of samples, and depends on the
sampleRate
and
duration
of the
sound. It does not depend on the
channelCount
of the sound.
A 1-second, 44.1 KHz sound contains 44,100 samples.
Example
This statement displays the name and
sampleCount
of the cast member currently playing in
sound channel 1 in the Message window:
-- Lingo syntax
put("Sound cast member" && sound(1).member.name && "contains" && \
sound(1).sampleCount && "samples.")
// JavaScript syntax
put("Sound cast member " + sound(1).member.name + " contains " +
sound(1).sampl " samples.");
See also
sampleRate
,
Sound Channel
sampleRate
Usage
-- Lingo syntax
soundChannelObjRef
.sampleRate
// JavaScript syntax
soundChannelObjRef
.sampleRate;
Description
Sound Channel property; returns, in samples per second, the sample rate of the sound cast
member or in the case of SWA sound, the original file that has been Shockwave Audio–encoded.
Read-only.
This property is available only after the SWA sound begins playing or after the file has been
preloaded using the
preLoadBuffer()
method. When a sound channel is given, the result is the
sample rate of the currently playing sound cast member in the given sound channel.
Typical values of this property are 8000, 11025, 16000, 22050, and 44100.
Содержание DIRECTOR MX 2004-DIRECTOR SCRIPTING
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...