Squeak Class Documentation category index | class index  
 
SoundInputStream
  category: Sound-Synthesis
  superclass: SoundRecorder
  subclasses:

This subclass of SoundRecorder supports real-time processing of incoming sound data. The sound input process queues raw sound buffers, allowing them to be read and processed by the client as they become available. A semaphore is used to synchronize between the record process and the client process. Since sound data is buffered, the client process may lag behind the input process without losing data.

instance methods
  accessing
  bufferCount
bufferSize
bufferSize:
isRecording
nextBufferOrNil

  initialization
  initialize

  private
  allocateBuffer
emitBuffer:

  recording controls
  startRecording
stopRecording

class methods
  no messages
 

instance methods
  accessing top  
 

bufferCount

Answer the number of sound buffers that have been queued.


 

bufferSize


 

bufferSize:

Set the sound buffer size. Buffers of this size will be queued for the client to process.


 

isRecording

Answer true if the sound input process is running.


 

nextBufferOrNil

Answer the next input buffer or nil if no buffer is available.


  initialization top  
 

initialize

SoundRecorder new


  private top  
 

allocateBuffer

Allocate a new buffer and reset nextIndex. This message is sent by the sound input process.


 

emitBuffer:

Queue a buffer for later processing. This message is sent by the sound input process.


  recording controls top  
 

startRecording

Start the sound input process.


 

stopRecording

Turn off the sound input process and close the driver.


class methods
  no messages top