com.frinika.sequencer.model.audio
Class AudioStreamVoice
java.lang.Object
com.frinika.audio.toot.SynchronizedAudioProcess
com.frinika.sequencer.model.audio.AudioStreamVoice
- All Implemented Interfaces:
- uk.org.toot.audio.core.AudioProcess
public class AudioStreamVoice
- extends SynchronizedAudioProcess
Fields inherited from interface uk.org.toot.audio.core.AudioProcess |
AUDIO_DISCONNECT, AUDIO_OK |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AudioStreamVoice
public AudioStreamVoice(uk.org.toot.audio.server.AudioServer audioServer,
FrinikaSequencer sequencer,
AudioReader ais,
long clipStartTimePosition1)
throws java.lang.Exception
- Construct a DAAudioStreamVoice. This is an extension of the
SynchronizedVoice which uses a sequencer as synchronization source.
The extended SynchronizedVoice class requires that we initially provide
an offset for where in the clip to start (initialFramePos parameter), but
the synchronization will then correct the position as the clip is
playing. Thus we'll use the same formula as the synchronization to
calculate the initialFramePos.
- Parameters:
voiceServer
- -
The voice server we're playing insequencer
- -
the sequencer that we are playing inais
- -
The audio clip input streamclipStartTimePosition
- -
The start time in microseconds relative to Start time relative
to sequencer zero timemodulator
- Evelope for the audio (can be null)
- Throws:
java.lang.Exception
setRunning
public void setRunning(boolean running)
- Tell the voice whether to play or not (if the sequencer is running)
processAudioSynchronized
public void processAudioSynchronized(uk.org.toot.audio.core.AudioBuffer buffer)
- Specified by:
processAudioSynchronized
in class SynchronizedAudioProcess
setRealStartTime
public void setRealStartTime(long realStartTime)
close
public void close()
open
public void open()