private boolean playSound(File file) {
            boolean ret = false;

            AudioInputStream in = null;
            try {
                in = AudioSystem.getAudioInputStream(file);
            } catch (Exception e) {
                logger.log(Level.WARNING, "No audio input stream for: "
                    + file.getName(), e);
            }

            AudioInputStream din = null;
            AudioFormat decodedFormat = null;
            if (in != null) {
                AudioFormat baseFormat = in.getFormat();
                decodedFormat = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED,
                    baseFormat.getSampleRate(),
                    16,
                    baseFormat.getChannels(),
                    baseFormat.getChannels() * (16 / 8),
                    baseFormat.getSampleRate(),
                    baseFormat.isBigEndian());
                din = AudioSystem.getAudioInputStream(decodedFormat, in);
                if (din == null) {
                    logger.warning("Can not get decoded audio stream for: "
                        + file.getName());
                }
            }

            SourceDataLine line = null;
            if (din != null) {
                line = openLine(din.getFormat());
            }

            if (line != null) {
                try { 
                    startPlaying();
                    rawPlay(din, line);
                    ret = true;
                } catch (IOException e) {
                    logger.log(Level.WARNING, "Error playing: "
                        + file.getName(), e);
                } finally {
                    stopPlaying();
                    line.drain();
                    line.stop();
                    line.close();
                    try {
                        din.close();
                        in.close();
                    } catch (IOException e) {}
                }
            } 

            return ret;
        }