The Physiologist's Friend Simulation API

ch.unizh.ini.friend.simulation
Class AudioOutput

java.lang.Object
  extended by ch.unizh.ini.friend.simulation.AbstractAcceptsInput
      extended by ch.unizh.ini.friend.simulation.AbstractMonitor
          extended by ch.unizh.ini.friend.simulation.AudioOutput
All Implemented Interfaces:
AcceptsInput, Updateable, Serializable

public class AudioOutput
extends AbstractMonitor

Plays the output of a ServesOutput on the speaker, if the cell being played makes spikes. Every time there is a spike, a buffer holding a spike-like sound is placed on the audio output buffer.

An instance of this class is constructed in SimulationSetupFactory and made one of the updateables. The user uses the GUI to set the monitored cell

Version:
$Revision: 1.24 $
Author:
Christof Marti/Tobi Delbruck
See Also:
Serialized Form

Field Summary
 
Fields inherited from class ch.unizh.ini.friend.simulation.AbstractAcceptsInput
inputs
 
Constructor Summary
AudioOutput()
          Creates a now instance with no current input.
AudioOutput(ServesOutput input)
          Creates a new instance with the given input.
 
Method Summary
 void compute(float dt)
          Computes the new state of this component of the simulation.
protected  void finalize()
          Release the line on finialization.
 boolean isMuted()
          is audio muted?
 void setMuted(boolean f)
          sets audio muted.
 
Methods inherited from class ch.unizh.ini.friend.simulation.AbstractMonitor
getInput, getInputs, setInput, setInputs, update
 
Methods inherited from class ch.unizh.ini.friend.simulation.AbstractAcceptsInput
averageInputs, cloneObject, connectOneToAll, connectOneToOne, getCollectionInstance, integrateInputs
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AudioOutput

public AudioOutput()
Creates a now instance with no current input.


AudioOutput

public AudioOutput(ServesOutput input)
Creates a new instance with the given input.

Parameters:
input - The input.
Method Detail

setMuted

public void setMuted(boolean f)
sets audio muted.


isMuted

public boolean isMuted()
is audio muted?


finalize

protected void finalize()
                 throws Throwable
Release the line on finialization.

Overrides:
finalize in class Object
Throws:
Throwable

compute

public void compute(float dt)
Computes the new state of this component of the simulation. Feeds the source line with audio data.

Parameters:
dt - The time that has passed since the last invocation.

http://www.ini.unizh.ch/~tobi/friend