Package de.maxhenkel.voicechat.api.mp3
Interface Mp3Encoder
public interface Mp3Encoder
You can obtain an instance of this class by calling
VoicechatApi.createMp3Encoder(javax.sound.sampled.AudioFormat, int, int, java.io.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!- Throws:
IOException
- if an I/O error occurs
-