za.co.monadic.scopus

Encoder

class Encoder extends AnyRef

Wrapper around the Opus codec's encoder subsystem. The C interface is documented at http://www.opus-codec.org and should be considered definitive. The encoder accepts buffers of duration of 2,5, 5, 10, 20, 40 or 60ms. To calculate the buffer size, multiply your sample frequency by the frame duration. At 8kHz a 20ms packet is 160 samples long.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Encoder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Encoder(sampleFreq: SampleFrequency, channels: Int, app: Application, bufferSize: Int = 8192)

    sampleFreq

    The required sampling frequency

    channels

    The number of channels you intend to encode.

    app

    The application (Voip, Audio or LowDelay)

    bufferSize

    The reserved size of the buffer to which compressed data are written. The default should be more than sufficient

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def apply(audio: Array[Float]): Try[Array[Byte]]

    Encode a block of raw audio in float format using the configured encoder

    Encode a block of raw audio in float format using the configured encoder

    audio

    Audio data arranged as a contiguous block interleaved array of floats

    returns

    An array containing the compressed audio or the exception in case of a failure

  7. def apply(audio: Array[Short]): Try[Array[Byte]]

    Encode a block of raw audio in integer format using the configured encoder

    Encode a block of raw audio in integer format using the configured encoder

    audio

    Audio data arranged as a contiguous block interleaved array of short integers

    returns

    An array containing the compressed audio or the exception in case of a failure

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. var clean: Boolean

  10. def cleanup(): Unit

    Release all pointers allocated for the encoder.

    Release all pointers allocated for the encoder. Make every attempt to call this when you are done with the encoder as finalise() is what it is in the JVM

  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. val decodePtr: Array[Byte]

  13. val encoder: Long

  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  16. val error: Array[Int]

  17. def finalize(): Unit

    Definition Classes
    Encoder → AnyRef
  18. def getApplication: Int

  19. def getBandwidth: Int

  20. def getBitRate: Int

  21. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  22. def getComplexity: Int

  23. def getExpertFrameDuration: Int

  24. def getForceChannels: Int

  25. def getInbandFec: Int

  26. def getLookahead: Int

  27. def getLsbDepth: Int

  28. def getMaxBandwidth: Int

  29. def getPacketLossPerc: Int

  30. def getPredictionDisable: Int

  31. def getSampleRate: Int

  32. def getSignal: Int

  33. def getUseDtx: Int

  34. def getVbr: Int

  35. def getVbrConstraint: Int

  36. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  37. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  38. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  39. final def notify(): Unit

    Definition Classes
    AnyRef
  40. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  41. def reset: Int

  42. def setApplication(appl: Integer): Unit

  43. def setBandWidth(bandwidth: Integer): Unit

  44. def setBitRate(bitRate: Integer): Unit

  45. def setComplexity(complexity: Integer): Unit

  46. def setExpertFrameDuration(duration: Integer): Unit

  47. def setForceChannels(forceChannels: Integer): Unit

  48. def setInbandFec(useInbandFec: Integer): Unit

  49. def setLsbDepth(depth: Integer = 16): Unit

  50. def setMaxBandwidth(bandwidth: Integer): Unit

  51. def setPacketLossPerc(packetLossPerc: Integer): Unit

  52. def setPredictionDisable(disable: Integer): Unit

  53. def setSignal(signal: Integer): Unit

  54. def setUseDtx(useDtx: Integer): Unit

  55. def setVbr(useVbr: Integer): Unit

  56. def setVbrConstraint(cvbr: Integer): Unit

  57. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  58. def toString(): String

    Definition Classes
    AnyRef → Any
  59. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped