public void updateData(ByteBuffer data) {
        if (!data.isDirect()) {
            throw new IllegalArgumentException(
                    "Currently only direct buffers are allowed");
        }

        this.audioData = data;
        updateNeeded = true;
    }
Update the data in the buffer with new data.

@param data the audio data provided (not null, direct, alias created)
@throws IllegalArgumentException if the provided buffer is not a direct buffer
jme3-core/src/main/java/com/jme3/audio/AudioBuffer.java