Package aspect.audio

Examples of aspect.audio.AudioClip


        try {
            WaveData data = WaveData.create(new BufferedInputStream(new FileInputStream("sound/test.wav")));
            if (data == null) {
                throw new LWJGLException("data == null");
            }
            sound = new SoundPlayer(new AudioClip(data));
        } catch (LWJGLException | FileNotFoundException ex) {
            Logger.getLogger(SoundDemo.class.getName()).log(Level.SEVERE, null, ex);
        }
        addKeyListener(this);
    }
View Full Code Here


    }

    public static AudioClip loadSound3D(InputStream source) {
        try {
            WaveData data = WaveData.create(new BufferedInputStream(source));
            AudioClip clip = new AudioClip(data);
            return clip;
        } catch (LWJGLException ex) {
            Logger.getLogger(Resources.class.getName()).log(Level.SEVERE, "Sound could not be loaded: ", ex);
            return null;
        }
View Full Code Here

    public static AudioClip loadSound3D(String name, File source) {
        if (AUDIO_3D.containsKey(name)) {
            return AUDIO_3D.get(name);
        }

        AudioClip clip = loadSound3D(source);
        addSound3D(name, clip);
        return clip;
    }
View Full Code Here

    public static AudioClip loadSound3D(String name, InputStream source) {
        if (AUDIO_3D.containsKey(name)) {
            return AUDIO_3D.get(name);
        }

        AudioClip clip = loadSound3D(source);
        addSound3D(name, clip);
        return clip;
    }
View Full Code Here

TOP

Related Classes of aspect.audio.AudioClip

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.