Environment: Siren
SmartPortAudioPort is a more advanced IO port for PortAudio; it uses a Smalltalk process that sleeps on a semaphore that is signalled by the PortAudio callback. this allows one to synthesize sound interactively or to record into Siren sounds. The methods nextInBuffer and nextInBuffer are used to copy buffers or call synthesis clients.
Instance Variables:
play/record
inChannels
ioSemaphore
inClient
outClients
ioProcess
inBuffer
outBuffer
doIO
Handle a callback from PortAudio; this is sent an an external callback through the class
nextInBuffer
Get the next input buffer for the clients from the interface.
nextOutBuffer
Get the next output buffer from the clients and sum it into my buffer for playing.
play: aSound
Play the argument on the receiver over the DACs.
record: aSound
Record into the argument via the receiver.
start: duration
Start the receiver's IO loop for the given duration.
accessing
inChannels: aValue
outClients
setInputDevice
Set the port to use the default input device
open/close
Close the receiver sound port
open
Open the receiver sound port
initialize/release
Answer an initialized version of the receiver.
MetaClass: SmartAudioPort class
examples
Test playing a sound through the call-back interface
testRecord
SmartAudioPort testRecord
callbacks
Forward the callback to an instance
instance creation
Answer a new instance, or the singleton