Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions jme3-core/src/main/java/com/jme3/audio/openal/ALAudioRenderer.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2021 jMonkeyEngine
* Copyright (c) 2009-2022 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -503,18 +503,18 @@ public void updateSourceParam(AudioSource src, AudioParam param) {
if (!supportEfx) {
return;
}

if (src.getDryFilter() != null) {
Filter f = src.getDryFilter();
if (f.isUpdateNeeded()) {
updateFilter(f);

// NOTE: must re-attach filter for changes to apply.
al.alSourcei(id, EFX.AL_DIRECT_FILTER, f.getId());
}
Filter dryFilter = src.getDryFilter();
int filterId;
if (dryFilter == null) {
filterId = EFX.AL_FILTER_NULL;
} else {
al.alSourcei(id, EFX.AL_DIRECT_FILTER, EFX.AL_FILTER_NULL);
if (dryFilter.isUpdateNeeded()) {
updateFilter(dryFilter);
}
filterId = dryFilter.getId();
}
// NOTE: must re-attach filter for changes to apply.
al.alSourcei(id, EFX.AL_DIRECT_FILTER, filterId);
break;
case Looping:
if (src.isLooping() && !(src.getAudioData() instanceof AudioStream)) {
Expand Down