|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.beadsproject.beads.data.Sample.Regime net.beadsproject.beads.data.Sample.TimedRegime
public static class Sample.TimedRegime
A TimedRegime stores only some parts of the audio file in memory at a time. It is useful for very large audio files, for audio streaming (e.g., playing an mp3), or for samples of which only a small part is used.
A sample with a TimedRegime loads "regions" of sample data and buffers them according to various parameters. See the method documentation for more details, but briefly, the parameters are:
regionSize
: The size of the region in ms.lookAhead
, lookBack
: When a region is accessed the lookAhead and lookBack determine which surrounding regions should be queued and loaded.memory
: The amount of time an unaccessed region should be kept in memory.loadingOrder
: Affects the order that surrounding regions are queued. NEAREST is suitable if you are playing backwards and forwards around a sample position, while ORDERED is suitable for playing forwards.
Nested Class Summary | |
---|---|
static class |
Sample.TimedRegime.Order
|
Field Summary | |
---|---|
Sample.TimedRegime.Order |
loadingOrder
|
long |
lookAhead
|
long |
lookBack
|
long |
memory
|
long |
regionSize
|
Fields inherited from class net.beadsproject.beads.data.Sample.Regime |
---|
storeInNativeBitDepth |
Constructor Summary | |
---|---|
Sample.TimedRegime()
|
|
Sample.TimedRegime(long regionSize,
long lookAhead,
long lookBack,
long memory,
Sample.TimedRegime.Order loadingOrder)
|
|
Sample.TimedRegime(long regionSize,
long lookAhead,
long lookBack,
long memory,
Sample.TimedRegime.Order loadingOrder,
boolean storeInNativeBitDepth)
|
Method Summary | |
---|---|
void |
setLoadingRegime(Sample.TimedRegime.Order lr)
When a region is loaded, nearby regions are put on a queue to be loaded also. |
void |
setLookAhead(long lookahead)
Set how many milliseconds from last loaded point to look ahead. |
void |
setLookBack(long lookback)
Set how many milliseconds from last loaded point to look backwards. |
void |
setMemory(long ms)
If a part of an audio file has not been accessed for some amount of time it is discarded. |
void |
setRegionSize(long ms)
Specify the size of each buffered region. |
Methods inherited from class net.beadsproject.beads.data.Sample.Regime |
---|
newStreamingRegime, newStreamingRegimeWithAging, newTotalRegime, newTotalRegimeNative |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public long lookAhead
public long lookBack
public long memory
public long regionSize
public Sample.TimedRegime.Order loadingOrder
Constructor Detail |
---|
public Sample.TimedRegime()
public Sample.TimedRegime(long regionSize, long lookAhead, long lookBack, long memory, Sample.TimedRegime.Order loadingOrder)
public Sample.TimedRegime(long regionSize, long lookAhead, long lookBack, long memory, Sample.TimedRegime.Order loadingOrder, boolean storeInNativeBitDepth)
Method Detail |
---|
public void setLookAhead(long lookahead)
lookahead
- time to look ahead in ms.public void setLookBack(long lookback)
lookback
- time to look backwards in ms.public void setMemory(long ms)
ms
- Duration in milliseconds that unaccessed regions remain loaded.public void setRegionSize(long ms)
ms
- Size of the region (ms)public void setLoadingRegime(Sample.TimedRegime.Order lr)
lr
- The order to load regions.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |