-
public final class OggOpusEncoderJNI bridge to CodecOggOpus in the native opuscodec library.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classOggOpusEncoder.Companion
-
Constructor Summary
Constructors Constructor Description OggOpusEncoder()
-
Method Summary
Modifier and Type Method Description final Integerinit(String filePath, SampleRate sampleRate)Initializes the encoder, creating a file in filePath and setting sampleRate. final IntegersetBitrate(@IntRange(from = 500.toLong(), to = 512000.toLong()) Integer bitrate)Sets a custom bitrate for the encoder. final Integerencode(ShortArray shorts, Integer samplesPerChannel)Writes the shorts raw frame into the destination file, using samplesPerChannel. final Unitrelease()Releases and destroys the current encoder. -
-
Method Detail
-
init
final Integer init(String filePath, SampleRate sampleRate)
Initializes the encoder, creating a file in filePath and setting sampleRate.
-
setBitrate
final Integer setBitrate(@IntRange(from = 500.toLong(), to = 512000.toLong()) Integer bitrate)
Sets a custom bitrate for the encoder.
-
encode
final Integer encode(ShortArray shorts, Integer samplesPerChannel)
Writes the shorts raw frame into the destination file, using samplesPerChannel.
-
-
-
-