Package net.dv8tion.jda.api.audio
Class UserAudio
java.lang.Object
net.dv8tion.jda.api.audio.UserAudio
Represents a packet of User specific audio.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getAudioData
(double volume) Provides 20 Milliseconds of combined audio data in 48KHz 16bit stereo signed BigEndian PCM.getUser()
TheUser
that provided the audio data.
-
Constructor Details
-
UserAudio
-
-
Method Details
-
getUser
TheUser
that provided the audio data.- Returns:
- Never-null
User
object.
-
getAudioData
Provides 20 Milliseconds of combined audio data in 48KHz 16bit stereo signed BigEndian PCM.
Format defined by:AudioReceiveHandler.OUTPUT_FORMAT
.The output volume of the data can be modified by the provided
`volume`
parameter.`1.0`
is considered to be 100% volume.
Going above`1.0`
can increase the volume further, but you run the risk of audio distortion.- Parameters:
volume
- Value used to modify the "volume" of the returned audio data. 1.0 is normal volume.- Returns:
- Never-null byte array of PCM data defined by
AudioReceiveHandler.OUTPUT_FORMAT
-