footfall.players
Class GrainPlayer

java.lang.Object
  extended byfootfall.players.GrainPlayer

public class GrainPlayer
extends java.lang.Object

Input sound grains and uses Java Sound to render audio.


Constructor Summary
GrainPlayer()
          Input sound grains and uses Java Sound to render audio.
GrainPlayer(int bitRate)
          Input sound grains and uses Java Sound to render audio.
 
Method Summary
 void addGrain(float[] b)
          Add grain to current buffer (additive).
 int getBitRate()
          Playback bit rate
 int getVolume()
          Volume for use in vertical scrollbars (127 = minimum, 0 = maximum)
 java.lang.String getVolumeLabel()
          Volume Label for use in scrollbars (0% - 100%)
 void initGrains(int bufSize)
          Clear current buffer on every frame and load new buffer of specific size
 float[] playGrains()
          Play the grains in the current buffer and return the buffer for display
 void setVolume(int volume)
          Set the volume/amplitude for the grain player
 void start()
          Start the lines for audio output
 void stop()
          Stop the lines for audio output
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrainPlayer

public GrainPlayer()
Input sound grains and uses Java Sound to render audio.


GrainPlayer

public GrainPlayer(int bitRate)
Input sound grains and uses Java Sound to render audio.

Parameters:
bitRate - Playback bit rate (11.025kHz -44.1kHz)
Method Detail

addGrain

public void addGrain(float[] b)
Add grain to current buffer (additive). Merges with the contents currently in buffer.

Parameters:
b - Grain buffer to add

getBitRate

public int getBitRate()
Playback bit rate


getVolume

public int getVolume()
Volume for use in vertical scrollbars (127 = minimum, 0 = maximum)


getVolumeLabel

public java.lang.String getVolumeLabel()
Volume Label for use in scrollbars (0% - 100%)


initGrains

public void initGrains(int bufSize)
Clear current buffer on every frame and load new buffer of specific size

Parameters:
bufSize - Size New buffer size

playGrains

public float[] playGrains()
Play the grains in the current buffer and return the buffer for display


setVolume

public void setVolume(int volume)
Set the volume/amplitude for the grain player

Parameters:
volume - Volume (127 = minimum, 0 = maximum)

start

public void start()
Start the lines for audio output


stop

public void stop()
Stop the lines for audio output