Interface Decoder

All Known Implementing Classes:
NbDecoder, SbDecoder

public interface Decoder
Speex Decoder inteface, used as a base for the Narrowband and sideband decoders.
Version:
$Revision: 1.2 $
Author:
Jim Lawrence, helloNetwork.com, Marc Gimpel, Wimba S.A. (mgimpel@horizonwimba.com)
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    decode(Bits bits, float[] out)
    Decode the given input bits.
    void
    decodeStereo(float[] data, int frameSize)
    Decode the given bits to stereo.
    boolean
    Returns whether or not we are using Discontinuous Transmission encoding.
    float[]
    Returns the excitation array.
    int
    Returns the size of a frame.
    float[]
    Returns the innovation array.
    boolean
    Returns whether perceptual enhancement is enabled or disabled.
    float[]
    Returns the Pitch Gain array.
    void
    setPerceptualEnhancement(boolean enhanced)
    Enables or disables perceptual enhancement.
  • Method Details

    • decode

      int decode(Bits bits, float[] out) throws StreamCorruptedException
      Decode the given input bits.
      Parameters:
      bits - - Speex bits buffer.
      out - - the decoded mono audio frame.
      Returns:
      1 if a terminator was found, 0 if not.
      Throws:
      StreamCorruptedException - If there is an error detected in the data stream.
    • decodeStereo

      void decodeStereo(float[] data, int frameSize)
      Decode the given bits to stereo.
      Parameters:
      data - - float array of size 2*frameSize, that contains the mono audio samples in the first half. When the function has completed, the array will contain the interlaced stereo audio samples.
      frameSize - - the size of a frame of mono audio samples.
    • setPerceptualEnhancement

      void setPerceptualEnhancement(boolean enhanced)
      Enables or disables perceptual enhancement.
      Parameters:
      enhanced -
    • getPerceptualEnhancement

      boolean getPerceptualEnhancement()
      Returns whether perceptual enhancement is enabled or disabled.
      Returns:
      whether perceptual enhancement is enabled or disabled.
    • getFrameSize

      int getFrameSize()
      Returns the size of a frame.
      Returns:
      the size of a frame.
    • getDtx

      boolean getDtx()
      Returns whether or not we are using Discontinuous Transmission encoding.
      Returns:
      whether or not we are using Discontinuous Transmission encoding.
    • getPiGain

      float[] getPiGain()
      Returns the Pitch Gain array.
      Returns:
      the Pitch Gain array.
    • getExc

      float[] getExc()
      Returns the excitation array.
      Returns:
      the excitation array.
    • getInnov

      float[] getInnov()
      Returns the innovation array.
      Returns:
      the innovation array.