Class Stereo

java.lang.Object
org.xiph.speex.Stereo

public class Stereo extends Object
Stereo
Version:
$Revision: 1.2 $
Author:
Marc Gimpel, Wimba S.A. (mgimpel@horizonwimba.com)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private float
     
    private float
    Left/right balance info
    static final float[]
     
    private float
    Ratio of energies: E(left+right)/[E(left)+E(right)]
    private float
    Smoothed left channel gain
    static final int
    Inband code number for Stereo
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    decode(float[] data, int frameSize)
    Transforms a mono frame into a stereo frame using intensity stereo info.
    static void
    encode(Bits bits, float[] data, int frameSize)
    Transforms a stereo frame into a mono frame and stores intensity stereo info in 'bits'.
    void
    init(Bits bits)
    Callback handler for intensity stereo info

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SPEEX_INBAND_STEREO

      public static final int SPEEX_INBAND_STEREO
      Inband code number for Stereo
      See Also:
    • e_ratio_quant

      public static final float[] e_ratio_quant
    • balance

      private float balance
    • e_ratio

      private float e_ratio
      Left/right balance info
    • smooth_left

      private float smooth_left
      Ratio of energies: E(left+right)/[E(left)+E(right)]
    • smooth_right

      private float smooth_right
      Smoothed left channel gain
  • Constructor Details

    • Stereo

      public Stereo()
  • Method Details

    • encode

      public static void encode(Bits bits, float[] data, int frameSize)
      Transforms a stereo frame into a mono frame and stores intensity stereo info in 'bits'.
      Parameters:
      bits - - Speex bits buffer.
      data -
      frameSize -
    • decode

      public void decode(float[] data, int frameSize)
      Transforms a mono frame into a stereo frame using intensity stereo info.
      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.
    • init

      public void init(Bits bits)
      Callback handler for intensity stereo info
      Parameters:
      bits - - Speex bits buffer.