Class SampleSet


  • public class SampleSet
    extends java.lang.Object
    Represents the frame and residual data used by the diphone database used Residual Excited Linear Predictive synthesizer
    • Constructor Summary

      Constructors 
      Constructor Description
      SampleSet​(java.io.DataInputStream is)
      Creates a SampleSet by reading it from the given input stream
      SampleSet​(java.nio.ByteBuffer bb)
      Creates a SampleSet by reading it from the given byte buffer
      SampleSet​(java.util.StringTokenizer tok, java.io.BufferedReader reader)
      Reads a SampleSet from the input reader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dumpBinary​(java.io.DataOutputStream os)
      Dumps this sample set to the given stream
      int getFrameSize​(int frame)
      Gets the size of the given frame
      Sample getSample​(int index)
      return the sample associated with the index
      SampleInfo getSampleInfo()
      Retrieves the info on this SampleSet
      int getUnitSize​(int start, int end)
      Returns the size of the unit represented by the given start and end points
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SampleSet

        public SampleSet​(java.util.StringTokenizer tok,
                         java.io.BufferedReader reader)
        Reads a SampleSet from the input reader.
        Parameters:
        tok - tokenizer that holds parameters for this SampleSet
        reader - the input reader to read the data from
      • SampleSet

        public SampleSet​(java.nio.ByteBuffer bb)
                  throws java.io.IOException
        Creates a SampleSet by reading it from the given byte buffer
        Parameters:
        bb - source of the Unit data
        Throws:
        java.io.IOException - if an IO error occurs
      • SampleSet

        public SampleSet​(java.io.DataInputStream is)
                  throws java.io.IOException
        Creates a SampleSet by reading it from the given input stream
        Parameters:
        is - source of the Unit data
        Throws:
        java.io.IOException - if an IO error occurs
    • Method Detail

      • dumpBinary

        public void dumpBinary​(java.io.DataOutputStream os)
                        throws java.io.IOException
        Dumps this sample set to the given stream
        Parameters:
        os - the output stream
        Throws:
        java.io.IOException - if an error occurs.
      • getSample

        public Sample getSample​(int index)
        return the sample associated with the index
        Parameters:
        index - the index of the sample
        Returns:
        the sample.
      • getSampleInfo

        public SampleInfo getSampleInfo()
        Retrieves the info on this SampleSet
        Returns:
        the sample info
      • getUnitSize

        public int getUnitSize​(int start,
                               int end)
        Returns the size of the unit represented by the given start and end points
        Parameters:
        start - the start of the unit
        end - the end of the unit
        Returns:
        the size of the unit
      • getFrameSize

        public int getFrameSize​(int frame)
        Gets the size of the given frame
        Parameters:
        frame - the frame of interest
        Returns:
        the size of the frame