1 | static void javaSound_closeClipOnStop(final Clip clip) {
|
2 | javaSound_closeClipOnStop(clip, null); |
3 | } |
4 | |
5 | static void javaSound_closeClipOnStop(final Clip clip, final Flag flag) {
|
6 | clip.addLineListener(new LineListener {
|
7 | public void update(LineEvent event) {
|
8 | if (event.getType() == LineEvent.Type.STOP) {
|
9 | print("javaSound closing clip");
|
10 | clip.close(); |
11 | if (flag != null) flag.raise(); |
12 | } |
13 | } |
14 | }); |
15 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1009656 |
| Snippet name: | javaSound_closeClipOnStop |
| Eternal ID of this version: | #1009656/4 |
| Text MD5: | 97096727f3cb4530fe412f5273615dfe |
| Author: | stefan |
| Category: | javax / audio |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-08-12 21:29:01 |
| Source code size: | 449 bytes / 15 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 710 / 747 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |