Exemplo n.º 1
0
 public NbDecoder()
 {
     this.random   = new Random();
     this.stereo   = new Stereo();
     this.inband   = new Inband(this.stereo);
     this.enhanced = true;
 }
Exemplo n.º 2
0
 public SbDecoder(bool ultraWide) : base(ultraWide)
 {
     this.stereo   = new Stereo();
     this.enhanced = true;
     if (ultraWide)
     {
         this.Uwbinit();
     }
     else
     {
         this.Wbinit();
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Constructor
 /// </summary>
 public SbDecoder(bool ultraWide)
     : base(ultraWide)
 {
     stereo   = new Stereo();
     enhanced = true;
     if (ultraWide)
     {
         Uwbinit();
     }
     else
     {
         Wbinit();
     }
 }
Exemplo 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);
        }
Exemplo n.º 5
0
 public Inband(Stereo stereo)
 {
     this.stereo = stereo;
 }
Exemplo n.º 6
0
 public SbDecoder()
 {
     stereo   = new Stereo();
     enhanced = true;
 }
Exemplo n.º 7
0
 public NbDecoder()
 {
     stereo   = new Stereo();
     inband   = new Inband(stereo);
     enhanced = true;
 }