Uses 521K of libraries. Click here for Pure Java version (17585L/110K).
1 | srecord DecodeOpusStream(S url) implements AutoCloseable {
|
2 | !include #1033023 // Resources |
3 | |
4 | InputStream in; |
5 | OpusMachine machine; |
6 | OpusMachineIterator sampleIterator; |
7 | int minBytesPreloaded; |
8 | |
9 | run {
|
10 | in = ownResource(httpInputStream(url)); |
11 | machine = ownResource(new OpusMachine(in)); |
12 | machine.minBytesPreloaded = max(machine.minBytesPreloaded, minBytesPreloaded); |
13 | sampleIterator = new OpusMachineIterator(machine); |
14 | } |
15 | |
16 | CloseableShortIterator get() {
|
17 | if (sampleIterator == null) run(); |
18 | ret sampleIterator; |
19 | } |
20 | |
21 | long samplesSeen() { ret machine == null ? 0 : machine.samplesSeen(); }
|
22 | } |
Began life as a copy of #1033021
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1033046 |
| Snippet name: | DecodeOpusStream |
| Eternal ID of this version: | #1033046/9 |
| Text MD5: | 56680b11c280aaa3e08f40ef1dcb36b9 |
| Transpilation MD5: | 90a56b60c0887e83b607de9be95a679c |
| Author: | stefan |
| Category: | javax / opus |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-10-11 18:26:10 |
| Source code size: | 645 bytes / 22 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 390 / 555 |
| Version history: | 8 change(s) |
| Referenced in: | [show references] |