public class AliasDiphone extends Diphone
ALIAS_MAGIC, MAGIC, NAME_LENGTH| Constructor and Description |
|---|
AliasDiphone(java.lang.String name,
java.lang.String originalName) |
| Modifier and Type | Method and Description |
|---|---|
void |
dump()
dumps out this Diphone.
|
void |
dumpBinary(java.nio.ByteBuffer bb)
Dumps the diphone to the given channel.
|
void |
dumpBinary(java.io.DataOutputStream os)
Dumps the diphone to the given channel.
|
int |
getMidPoint()
Returns the midpoint index. the midpoint index is the sample
that divides the diphone into the first and second parts.
|
java.lang.String |
getOriginalName()
Get the name of the original name that this alias points to.
|
int |
getPbPositionMillis()
Returns the midpoint index. the midpoint index is the sample
that divides the diphone into the first and second parts.
|
Sample[] |
getSamples()
Returns the samples associated with this diphone.
|
Sample |
getSamples(int which)
Returns a particular sample.
|
int |
getUnitSize(int unitPart)
Returns the total number of residuals in the given part for this
diphone.
|
Sample |
nearestSample(float uIndex,
int unitPart)
Returns the sample that is closest to uIndex.
|
void |
setOriginalDiphone(Diphone original)
Associate the actual diphone object of the original with this alias.
|
getName, loadBinary, loadBinarypublic AliasDiphone(java.lang.String name,
java.lang.String originalName)
name - The alias name to use for the existing diphoneoriginalName - the original name of the diphone.public java.lang.String getOriginalName()
public void setOriginalDiphone(Diphone original)
original - a diphone object whose getName() must return the same
as our getOriginalName().java.lang.IllegalArgumentException - if the diphone to be registered as the
original has a name which is different from this AliasDiphone's original name
as returned by getOriginalName().public Sample[] getSamples()
getSamples in class Diphonepublic Sample getSamples(int which)
getSamples in class Diphonewhich - which sample to returnpublic int getMidPoint()
getMidPoint in class Diphonepublic int getPbPositionMillis()
getPbPositionMillis in class Diphonepublic Sample nearestSample(float uIndex, int unitPart)
nearestSample in class DiphoneuIndex - the desired indexunitPart - do we want the first have (1) or the second
half (2)public int getUnitSize(int unitPart)
getUnitSize in class DiphoneunitPart - indicates which part is of interest (1 or 2)public void dumpBinary(java.nio.ByteBuffer bb)
throws java.io.IOException
dumpBinary in class Diphonebb - the ByteBuffer to write tojava.io.IOException - if IO error occurspublic void dumpBinary(java.io.DataOutputStream os)
throws java.io.IOException
dumpBinary in class Diphoneos - the DataOutputStream to write tojava.io.IOException - if IO error occurs