Class OpusSound.Builder
java.lang.Object
io.github.kosmx.emotes.common.opus.OpusSound.Builder
- Enclosing class:
OpusSound
Lays packets back to back as they come, in the array the sound then keeps, so an encoder can write
each one straight into it.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
reserve
public byte[] reserve(int size) - Returns:
- the array a packet of up to
sizebytes is written into, fromlength()on
-
length
public int length()- Returns:
- where the next packet starts
-
commit
Takes thesizebytes written atlength()as the next packet.- Throws:
OpusFormatException
-
build
public OpusSound build(int preSkip, int endTrim, int outputGain, @Nullable @Nullable Integer trackGain, @Nullable @Nullable Integer loopStart, List<String> comments) throws OpusFormatException - Throws:
OpusFormatException
-