Skip to content

Commit 1d72868

Browse files
committed
cleanup code
1 parent 1217ca8 commit 1d72868

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

opus-jni-java/src/main/java/net/labymod/opus/OpusCodec.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ public byte[] encodeFrame(byte[] bytes) {
8888
* throws {@link IllegalArgumentException} if length is invalid
8989
*/
9090
public byte[] encodeFrame(byte[] bytes, int offset, int length) {
91-
if (length != getChannels() * getFrameSize() * 2)
92-
throw new IllegalArgumentException(String.format("data length must be == CHANNELS * FRAMESIZE * 2 (%d bytes) but is %d bytes", getChannels() * getFrameSize() * 2, bytes.length));
91+
if (length != this.getChannels() * this.getFrameSize() * 2)
92+
throw new IllegalArgumentException(String.format("data length must be == CHANNELS * FRAMESIZE * 2 (%d bytes) but is %d bytes", this.getChannels() * this.getFrameSize() * 2, bytes.length));
9393
this.ensureEncoderExistence();
9494
return this.encodeFrame(this.encoderState, bytes, offset, length);
9595
}
@@ -217,7 +217,7 @@ public Builder withMaxPacketSize(int maxPacketSize) {
217217
}
218218

219219
public OpusCodec build() {
220-
return new OpusCodec(OpusCodecOptions.of(frameSize, sampleRate, channels, bitrate, maxFrameSize, maxPacketSize));
220+
return new OpusCodec(OpusCodecOptions.of(this.frameSize, this.sampleRate, this.channels, this.bitrate, this.maxFrameSize, this.maxPacketSize));
221221
}
222222
}
223223

opus-jni-java/src/main/java/net/labymod/opus/OpusCodecOptions.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,27 @@ private OpusCodecOptions(int frameSize, int sampleRate, int channels, int bitrat
2828
}
2929

3030
public int getFrameSize() {
31-
return frameSize;
31+
return this.frameSize;
3232
}
3333

3434
public int getSampleRate() {
35-
return sampleRate;
35+
return this.sampleRate;
3636
}
3737

3838
public int getChannels() {
39-
return channels;
39+
return this.channels;
4040
}
4141

4242
public int getBitrate() {
43-
return bitrate;
43+
return this.bitrate;
4444
}
4545

4646
public int getMaxFrameSize() {
47-
return maxFrameSize;
47+
return this.maxFrameSize;
4848
}
4949

5050
public int getMaxPacketSize() {
51-
return maxPacketSize;
51+
return this.maxPacketSize;
5252
}
5353

5454
protected static OpusCodecOptions of(int frameSize, int sampleRate, int channels, int bitrate, int maxFrameSize, int maxPacketSize) {

0 commit comments

Comments
 (0)