private void updateAudioStream(AudioStream as) {
        // Delete old buffers if they exist (e.g., re-initializing stream)
        if (as.getIds() != null) {
            deleteAudioData(as);
        }

        int[] ids = new int[STREAMING_BUFFER_COUNT];
        ib.clear().limit(STREAMING_BUFFER_COUNT);

        al.alGenBuffers(STREAMING_BUFFER_COUNT, ib);

        ib.rewind();
        ib.get(ids);

        // Streams are managed directly, not via NativeObjectManager,
        // because their lifecycle is tied to active playback.
        as.setIds(ids);
        as.clearUpdateNeeded();
    }
Prepares OpenAL buffers for an AudioStream. Generates buffer IDs.
Does not fill buffers with data yet.
@param as The AudioStream.
jme3-core/src/main/java/com/jme3/audio/openal/ALAudioRenderer.java