public OpusDecoder(int samples, int channels, IAudioDecoderCallback decoder_callback, OpusDecoderReturnType return_type = OpusDecoderReturnType.bytes) { this.samples = samples; this.channels = channels; frameSize = CodecTools.getPcmFrameByteSize(samples, 16, channels) * 20; decodedDataCallback = decoder_callback; returnType = return_type; }
public OpusEncoder(int samples, int bit_rate, int channels, OpusApplication application, IAudioEncoderCallback encoder_callback) { this.samples = samples; bitRate = bit_rate; this.channels = channels; opusApplication = application; frameSize = CodecTools.getPcmFrameByteSize(samples, 16, channels) * 20; encodedDataCallback = encoder_callback; }