Esempio n. 1
0
 public NbDecoder()
 {
     this.random   = new Random();
     this.stereo   = new Stereo();
     this.inband   = new Inband(this.stereo);
     this.enhanced = true;
 }
Esempio n. 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();
     }
 }
Esempio n. 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);
        }
Esempio n. 5
0
 public Inband(Stereo stereo)
 {
     this.stereo = stereo;
 }
Esempio n. 6
0
 public SbDecoder()
 {
     stereo   = new Stereo();
     enhanced = true;
 }
Esempio n. 7
0
 public NbDecoder()
 {
     stereo   = new Stereo();
     inband   = new Inband(stereo);
     enhanced = true;
 }