Handle stateful audio effects when a bus channel becomes inactive
I maintainer di solito rispondono entro 1 giorno
@GeneralProtectionFault ci sta già lavorando.
Dal 5/11/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Summary
Investigate how the audio server handles stateful effects when a bus channel becomes inactive. Effect state can stop advancing during inactivity, so pending audio or stale state can affect later playback. This is a shared audio-server concern, not limited to the new noise gate.
Context
In servers/audio/audio_server.cpp, an unused channel becomes inactive after its output stays below the disable threshold for the configured time. The default audio/buses/channel_disable_time is 2 seconds. When a channel is inactive, the server skips an effect unless its instance returns true from process_silence().
AudioEffectInstance::process_silence() defaults to false. Inactive channel buffers are not cleared by the active-but-unused clearing path. Also, the send path skips inactive channels. Therefore, overriding process_silence() alone does not guarantee that an effect receives silence or that its output is delivered.
Existing-effect example: AudioEffectDelay
AudioEffectDelayInstance in servers/audio/effects/audio_effect_delay.cpp and .h does not override process_silence(). It advances its ring-buffer position and feedback state only when process() runs. If a channel becomes inactive before a delayed tap is due, its pending samples can remain in the delay buffer until later audio reactivates the channel.
Suggested reproduction to validate (derived from source inspection; not yet runtime-tested):
- Set
audio/buses/channel_disable_timeto0.05seconds and restart if needed. - Add
AudioEffectDelayto a bus. Set dry to1, enable tap 1 with a 1000 ms delay and 0 dB level, disable tap 2 and feedback. - Play a brief, distinct sound through that bus, then stop all input and wait several seconds.
- Play a different continuous sound through the same bus for at least two seconds.
The first sound's pending echo may not occur at the expected time and may instead appear during the second sound, because the delay buffer stopped advancing during inactivity.
Required work and acceptance criteria
- Define and implement safe inactive-channel behavior for stateful effects and their output. Consider effect tails, reactivation, and real-time audio constraints.
- Ensure effects that process silence receive actual silence rather than stale channel-buffer contents. Do not rely on
process_silence()alone. - Add regression coverage for a delay tap longer than the channel-disable time. Check both the idle period and subsequent reactivation.
- Cover stateful envelope/gain behavior on reactivation and check that existing silence-processing effects, such as capture and record, continue to work as intended.
Reported during review of PR https://github.com/Redot-Engine/redot-engine/pull/1582, comment https://github.com/Redot-Engine/redot-engine/pull/1582#discussion_r4484552108. Requested by @GeneralProtectionFault.
- Lingua principale
- C++
- Stelle
- 6.1k
- Fork
- 337
- Merge medio
- 5g 8h
- PR unite (30g)
- 13
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Redot-Engine/redot-engine
-
C#] [Export] does not support struct types (GD0102), inconsistent with GDScript struct supportApertaenhancement topic:dotnet usability
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Redot-Engine/redot-engine#1589 ·
I maintainer di solito rispondono entro 1 giorno
-
Trait is not being resolvedApertabug topic:gdscript
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
Redot-Engine/redot-engine#1588 ·
I maintainer di solito rispondono entro 1 giorno
-
bug usability
Difficoltà 3/5 1-2 giorni Idoneità per principianti 53/100
Redot-Engine/redot-engine#1583 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug confirmed topic:3d topic:rendering
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Redot-Engine/redot-engine#1568 ·
I maintainer di solito rispondono entro 1 giorno
-
bug enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 57/100
Redot-Engine/redot-engine#1559 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Redot-Engine/redot-engine
Issue simili
-
bug low priority preprocessor
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
-
Make the HTTP server's keep-alive and headers timeouts configurableForse già presa @mattgodbolt l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
compiler-explorer/compiler-explorer#9902 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Nixtla/statsforecast#1371 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno