Interface Mp3Encoder
public interface Mp3Encoder
You can obtain an instance of this class by calling
VoicechatApi.createMp3Encoder(AudioFormat, int, int, OutputStream).-
Method Summary
-
Method Details
-
encode
Encodes the given PCM samples and writes it to the provided output stream.- Parameters:
samples- the PCM samples to encode- Throws:
IOException- if an I/O error occurs
-
close
Closes the encoder and flushes the output stream. Also writes leftover mp3 data to the output stream. NOTE: Not closing encoders will cause a memory leak in voice chat versions<2.6.3!- Throws:
IOException- if an I/O error occurs
-