Package discord4j.voice
Class AudioReceiver
java.lang.Object
discord4j.voice.AudioReceiver
Deprecated.
Discord does not officially support bots receiving audio. It is not guaranteed that this functionality
works properly. Use at your own risk.
Used to receive audio.
The receiver uses a shared buffer. Keep this in mind when implementing.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Deprecated.static final AudioReceiver
Deprecated. -
Constructor Summary
-
Method Summary
-
Field Details
-
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZEDeprecated.- See Also:
-
NO_OP
Deprecated.
-
-
Constructor Details
-
AudioReceiver
public AudioReceiver()Deprecated. -
AudioReceiver
Deprecated.
-
-
Method Details
-
getBuffer
Deprecated. -
receive
public void receive()Deprecated.Called when audio is received. After reading, the implementor is expected to clear the buffer. -
receive
public abstract void receive(char sequence, int timestamp, int ssrc, byte[] audio) Deprecated.Called when audio is received, automatically extracting useful information.- Parameters:
sequence
- The sequence of the packet.timestamp
- The timestamp of the packet.ssrc
- The ssrc of the audio source.audio
- The Opus-encoded audio.
-