Class:            PortAudioPort

Environment:      Siren
Superclass:         Siren.SoundPort
Category:         MusicIO-Sound
Instance variables:   rate format outChannels interface isOpen isRunning
               bufferSize

A PortAudioPort is an interface to the external PortAudio library. It is simple, supports playback only, and does not use callbacks from C into Smalltalk. For a fancier version that supports input as well , see SmartAudioPort.

Instance Variables:
   device the PortAudio device flag for my device
   rate the sample rate in Hz
   format sample format as in #lin16Bit
   outChannels # of out channels
   interface my low-level interface
   isOpen    am I open?
   isRunning am I running?
   bufferSize size of the preallocated IO buffers

Shared Variables:
   Devices my total # of I/O channels and default I/O sample rates

open/close

close
   Close the receiver sound port

open
   Open the receiver sound port

start
   Start the receiver sound port

stop
   Stop the receiver sound port

terminate
   Shut down the receiver.

accessing

format
   

format: aValue
   

outChannels
   

outChannels: aValue
   

rate
   

rate: aValue
   

initialize/release

initialize
   Answer an initialized version of the receiver.

play/record

play: aSound
   Play the argument on the receiver over the DACs.

play: aSound from: start to: stop
   Play the argument on the receiver over the DACs.

MetaClass:         PortAudioPort class

initialize/release

stop
   Stop and close the running instance

examples

playSweep
   Play a swept sine wave using the simple output-only port audio port.

playSweepLong
   Play a *long* swept sine wave using the simple output-only port audio port.