|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groovemanager.sampled.nondestructive.AbstractSource
com.groovemanager.sampled.nondestructive.AudioFileSource
A CutListSource that gets its audio data from an audio file
| Field Summary | |
|---|---|
private java.io.File |
f
The audio file containing the audio data |
private int |
frameSize
The frame size of the audio file´s format |
private int |
length
The length of the audio data in the file in sample frames |
private AudioFileWaveForm |
wf
The AudioFileWaveForm corresponding to the audio file |
| Constructor Summary | |
|---|---|
AudioFileSource(java.io.File source,
AudioFileWaveForm wf)
Construct a new AudioFileSource out of the given file and WaveForm |
|
| Method Summary | |
|---|---|
void |
appendFrames(int numFrames)
Append the given number of frames to the audio data´s length. |
CutListSource |
duplicate()
Create a new CutListSource that represents the same data, but is independent of changes made to this source |
javax.sound.sampled.AudioInputStream |
getAudioInputStream(int start,
int length)
Get an AudioInputStream from this source |
int |
getLength()
Get the total length of this source in sample frames |
WaveForm |
getWaveForm(int start,
int length,
int width)
Get a WaveForm from this source |
boolean |
isReady()
Ask this source, if it is ready for providing audio data |
void |
replaceFile(java.io.File from,
java.io.File to)
Replace all references to the given source file inside this CutListSource with references to the given target file. |
boolean |
usesFile(java.io.File f)
Ask this CutListSource whether it relies on the contents of the given file. |
| Methods inherited from class com.groovemanager.sampled.nondestructive.AbstractSource |
|---|
addModificationListener, notifyListeners, removeModificationListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.groovemanager.sampled.nondestructive.CutListSource |
|---|
addModificationListener, removeModificationListener |
| Field Detail |
|---|
private java.io.File f
private int frameSize
private int length
private AudioFileWaveForm wf
| Constructor Detail |
|---|
public AudioFileSource(java.io.File source,
AudioFileWaveForm wf)
source - The audio file containing the audio datawf - The AudioFileWaveForm corresponding to the file
java.lang.IllegalArgumentException - If the audio file can not be read| Method Detail |
|---|
public void appendFrames(int numFrames)
numFrames - The number of sample frames to appendpublic CutListSource duplicate()
CutListSource
duplicate in interface CutListSourceCutListSource.duplicate()
public javax.sound.sampled.AudioInputStream getAudioInputStream(int start,
int length)
throws NotReadyException
CutListSource
getAudioInputStream in interface CutListSourcestart - The start position of the stream in sample frameslength - The length of the stream in sample frames
start
of this source with the length of length sample frames.
NotReadyException - If the audio data can not be providedCutListSource.getAudioInputStream(int, int)public int getLength()
CutListSource
getLength in interface CutListSourceCutListSource.getLength()
public WaveForm getWaveForm(int start,
int length,
int width)
CutListSource
getWaveForm in interface CutListSourcestart - The start position of the WaveForm in sample frameslength - The length of the audio data represented by the WaveForm
in sample frameswidth - The width in which the WaveForm should be displayed
start
of this source representing length sample frames with the
width of width.CutListSource.getWaveForm(int, int, int)public boolean isReady()
CutListSource
isReady in interface CutListSourceCutListSource.isReady()
public void replaceFile(java.io.File from,
java.io.File to)
CutListSource
replaceFile in interface CutListSourcefrom - The source file to replaceto - The target file to replace withCutListSource.replaceFile(java.io.File, java.io.File)public boolean usesFile(java.io.File f)
CutListSource
usesFile in interface CutListSourcef - The file to ask for
CutListSource.usesFile(java.io.File)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||