private int newChannel() {
        if (!freeChannels.isEmpty()) {
            return freeChannels.removeFirst();
        } else if (nextChannelIndex < channels.length) {
            return nextChannelIndex++;
        } else {
            return -1;
        }
    }
Applies all parameters from the listener object to OpenAL.
@param listener The listener object.
jme3-core/src/main/java/com/jme3/audio/openal/ALAudioRenderer.java