uk.org.toot.demo
Class AudioFilePlayerProcess
java.lang.Object
uk.org.toot.demo.AudioFilePlayerProcess
- All Implemented Interfaces:
- uk.org.toot.audio.core.AudioProcess
- Direct Known Subclasses:
- MultiTrackPlayer.PlayerProcess
public class AudioFilePlayerProcess
- extends java.lang.Object
- implements uk.org.toot.audio.core.AudioProcess
A simple (hacky) audio file player process that is NOT sample-accurate.
Playing always starts at the beginning of a buffer.
Also, files are not played back at their natural sample rate,
they are played back at the process sample rate.
Glitches may occur.
|
Field Summary |
protected javax.sound.sampled.AudioInputStream |
ais
|
| 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 |
ais
protected javax.sound.sampled.AudioInputStream ais
AudioFilePlayerProcess
public AudioFilePlayerProcess()
openStream
protected void openStream()
setFile
public void setFile(java.io.File file,
java.lang.String name)
open
public void open()
- Specified by:
open in interface uk.org.toot.audio.core.AudioProcess
close
public void close()
- Specified by:
close in interface uk.org.toot.audio.core.AudioProcess
attachMetaInfo
protected void attachMetaInfo(uk.org.toot.audio.core.AudioBuffer buffer)
locate
public void locate(long microseconds)
handleEndOfTrack
protected void handleEndOfTrack()
processAudio
public int processAudio(uk.org.toot.audio.core.AudioBuffer buffer)
- Specified by:
processAudio in interface uk.org.toot.audio.core.AudioProcess