Duke4.net Forums: Slow, Crackling Audio playback - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Slow, Crackling Audio playback

User is offline   Chapy 

#1

On the latest revision of Eduke32 I'm running into audio playback problems where sounds and music play slowly and with a lot of crackling and garbage. Setting Eduke to 22khz can help mitigate the problem and sometimes it goes away like in the second example, but it's persistent. Eduke and the other source ports that use it's code like nBlood and VoidSW are having the same issue, but no other games or programs are.

Example 1
Example 2

Here's the log file

Quote

EDuke32 r9166-32096f6c6
Built Jul 16 2020 22:03:39, GCC 10.0.0, 64-bit
Using E:/Steam/steamapps/common/Duke Nukem 3D/gameroot/ for game data
Using E:/Steam/steamapps/common/Duke Nukem 3D/gameroot/addons/dc/ for game data
Using E:/Steam/steamapps/common/Duke Nukem 3D/gameroot/addons/nw/ for game data
Using E:/Steam/steamapps/common/Duke Nukem 3D/gameroot/addons/vacation/ for game data
Using C:/Games/Eduke32/ for game data
Running on Windows 10 (build 10.0.19041)
Initialized 1ms system timer
CPU: Intel® Core™ i5-8600K CPU @ 3.60GHz
Initializing SDL 2.0.13
Searching for game data...
Using "duke3d.grp" as main game data file.
Compiling: GAME.CON (151190 bytes)
Including: DEFS.CON (35992 bytes)
Including: USER.CON (45482 bytes)
USER.CON:844: warning: sound 261 already defined (hydro43.voc)
USER.CON:873: warning: sound 323 already defined (aisle402.voc)
GAME.CON: In actor `ORGANTIC':
GAME.CON:3967: warning: found `else' with no `if'
GAME.CON: In state `pigshootenemystate':
GAME.CON:5890: warning: found `else' with no `if'
Found 4 warning(s), 0 error(s).
Compiled 137472 bytes in 51ms
Initialized 96.0M cache
Sound hlminhal.voc(#23) not found!
Sound hlmexhal.voc(#24) not found!
Sound yes.voc(#45) not found!
Sound fan.voc(#77) not found!
Sound hover.voc(#80) not found!
Sound turrrm.voc(#145) not found!
Sound turrrg.voc(#146) not found!
Sound turrat.voc(#147) not found!
Sound b3atk01.voc(#152) not found!
Sound turrpn.voc(#161) not found!
Sound turrdy.voc(#162) not found!
Sound b3atk01.voc(#176) not found!
Sound vpiss2.voc(#182) not found!
Sound jacuzzi2.voc(#322) not found!
Sound joke.voc(#397) not found!
RTS file "DUKE.RTS" loaded
Initializing OSD...
Loaded game controller database
No game controllers found
Executing "settings.cfg"
Setting video mode 320x200 (0-bpp windowed)
Refresh rate: 144.00Hz
OpenGL information
NVIDIA Corporation GeForce GTX 1070 Ti/PCIe/SSE2 4.6.0 NVIDIA 451.67
Setting video mode 1920x1080 (32-bpp fullscreen)
Refresh rate: 144.00Hz
Opened "texturecache" as cache file
Initializing Polymer subsystem...
PR : Initialization complete in 98 ms.
Initializing sound: SDL WINMM driver on THX Spatial: 22.0 KHz stereo with 48 voices
Initializing MIDI driver: AdLib OPL3 emulation

Wrote eduke32.cfg
Wrote settings.cfg

0

#2

Can you check if this occurs in r9131?

https://dukeworld.du...9131-2db56a308/
0

User is offline   Chapy 

#3

View PostDoom64hunter, on 23 July 2020 - 09:10 AM, said:

Can you check if this occurs in r9131?

https://dukeworld.du...9131-2db56a308/

I'm having the same issue there. I don't know if maybe something got installed or changed on my end, but this didn't happen before. I also tried out the latest BuildGDX and it's working fine.
0

#4

View PostChapy, on 23 July 2020 - 09:13 AM, said:

I'm having the same issue there. I don't know if maybe something got installed or changed on my end, but this didn't happen before. I also tried out the latest BuildGDX and it's working fine.


Ok, I was thinking it could have been one of the commits directly after that version, but apparently not.

Could be that it has issues with the following driver:
SDL WINMM driver on THX Spatial


On my end I have:
SDL WASAPI driver on Optical


And I don't encounter these problems with it. If it's not too much work, could you try to roughly bisect with which revisions the problem started?
The synthesis website I linked above should have most of them.

This post has been edited by Doom64hunter: 23 July 2020 - 09:32 AM

0

User is offline   Chapy 

#5

View PostDoom64hunter, on 23 July 2020 - 09:31 AM, said:

Ok, I was thinking it could have been one of the commits directly after that version, but apparently not.

Could be that it has issues with the following driver:
SDL WINMM driver on THX Spatial


On my end I have:
SDL WASAPI driver on Optical


And I don't encounter these problems with it. If it's not too much work, could you try to roughly bisect with which revisions the problem started?
The synthesis website I linked above should have most of them.

THX Spatial is a 7.1 virtual surround sound system I'm using, but I have the same results on every sound device. I went through the releases and 20191019-8229 is the first version that has this problem for me. 20191019-8134 plays the audio fine.

This post has been edited by Chapy: 23 July 2020 - 10:55 AM

0

#6

It's unfortunate that the issue started in that range of commits. Can you try the following build (not on synthesis), this was just before a number of audiolib changes were made: Attached File  eduke32_r8213.zip (2.16MB)
Number of downloads: 288

Also, two more ideas:
  • What happens if you switch away from OPL3 emulation?
  • It sounds like the game is loading the Megaton Edition OGG files for music. If you have Megaton installed, try renaming the `music` folder so that it cannot autodetect them, and launch the game again. Does this resolve it?

0

User is offline   Chapy 

#7

View PostDoom64hunter, on 23 July 2020 - 12:30 PM, said:

It's unfortunate that the issue started in that range of commits. Can you try the following build (not on synthesis), this was just before a number of audiolib changes were made: Attachment eduke32_r8213.zip

Also, two more ideas:
  • What happens if you switch away from OPL3 emulation?
  • It sounds like the game is loading the Megaton Edition OGG files for music. If you have Megaton installed, try renaming the `music` folder so that it cannot autodetect them, and launch the game again. Does this resolve it?


Thank you, that exe is working. In the second video I try swapping audio devices. Sometimes it can clear up, but it's just as likely to hard crash the program.
EDIT: I also tried changing the music folder, but it was the same problem on the MIDI track

This post has been edited by Chapy: 23 July 2020 - 01:53 PM

0

User is offline   Chapy 

#8

If it helps I found this bug report for EasyRPG also using SDL2 that sounds similar to what I was experiencing. It seems that since the swap to WASAPI every other audio driver has playback issues. I've also experienced this issue in QuakeSpasm now.

This post has been edited by Chapy: 27 July 2020 - 04:49 PM

1

User is offline   Hendricks266 

  • Weaponized Autism

  #9

WASAPI is pretty notorious for issues like this so it makes sense. Try adjusting the SDL_AUDIODRIVER environment variable to one of the other options in a cmd.exe window and launch eduke32.exe from it.
0

User is offline   Chapy 

#10

View PostHendricks266, on 27 July 2020 - 04:52 PM, said:

WASAPI is pretty notorious for issues like this so it makes sense. Try adjusting the SDL_AUDIODRIVER environment variable to one of the other options in a cmd.exe window and launch eduke32.exe from it.

I didn't think to try that before. Forcing it to WASAPI makes the music fairly consistent, but I normally need to do something like change the number of voices to reset the sfx on menus and Duke's voice. Putting the sample rate above 22khz still messes up sfx, but the music actually plays clean as long as it's a MIDI and not external music.
0

User is offline   Chapy 

#11

Super late update, but I managed to solve the issues by reformatting my SSD and getting a fresh installation of Windows. It was probably just some broken driver, but if anyone else has this problem that was my solution. Worked in other SDL2 apps and programs as well.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options