Important: Inside Macintosh: Sound is deprecated as of Mac OS X v10.5. For new audio development in Mac OS X, use Core Audio. See the Audio page in the ADC Reference Library.
Sound Channel Status Records
To obtain information about a sound channel, you can pass a pointer to a sound channel status record to theSndChannelStatus
function. TheSCStatus
data type defines a sound channel status record.
TYPE SCStatus = RECORD scStartTime: Fixed; {starting time for play from disk} scEndTime: Fixed; {ending time for play from disk} scCurrentTime: Fixed; {current time for play from disk} scChannelBusy: Boolean; {TRUE if channel is processing cmds} scChannelDisposed: Boolean; {reserved} scChannelPaused: Boolean; {TRUE if channel is paused} scUnused: Boolean; {unused} scChannelAttributes: LongInt; {attributes of this channel} scCPULoad: LongInt; {CPU load for this channel} END;You can mask out certain values in the
Field Description
scStartTime
- If the Sound Manager is playing from disk through the specified sound channel, then
scStartTime
is the starting time in seconds from the beginning of the sound for the play from disk. Otherwise,scStartTime
is 0.scEndTime
- If the Sound Manager is playing from disk through the specified sound channel, then
scEndTime
is the ending time in seconds from the beginning of the sound for the play from disk. Otherwise,scEndTime
is 0.scCurrentTime
- If the Sound Manager is playing from disk through the specified sound channel, then
scCurrentTime
is the current time in seconds from the beginning of the disk play. Otherwise,scCurrentTime
is 0. The Sound Manager updates the value of this field only periodically, and you should not rely on the accuracy of its value.scChannelBusy
- If the specified channel is currently processing sound commands, then
scChannelBusy
isTRUE
; otherwise,scChannelBusy
isFALSE
.scChannelDisposed
- Reserved for use by Apple Computer, Inc.
scChannelPaused
- If the Sound Manager is playing from disk through the specified sound channel and the play from disk is paused, then
scChannelPaused
isTRUE
; otherwise,scChannelPaused
isFALSE
. This field is alsoTRUE
if the channel was paused with thepauseCmd
sound command.scUnused
- Reserved for use by Apple Computer, Inc.
scChannelAttributes
- The current attributes of the specified channel. These attributes are in the channel initialization parameters format. The value returned in this field is always identical to the value passed in the
init
parameter toSndNewChannel
.scCPULoad
- The CPU load for the specified channel. You should not rely on the value in this field.
scChannelAttributes
field to determine how a channel has been initialized.
CONST initPanMask = $0003; {mask for right/left pan values} initSRateMask = $0030; {mask for sample rate values} initStereoMask = $00C0; {mask for mono/stereo values} initCompMask = $FF00; {mask for compression IDs}