private void destroyOpenAL() {
        if (audioDisabled) {
            return; // Nothing to destroy if context wasn't created
        }

        // Stops channels and detaches buffers/filters
        for (int i = 0; i < channelSources.length; i++) {
            if (channelSources[i] != null) {
                clearChannel(i);
            }
        }

        // delete channel-based sources
        ib.clear();
        ib.put(channels);
        ib.flip();
        al.alDeleteSources(channels.length, ib);

        // Delete audio buffers and filters managed by NativeObjectManager
        objManager.deleteAllObjects(this);

        // Delete EFX objects if they were created
        if (supportEfx) {
            if (reverbFx != -1) {
                ib.clear().limit(1);
                ib.put(0, reverbFx);
                efx.alDeleteEffects(1, ib);
                reverbFx = -1;
            }

            if (reverbFxSlot != -1) {
                ib.clear().limit(1);
                ib.put(0, reverbFxSlot);
                efx.alDeleteAuxiliaryEffectSlots(1, ib);
                reverbFxSlot = -1;
            }
        }

        channels = null; // Force re-enumeration
        channelSources = null;
        freeChannels.clear();
        nextChannelIndex = 0;

        alc.destroyALC();
        logger.info("OpenAL context destroyed.");
    }
Destroys the OpenAL context, deleting sources, buffers, filters, and effects.
jme3-core/src/main/java/com/jme3/audio/openal/ALAudioRenderer.java