|
|||||||||
| 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.CutList
A CutList consists of a CutListSource and a stack of CutListElements that acts as a CutListSource itself. When queried for an AudioInputStream or a WaveForm, the CutList will handle over the request to the top CutListElement, which handles it over to the next one and so on. Each CutListElement adds its own modification to the CutList. The result will then be an AudioinputStream or a WaveForm containing all modifications of the CutList.
| Field Summary | |
|---|---|
private java.util.ArrayList |
elements
List of CutListElements contained in this CutList |
private CutListSource |
lastResult
The last result of the query through all CutListEleemnts. |
private CutListSource |
source
The CutListSource of this CutList |
| Constructor Summary | |
|---|---|
CutList(CutListSource source)
Create a new CutList using the given source |
|
| Method Summary | |
|---|---|
void |
addElement(CutListElement el)
Add a CutListElement to the top of this CutList |
protected void |
calcLastResult()
Calc the resulting CutListSource element by quering through all CutListElements |
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 |
CutListElement |
getLastElement()
Get the top element of this CutList |
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 |
remove(CutListElement el)
Remove a CutListElement from this CutList |
void |
removeElement(CutListElement el)
Remove a CutListElement from this CutList |
void |
removeLastElement()
Remove this CutListīs top element |
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. |
void |
setSource(CutListSource source)
Set this CutListīs source |
void |
update()
Notification that a change has been made to this CutList |
void |
update(CutListElement element)
Notification about the change of a CutListElement |
void |
update(CutListSource source)
Notification about the change of a CutListSource |
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.util.ArrayList elements
private CutListSource lastResult
private CutListSource source
| Constructor Detail |
|---|
public CutList(CutListSource source)
source - The CutListSource to get the audio data from| Method Detail |
|---|
public void addElement(CutListElement el)
el - The CutListEleemnt to addprotected void calcLastResult()
public 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 CutListElement getLastElement()
null, if it has no
elementspublic 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 remove(CutListElement el)
el - The CutListElement to removepublic void removeElement(CutListElement el)
el - The CutListElement to removepublic void removeLastElement()
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 void setSource(CutListSource source)
source - The new CutListSourcepublic void update()
public void update(CutListElement element)
ModificationListener
update in interface ModificationListenerelement - The modified CutListElementModificationListener.update(com.groovemanager.sampled.nondestructive.CutListElement)public void update(CutListSource source)
ModificationListener
update in interface ModificationListenersource - The modified CutListSourceModificationListener.update(com.groovemanager.sampled.nondestructive.CutListSource)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 | ||||||||