Warning: session_start(): open(/var/lib/php/sessions/sess_skdcg6and7tc5fnca0ndb2bsdv, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
sclass OpusMachine implements IF0_Int, AutoCloseable {
new ByteArraysPartialInputStream buffer;
new ArraysShortStream sampleStream;
OpusFromStream opusDecoder;
int channels = 1;
void init() ctex {
opusDecoder = new OpusFromStream(buffer, channels);
}
close {}
bool pullFromDecoder() ctex {
while ping (true) {
short[] samples;
if ((samples = opusDecoder.nextSamples()) != null)
ret true with sampleStream.add(samples);
if (!pullFromSource()) false; // end of stuff
// we got new material from source, decode again
}
}
bool pullFromSource() {
ret fillBuffer();
}
swappable bool fillBuffer() { false; }
// get next sample (pull mode)
public int get() {
int sample;
while ping ((sample = sampleStream.read()) == Int.MAX_VALUE) {
if (!pullFromDecoder())
ret Int.MAX_VALUE;
}
ret sample;
}
}