1 | sclass JDA_AudioPlayerSendHandler implements AudioSendHandler { |
2 | AudioPlayer audioPlayer; |
3 | AudioFrame lastFrame; |
4 | |
5 | *(AudioPlayer *audioPlayer) {} |
6 | |
7 | public bool canProvide() { |
8 | ret (lastFrame = audioPlayer.provide()) != null; |
9 | } |
10 | |
11 | public byte[] provide20MsAudio() { |
12 | return lastFrame.getData(); |
13 | } |
14 | |
15 | public bool isOpus() { true; } |
16 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1025340 |
Snippet name: | JDA_AudioPlayerSendHandler - helper class for JDA+LavaPlayer |
Eternal ID of this version: | #1025340/1 |
Text MD5: | e7ef8fbdc933eb3978a40775036453b9 |
Author: | stefan |
Category: | javax / discord |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-09-24 00:12:52 |
Source code size: | 360 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 317 / 656 |
Referenced in: | [show references] |