public void initialize(InputStream stream) {
        try {
            ais = AudioSystem.getAudioInputStream(stream);
            format = ais.getFormat();
            if (format.getChannels() == 1) {
                if (format.getSampleSizeInBits() == 8) {
                    chanelFormat = EnumChanelFormat.MONO_CHANEL_8BITS;
                } else if (format.getSampleSizeInBits() == 16) {
                    chanelFormat = EnumChanelFormat.MONO_CHANEL_16BITS;
                }
            } else if (format.getChannels() == 2) {
                if (format.getSampleSizeInBits() == 8) {
                    chanelFormat = EnumChanelFormat.STEREO_CHANEL_8BITS;
                } else if (format.getSampleSizeInBits() == 16) {
                    chanelFormat = EnumChanelFormat.STEREO_CHANEL_16BITS;
                }
            }
        } catch (UnsupportedAudioFileException e) {
            GameApplication.engineLogger.severe("Audio file is unsupported");
        } catch (IOException e) {
            GameApplication.engineLogger.severe("IO exception occured while initializing WAVE decoder");
        }
    }