Warning: session_start(): open(/var/lib/php/sessions/sess_cmca23l92rsn2nltbvbk4bn7c9, 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
svoid playAudioFromSampleMakingFunction(int bufSize, VF1 sampleMaker) {
new playAudioFromSampleMakingFunction_AudioLoop(bufsize, sampleMaker).start();
}
sclass playAudioFromSampleMakingFunction_AudioLoop extends Thread {
SourceDataLine out;
new Flag stopFlag;
byte[] buf;
VF1 sampleMaker;
*(int bufSize, VF1 *sampleMaker) {
out = javaSound_outputLine(javaSound_cdQuality(), bufSize);
buf = new byte[bufSize];
}
public void start { out.start°; super.start°; }
void stopPlaying { out.close°; stopFlag.raise°; } // "stop()" was taken
public void run° {
short[] pair = new short[2];
while (licensed() && !stopFlag.isUp()) {
for (int i = 0; i < l(buf); i += 4) {
nextSamples(pair);
buf[i] = (byte) pair[0];
buf[i+1] = (byte) (pair[0] >> 8);
buf[i+2] = (byte) pair[1];
buf[i+3] = (byte) (pair[1] >> 8);
}
//print("Writing " + l(buf) + " bytes");
int n = out.write(buf, 0, l(buf));
if (n != l(buf)) print("huh: " + n + " of " + l(buf));
}
}
}