public void test()
            throws JavaLayerException {
        try {
            open(new AudioFormat(22050, 16, 1, true, false));
            short[] data = new short[22050 / 10];
            write(data, 0, data.length);
            flush();
            close();
        } catch (RuntimeException ex) {
            throw new JavaLayerException("Device test failed: " + ex);
        }

    }