za.co.monadic.scopus.opus

OpusEncoder

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
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new OpusEncoder(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: Any): Boolean

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

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

    Definition Classes
    AnyRef → Any
  4. 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

    Definition Classes
    OpusEncoderEncoder
  5. 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

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

    Definition Classes
    Any
  7. var clean: Boolean

  8. 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

    Definition Classes
    OpusEncoderCodec
  9. def clone(): AnyRef

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

    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]

  12. val encoder: Long

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

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

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

  16. final def finalize(): Unit

    Definition Classes
    Codec → AnyRef
  17. def getApplication: Int

  18. def getBandwidth: Int

  19. def getBitRate: Int

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

    Definition Classes
    AnyRef → Any
  21. def getComplexity: Int

  22. def getDetail: String

    returns

    A discription of this instance of an encoder or decoder

    Definition Classes
    OpusEncoderCodec
  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

    returns

    The sample rate for this codec's instance

    Definition Classes
    OpusEncoderCodec
  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

    Reset the underlying codec.

    Reset the underlying codec.

    Definition Classes
    OpusEncoderCodec
  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 Encoder

Inherited from Codec

Inherited from AnyRef

Inherited from Any

Ungrouped