Class/Object

za.co.monadic.scopus.opus

OpusEncoder

Related Docs: object OpusEncoder | package opus

Permalink

class OpusEncoder extends Encoder

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
Encoder, Codec, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OpusEncoder
  2. Encoder
  3. Codec
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

    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: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply(audio: Array[Float]): Try[Array[Byte]]

    Permalink

    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

    Definition Classes
    OpusEncoderEncoder
  5. def apply(audio: Array[Short]): Try[Array[Byte]]

    Permalink

    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

    Definition Classes
    OpusEncoderEncoder
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. var clean: Boolean

    Permalink
  8. def cleanup(): Unit

    Permalink

    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

    Definition Classes
    OpusEncoderCodec
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def complexity(c: Int): Encoder

    Permalink

    Set the complexity of the encoder.

    Set the complexity of the encoder. This has no effect if the encoder does not support complexity settings

    c

    A value between 0 and 10 indicating the encoder complexity.

    returns

    A reference to the updated encoder

    Definition Classes
    OpusEncoderEncoder
  11. val decodePtr: Array[Byte]

    Permalink
  12. val encoder: Long

    Permalink
  13. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
  16. final def finalize(): Unit

    Permalink
    Definition Classes
    Codec → AnyRef
  17. def getApplication: Int

    Permalink
  18. def getBandwidth: Int

    Permalink
  19. def getBitRate: Int

    Permalink
  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def getComplexity: Int

    Permalink
  22. def getDetail: String

    Permalink

    returns

    A discription of this instance of an encoder or decoder

    Definition Classes
    OpusEncoderCodec
  23. def getExpertFrameDuration: Int

    Permalink
  24. def getForceChannels: Int

    Permalink
  25. def getInbandFec: Int

    Permalink
  26. def getLookahead: Int

    Permalink
  27. def getLsbDepth: Int

    Permalink
  28. def getMaxBandwidth: Int

    Permalink
  29. def getPacketLossPerc: Int

    Permalink
  30. def getPredictionDisable: Int

    Permalink
  31. def getSampleRate: Int

    Permalink

    returns

    The sample rate for this codec's instance

    Definition Classes
    OpusEncoderCodec
  32. def getSignal: Int

    Permalink
  33. def getUseDtx: Int

    Permalink
  34. def getVbr: Int

    Permalink
  35. def getVbrConstraint: Int

    Permalink
  36. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  37. def isDTX(audio: Array[Byte]): Boolean

    Permalink

    Test if the packet is an Opus DTX (silent) packet

    Test if the packet is an Opus DTX (silent) packet

    audio

    Opus compressed packet

    returns

    True if it is a DTX packet

    Definition Classes
    OpusEncoderCodec
  38. final def isInstanceOf[T0]: Boolean

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

    Permalink
    Definition Classes
    AnyRef
  40. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  41. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  42. def reset: Int

    Permalink

    Reset the underlying codec.

    Reset the underlying codec.

    Definition Classes
    OpusEncoderCodec
  43. def setApplication(appl: Integer): Unit

    Permalink
  44. def setBandWidth(bandwidth: Integer): Unit

    Permalink
  45. def setBitRate(bitRate: Integer): Unit

    Permalink
  46. def setComplexity(complexity: Integer): Unit

    Permalink
  47. def setExpertFrameDuration(duration: Integer): Unit

    Permalink
  48. def setForceChannels(forceChannels: Integer): Unit

    Permalink
  49. def setInbandFec(useInbandFec: Integer): Unit

    Permalink
  50. def setLsbDepth(depth: Integer = 16): Unit

    Permalink
  51. def setMaxBandwidth(bandwidth: Integer): Unit

    Permalink
  52. def setPacketLossPerc(packetLossPerc: Integer): Unit

    Permalink
  53. def setPredictionDisable(disable: Integer): Unit

    Permalink
  54. def setSignal(signal: Integer): Unit

    Permalink
  55. def setUseDtx(useDtx: Integer): Unit

    Permalink
  56. def setVbr(useVbr: Integer): Unit

    Permalink
  57. def setVbrConstraint(cvbr: Integer): Unit

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

    Permalink
    Definition Classes
    AnyRef
  59. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Encoder

Inherited from Codec

Inherited from AnyRef

Inherited from Any

Ungrouped