public NbDecoder()
 {
     this.random   = new Random();
     this.stereo   = new Stereo();
     this.inband   = new Inband(this.stereo);
     this.enhanced = true;
 }
Exemple #2
0
 public SbDecoder(bool ultraWide) : base(ultraWide)
 {
     this.stereo   = new Stereo();
     this.enhanced = true;
     if (ultraWide)
     {
         this.Uwbinit();
     }
     else
     {
         this.Wbinit();
     }
 }
 /// <summary>
 /// Constructor
 /// </summary>
 public SbDecoder(bool ultraWide)
     : base(ultraWide)
 {
     stereo   = new Stereo();
     enhanced = true;
     if (ultraWide)
     {
         Uwbinit();
     }
     else
     {
         Wbinit();
     }
 }
Exemple #4
0
        /// <summary>
        /// Encode an array of floats.
        /// </summary>
        /// <param name="data"></param>
        /// <param name="numSamples"></param>
        /// <returns>
        /// true if successful.
        /// </returns>
        public bool processData(float[] data, int numSamples)
        {
            int numSamplesRequired = channels * frameSize;

            if (numSamples != numSamplesRequired)
            {
                throw new Exception("SpeexEncoder requires " + numSamplesRequired + " samples to process a Frame, not " + numSamples);
            }
            if (channels == 2)
            {
                Stereo.encode(bits, data, frameSize);
            }
            encoder.Encode(bits, data);
            return(true);
        }
Exemple #5
0
 public Inband(Stereo stereo)
 {
     this.stereo = stereo;
 }
Exemple #6
0
 public SbDecoder()
 {
     stereo   = new Stereo();
     enhanced = true;
 }
Exemple #7
0
 public NbDecoder()
 {
     stereo   = new Stereo();
     inband   = new Inband(stereo);
     enhanced = true;
 }