Title Banner

Previous Book Contents Book Index Next

Newton Developer Technical Information: Newton Programmer's Guide: 2.1 OS Addendum /
Chapter 7 - Sound / Sound Reference
Protos


protoSoundChannel

The *protoSoundChannel system prototype represents a virtual connection to a specific piece of sound input or output hardware.

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.
Slot descriptions

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 or nil, '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 is nil, then the internal speaker is used. The default value of outputDevice is nil. 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 is nil, then the internal microphone is used. The default value of inputDevice is nil. 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 is nil, 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 the inputGain 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.
The following methods are supplied by *protoSoundChannel. They are listed in alphabetical order.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
26 APR 1997



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help