/**
* @test
* @bug 6938426
* @summary Tests that Alaw encoder works properly in multithreaded environment
* @author Alex Menkov
*/
public class AlawEncoderSync {
static byte[] pcmBuffer;
for (int i=0; i<THREAD_COUNT; i++) {
threads[i] = new ConversionThread(i);
}
for (int i=1; i<THREAD_COUNT; i++) {
try {
} catch (InterruptedException ex) {
log("Main thread was interrupted, exiting.");
return;
}
}
int failed = 0;
log("comparing result arrays...");
for (int i=1; i<THREAD_COUNT; i++) {
failed++;
log("NOT equals: 0 and " + i);
}
}
if (failed > 0) {
throw new RuntimeException("test FAILED");
}
log("test PASSED.");
}
static void preparePCMBuffer() {
}
}
}
public final int num;
}
public void run() {
try {
int read = 0;
byte[] data = new byte[4096];
}
alawStream.close();
}
}
}
}
}
}