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: 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

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

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

    Definition Classes
    OpusEncoderCodec
  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. 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
  13. val decodePtr: Array[Byte]

  14. val encoder: Long

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

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

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

  18. final def finalize(): Unit

    Definition Classes
    Codec → AnyRef
  19. def getApplication: Int

  20. def getBandwidth: Int

  21. def getBitRate: Int

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

    Definition Classes
    AnyRef → Any
  23. def getComplexity: Int

  24. def getDetail: String

    returns

    A discription of this instance of an encoder or decoder

    Definition Classes
    OpusEncoderCodec
  25. def getExpertFrameDuration: Int

  26. def getForceChannels: Int

  27. def getInbandFec: Int

  28. def getLookahead: Int

  29. def getLsbDepth: Int

  30. def getMaxBandwidth: Int

  31. def getPacketLossPerc: Int

  32. def getPredictionDisable: Int

  33. def getSampleRate: Int

    returns

    The sample rate for this codec's instance

    Definition Classes
    OpusEncoderCodec
  34. def getSignal: Int

  35. def getUseDtx: Int

  36. def getVbr: Int

  37. def getVbrConstraint: Int

  38. def hashCode(): Int

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

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

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

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

    Definition Classes
    AnyRef
  43. def reset: Int

    Reset the underlying codec.

    Reset the underlying codec.

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

  45. def setBandWidth(bandwidth: Integer): Unit

  46. def setBitRate(bitRate: Integer): Unit

  47. def setComplexity(complexity: Integer): Unit

  48. def setExpertFrameDuration(duration: Integer): Unit

  49. def setForceChannels(forceChannels: Integer): Unit

  50. def setInbandFec(useInbandFec: Integer): Unit

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

  52. def setMaxBandwidth(bandwidth: Integer): Unit

  53. def setPacketLossPerc(packetLossPerc: Integer): Unit

  54. def setPredictionDisable(disable: Integer): Unit

  55. def setSignal(signal: Integer): Unit

  56. def setUseDtx(useDtx: Integer): Unit

  57. def setVbr(useVbr: Integer): Unit

  58. def setVbrConstraint(cvbr: Integer): Unit

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

    Definition Classes
    AnyRef
  60. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Encoder

Inherited from Codec

Inherited from AnyRef

Inherited from Any

Ungrouped