JDA-NAS is an alternative to JDA's built-in audio packet sending system. It keeps a buffer of audio packets in native code and also sends them from there. This way it is unaffected by GC pauses shorter than the duration of the buffer ( 400ms by default) and gets rid of stuttering caused by those.
Replace x.y.z.m
with the latest version number
- Repository: https://jitpack.io
- Artifact: com.github.whya5448.lavaplayer-jda-nas:jda-nas:x.y.z.m
Using in Gradle:
repositories {
maven {
url 'https://jitpack.io'
}
}
dependencies {
implementation 'com.github.whya5448.lavaplayer-jda-nas:jda-nas:x.y.z.m'
}
Using in Maven:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.whya5448.lavaplayer-jda-nas:jda-nas</groupId>
<artifactId>jda-nas</artifactId>
<version>x.y.z.m</version>
</dependency>
Using it is as simple as just calling calling this on a JDABuilder:
.setAudioSendFactory(new NativeAudioSendFactory())
For example:
new JDABuilder(AccountType.BOT)
.setToken(System.getProperty("botToken"))
.setAudioSendFactory(new NativeAudioSendFactory())
.buildBlocking()
As it includes a native library, it is only supported on a specific set of platforms currently:
- Windows (x86 and x64)
- Linux (x86 and x64, glibc >= 2.15)