com.frinika.benchmark.audio
Class ClickListener

java.lang.Object
  extended by com.frinika.voiceserver.Voice
      extended by com.frinika.benchmark.SyncVoice
          extended by com.frinika.benchmark.audio.ClickListener

public class ClickListener
extends SyncVoice

Use for capturing inputs and for direct monitoring. Based on Peters Sampler code.

Author:
pjl, Peter Johan Salomonsen

Field Summary
 
Fields inherited from class com.frinika.benchmark.SyncVoice
framePtr, glitched, realStartTime
 
Fields inherited from class com.frinika.voiceserver.Voice
interrupts, nextVoice, startFramePos
 
Constructor Summary
ClickListener(FrinikaSequencer seq, boolean monit, ClickOscillator out, float thresh)
           
 
Method Summary
protected  void correctGlitch()
          Called when framePtr goes out of sync
 void fillBuffer(int startBufferPos, int endBufferPos, float[] buffer)
          This is where the raw audio data should be produced.
 void setAudioDeviceHandle(AudioDeviceHandle audio)
           
 
Methods inherited from class com.frinika.benchmark.SyncVoice
doSync
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClickListener

public ClickListener(FrinikaSequencer seq,
                     boolean monit,
                     ClickOscillator out,
                     float thresh)
Method Detail

setAudioDeviceHandle

public void setAudioDeviceHandle(AudioDeviceHandle audio)

fillBuffer

public void fillBuffer(int startBufferPos,
                       int endBufferPos,
                       float[] buffer)
Description copied from class: Voice
This is where the raw audio data should be produced. The passed in buffer contains the audio data from the previous voice in the chain, thus new data should just be added to the buffer. It's important to just fill within the start and stop positions, because this is how the interrupt functions control that parameter modification occur at the right place.

Specified by:
fillBuffer in class Voice

correctGlitch

protected void correctGlitch()
Description copied from class: SyncVoice
Called when framePtr goes out of sync

Specified by:
correctGlitch in class SyncVoice