jass.generators
Class StreamingAudioGroove
java.lang.Object
jass.engine.Out
jass.generators.AudioGroove
jass.generators.StreamingAudioGroove
- All Implemented Interfaces:
- Source
public abstract class StreamingAudioGroove
- extends AudioGroove
Position based playback of audio date (gramophone model). Wavfile
(mono) is indexed with position of needle on record. Every call to
getBuffer this UG polls for position of needle in seconds, and uses
this with the previous saved value to index a wav file and compute an
audio buffer for the corresponding segment. Method to obtain position
of needle is abstract.
Streams audio off source
- Author:
- Kees van den Doel (kvdoel@cs.ubc.ca)
Method Summary |
void |
computeBuffer()
Compute the next buffer. |
float[] |
getGrooveBuffer()
Get the groove buffer as array, which is not possible. |
Methods inherited from class jass.engine.Out |
clearBuffer, copyToOld, getBuffer, getBuffer, getBufferSize, getTime, peekAtBuffer, resetTime, setBufferSize, setTime, setTimeAndNotify |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamingAudioGroove
public StreamingAudioGroove(int bufferSize)
- For derived classes
- Parameters:
bufferSize
- buffer size
StreamingAudioGroove
public StreamingAudioGroove(float srate,
int bufferSize,
java.lang.String fn)
throws UnsupportedAudioFileFormatException
- Construct Groove from named file.
- Parameters:
srate
- sampling rate in Hertz.bufferSize
- bufferSize of this Outfn
- Audio file name.
- Throws:
UnsupportedAudioFileFormatException
StreamingAudioGroove
public StreamingAudioGroove(float srate,
int bufferSize,
java.net.URL url)
throws UnsupportedAudioFileFormatException
- Construct Groove from named URL.
- Parameters:
srate
- sampling rate in Hertz.bufferSize
- bufferSize of this Outurl
- Audio file url name.
- Throws:
UnsupportedAudioFileFormatException
getGrooveBuffer
public float[] getGrooveBuffer()
- Get the groove buffer as array, which is not possible. So return null
- Overrides:
getGrooveBuffer
in class AudioGroove
- Returns:
- null
computeBuffer
public void computeBuffer()
- Compute the next buffer.
- Overrides:
computeBuffer
in class AudioGroove