-
-
Notifications
You must be signed in to change notification settings - Fork 734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Externalize opus binaries #659
Conversation
@DV8FromTheWorld Could you give some comments on this? |
Moved back to 1.0.0
You could also allow people to use the opus distributions that come with their systems (eg. |
The path should be provided to OpusLibrary.loadFrom(String) before using the audio system. The method will return true if the provided path could be loaded as a library and false if it cannot or the system was already initialized.
public static synchronized boolean loadFrom(String absolutePath) | ||
{ | ||
if (initialized) | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this return audioSupported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ensureOpus()
returns audioSupported
because it is used by JDA to check whether the library is available or not. loadFrom()
returns true if the library is loaded from that method invokation and false if not (it was already loaded).
if (AudioNatives.loadFrom("/lib/.../libopus.so")) {
log.info("Loaded custom library at /lib/.../libopus.so");
} else {
log.info("Opus binaries were already loaded, skipping.");
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Good work.
Cleanup javadoc exclude path
Updated README to suggest excluding opus-java by default, the transitive JNA dependency makes a difference here
Pull Request Etiquette
There are several guidelines you should follow in order for your
Pull Request to be merged.
Description
This should make the artifact easier to exclude and allows for a much smaller dependency.
Additionally we could offer audio support without the opus binaries (like lavaplayer which already does the opus encoding).
PS:
We have to also publish the opus artifact to jcenter.https://bintray.com/minndevelopment/maven/opus-java