Examples of AudioBuffer


Examples of com.jme3.audio.AudioBuffer

        geom.setMaterial(getPlaceholderMaterial(assetManager));
        return geom;
    }
   
    public static AudioData getPlaceholderAudio(){
        AudioBuffer audioBuf = new AudioBuffer();
        audioBuf.setupFormat(1, 8, 44100);
        ByteBuffer bb = BufferUtils.createByteBuffer(1);
        bb.put((byte)0).flip();
        audioBuf.updateData(bb);
        return audioBuf;
    }
View Full Code Here

Examples of com.jme3.audio.AudioBuffer

        readStream = stream;
        if (readStream){
            audioStream = new AudioStream();
            audioData = audioStream;
        }else{
            audioBuffer = new AudioBuffer();
            audioData = audioBuffer;
        }

        while (true) {
            int type = in.readInt();
View Full Code Here

Examples of com.jme3.audio.AudioBuffer

        vorbisStream = new VorbisStream(loStream);
        streamHdr = vorbisStream.getIdentificationHeader();
//        commentHdr = vorbisStream.getCommentHeader();
   
        if (!readStream){
            AudioBuffer audioBuffer = new AudioBuffer();
            audioBuffer.setupFormat(streamHdr.getChannels(), 16, streamHdr.getSampleRate());
            audioBuffer.updateData(readToBuffer());
            return audioBuffer;
        }else{
            AudioStream audioStream = new AudioStream();
            audioStream.setupFormat(streamHdr.getChannels(), 16, streamHdr.getSampleRate());
           
View Full Code Here

Examples of toxi.audio.AudioBuffer

            System.out.println(d);
        }
        audioUtil.init(JOALUtil.SOFTWARE, false);
        SoundListener l = audioUtil.getListener();
        l.setGain(1);
        AudioBuffer b = audioUtil.loadBuffer("test/phone_ulaw.wav");
        int delay = b.getSampleSize() * 1000 / b.getFrequency();
        System.out.println(b + " length=" + delay);
        if (b.convertUlawToPCM(false)) {
            AudioSource src = audioUtil.generateSource();
            src.setBuffer(b);
            src.play();
        } else {
            System.out.println("couldn't convert buffer data");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.