by Chris » Sun Jul 09, 2017 3:56 pm
Graf Zahl wrote:This is something Chris will have to comment on. Can EFX really have such a performance impact?
It shouldn't, no. Menu sounds don't use EFX, and even if they did, you'd have more sounds playing in normal gameplay than menus. And even then, the cost of EFX is mostly fixed (ZDoom just uses one global reverb effect, which only needs to be processed once per audio update regardless of the number of sound sources).
deathwingduck wrote: I did notice a dip in gameplay FPS, which is normally 200 FPS, to around 16 FPS for about a second when I discovered a secret. However turning off EFX seemed to fix this whole issue I was having.
Did you make sure to restart sound after toggling it? Toggling EFX won't have any effect until the sound subsystem is restarted.
Such a delay when discovering a secret would be caused by having to load the sound from slow media (uncached disk read, for example, or an anti-virus checking all disk accesses), but once it's loaded it stays loaded and shouldn't incur such a delay again. So if you have EFX on, got a stutter with the first secret sound, switched EFX off without restarting the sound subsystem, then got no stutter with another secret, that would be because it didn't have to load the sound that second time. Though even if you do restart the sound subsystem or GZDoom as a whole, the OS may have cached the on-disk data into RAM, so when it does load again it will be faster. To better test for that, you'd need to quit GZDoom, run some other memory intensive programs for a while to flush those disk buffers from RAM, then run GZDoom again.
I wonder how easy it would be to log how long it takes to decode sounds from disk.
[quote="Graf Zahl"]This is something Chris will have to comment on. Can EFX really have such a performance impact?[/quote]
It shouldn't, no. Menu sounds don't use EFX, and even if they did, you'd have more sounds playing in normal gameplay than menus. And even then, the cost of EFX is mostly fixed (ZDoom just uses one global reverb effect, which only needs to be processed once per audio update regardless of the number of sound sources).
[quote="deathwingduck"] I did notice a dip in gameplay FPS, which is normally 200 FPS, to around 16 FPS for about a second when I discovered a secret. However turning off EFX seemed to fix this whole issue I was having.[/quote]
Did you make sure to restart sound after toggling it? Toggling EFX won't have any effect until the sound subsystem is restarted.
Such a delay when discovering a secret would be caused by having to load the sound from slow media (uncached disk read, for example, or an anti-virus checking all disk accesses), but once it's loaded it stays loaded and shouldn't incur such a delay again. So if you have EFX on, got a stutter with the first secret sound, switched EFX off without restarting the sound subsystem, then got no stutter with another secret, that would be because it didn't have to load the sound that second time. Though even if you do restart the sound subsystem or GZDoom as a whole, the OS may have cached the on-disk data into RAM, so when it does load again it will be faster. To better test for that, you'd need to quit GZDoom, run some other memory intensive programs for a while to flush those disk buffers from RAM, then run GZDoom again.
I wonder how easy it would be to log how long it takes to decode sounds from disk.