projects
/
sonitus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make setting the “swapBytes” switch optional.
[sonitus.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sonitus
/
data
/
filter
/
LameMp3Decoder.java
diff --git
a/src/main/java/net/pterodactylus/sonitus/data/filter/LameMp3Decoder.java
b/src/main/java/net/pterodactylus/sonitus/data/filter/LameMp3Decoder.java
index
aae01fe
..
fb7bf94
100644
(file)
--- a/
src/main/java/net/pterodactylus/sonitus/data/filter/LameMp3Decoder.java
+++ b/
src/main/java/net/pterodactylus/sonitus/data/filter/LameMp3Decoder.java
@@
-32,20
+32,29
@@
public class LameMp3Decoder extends ExternalMp3Decoder {
private final String binary;
/** Whether to swap bytes in the decoded output. */
private final String binary;
/** Whether to swap bytes in the decoded output. */
- private
final
boolean swapBytes;
+ private boolean swapBytes;
/**
* Creates a new LAME MP3 decoder.
*
* @param binary
* The location of the binary
/**
* Creates a new LAME MP3 decoder.
*
* @param binary
* The location of the binary
+ */
+ public LameMp3Decoder(String binary) {
+ this.binary = binary;
+ }
+
+ /**
+ * Sets whether to swap bytes on the decoded output.
+ *
* @param swapBytes
* {@code true} to swap the decoded bytes, {@code false} to use platform
* endianness
* @param swapBytes
* {@code true} to swap the decoded bytes, {@code false} to use platform
* endianness
+ * @return This MP3 decoder
*/
*/
- public LameMp3Decoder(String binary, boolean swapBytes) {
- this.binary = binary;
+ public LameMp3Decoder swapBytes(boolean swapBytes) {
this.swapBytes = swapBytes;
this.swapBytes = swapBytes;
+ return this;
}
//
}
//