- There was a bug that could cause TS3J to stop firing certain events to all event listeners if the command execution codes were generated quickly, sequentially by those event listener threads. This is now fixed.

- There is now more detailed output for command futures when reconnecting: "client reconnecting" instead of "client disconnected"
 - The MusicPlayer example now returns exit code -1 when it is kicked/disconnected prematurely.
This commit is contained in:
Manevolent
2019-01-22 21:07:51 -05:00
parent 0fed4c68ce
commit 7c33cfa97a
3 changed files with 82 additions and 32 deletions
@@ -4,6 +4,9 @@ import com.github.manevolent.ffmpeg4j.*;
import com.github.manevolent.ffmpeg4j.filter.audio.FFmpegAudioResampleFilter;
import com.github.manevolent.ffmpeg4j.source.FFmpegAudioSourceSubstream;
import com.github.manevolent.ffmpeg4j.stream.source.FFmpegSourceStream;
import com.github.manevolent.ts3j.event.ClientUpdatedEvent;
import com.github.manevolent.ts3j.event.DisconnectedEvent;
import com.github.manevolent.ts3j.event.TS3Listener;
import com.github.manevolent.ts3j.identity.LocalIdentity;
import com.github.manevolent.ts3j.protocol.socket.client.LocalTeamspeakClientSocket;
import com.github.manevolent.ts3j.util.Ts3Debugging;
@@ -51,6 +54,13 @@ public class MusicPlayer {
client.setNickname(MusicPlayer.class.getSimpleName());
client.setHWID("TestTestTest");
client.addListener(new TS3Listener() {
@Override
public void onDisconnected(DisconnectedEvent e) {
System.exit(-1);
}
});
// Create a sink
TeamspeakFastMixerSink sink = new TeamspeakFastMixerSink(
AUDIO_FORMAT,