Lingo Dictionary > S > sampleCount

 

sampleCount

Syntax

sound(channelNum).sampleCount
the sampleCount of sound(channelNum)

Description

Read-only property; the number of sound samples in the currently playing sound in sound channel channelNum. 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.

put "Sound cast member" && sound(1).member.name && "contains" && \  
sound(1).sampleCount && "samples."

See also

channelCount, sampleRate, sampleSize