protoSoundChannel
The *protoSoundChannel
system prototype represents a virtual connection to a specific piece of sound input or output hardware.
Slot descriptions
- Note
*protoSoundChannel
has been modified to support input in the 2.1 OS. All of the slots listed in this section are new in the 2.1 OS, along with the following methods: *IsOpen
, *NewRecording
,*NewInputBlock
, *SetInputGain
, and *GetInputGain
. Both old and new methods are documented here for completeness.![]()
The following methods are supplied by *
direction
- A symbol indicating whether the sound channel is to be used for input or output. This slot can have two valid values:
'record
or'play
. It is set to'record
by the*NewRecording
method. If this slot is invalid ornil
,'play
is assumed.outputDevice
- Specifies the device that is to be used for sound playback. If
nil
, then playback is done on the device specified by the user configuration variable of the same name. If that isnil
, then the internal speaker is used. The default value ofoutputDevice
isnil
. Device constants are listed in Table 7-3.inputDevice
- Specifies the device that is to be used for sound recording. If
nil
, then recording is done on the device specified by the user configuration variable of the same name. If that isnil
, then the internal microphone is used. The default value ofinputDevice
isnil
. Device constants are listed in Table 7-3.inputGain
- An integer value between 0 and 255 that specifies how much the input signal is to be amplified before it is recorded. If
nil
, then the input gain specified by the user configuration variable of the same name is used. If that isnil
, then a suitable default value is used to determine an initial value for input gain. The*SetInputGain
method can change the input gain for the channel, but it does not change the value of theinputGain
slot, which remains at its initial setting.- For more details on the input gain setting, see "Setting the Input Gain".
inputBlockSize
- The size used by *
NewInputBlock
for the VBO to record into. The default value is 65536 bytes. You can change the size, but the timing of the sound manager may not work for sizes that are too small.protoSoundChannel
. They are listed in alphabetical order.
![]()
![]()
![]()
![]()
© Apple Computer, Inc.
26 APR 1997Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help