-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Music + Weird Sound Pitching since 5.6 #454
Comments
Check your soundcard sample rate and snd_samplerate in crispy-doom.cfg, what are the values? |
Please check if one of the measures outlined here helps: |
NOTE: @Zodomaniac @fabiangreffrath I noticed that in Chocolate Doom "SDL2.DLL" is v2.0.5.0 and "SDL2_mixer.dll" is 2.0.1.0 Hope this extra information i gained from testing a little bit ago helps. |
Yes, it shows that this is solely an SDL issue and nothing that could be fixed in the source port. To be extra sure, could you please download a Choco daily build and see if you experience the same issues? |
@fabiangreffrath |
@fabiangreffrath , btw, what is |
It's described in the source:
https://github.com/chocolate-doom/chocolate-doom/blob/master/src/i_sdlsound.c#L82 |
Closing as this is an SDL issue. Updated the Wiki with some more hints, hope that helps. |
adjusting "libsamplerate_scale" from "0.99" all the way down to "0.01" does not stop the sounds from cutting out before they finish playing. will post this problem over at bugzilla.libsdl.org |
You could use the SDL libraries from previous Crispy or Choco releases. That's usually not a problem, I have heard of a lot of users who do this to mitigate problems with newer SDL versions. |
StasBFG discovered that this issue is actually caused by 5.1 speaker configuration that the current SDL2 version doesn't handle correctly but the SDL2 v2.0.5/SDL2_mixer v2.0.1 from Crispy 5.1 did. |
@Zodomaniac @fabiangreffrath |
@drivetheory @fabiangreffrath I have come up with the solution to this problem which gives fluidsynth support as a bonus. |
I have added the 5.1 surround -> 2.0 stereo idea to the FAQ in the wiki. |
changing my speaker layout to stereo only introduces different problems in 5.6 and newer, music only comes from the right speaker as well as this creates a warbling effect on the sound effects and the music. |
@drivetheory have you tried my DLL pack? |
@Zodomaniac just tried your DLL fix pack in v5.6.1 and all sound effects and music play correctly with my speaker setup as 5.1, 24-bit, 96KHz. |
@Altazimuth could you please share your experience on resolving this in Eternity Engine after transition to SDL 2.0.10? |
Ultimately a large amount of EE's issues w/ SDL2 sound after 2.0.7 (I believe that was the version at least) was to do with audio drivers and playback formats. Ultimately I plonked the following in #if (EE_CURRENT_PLATFORM == EE_PLATFORM_WINDOWS)
if(I_IsWindowsVistaOrHigher())
SDL_setenv("SDL_AUDIODRIVER", "wasapi", true);
else
SDL_setenv("SDL_AUDIODRIVER", "winmm", true);
#endif and then made it so there were two audio players: one for 16-bit signed integer audio, and one for single precision floating-point audio. You cannot assume that SDL_mixer will actually use the format you want to at this point, so Eternity now uses regular SDL to query this stuff before starting mixer up proper. Ultimately it'd be nice to eliminate support for 16-bit signed int audio but it stands for the moment. Important to note: Before WASAPI the string was "directsound" if memory serves. WASAPI only supports float audio and was made the default in 2.0.7, so you have to manually set the Windows driver to be DirectSound otherwise everything ends up all wonky. |
@Altazimuth thanks a lot! Players are requesting the sound fix for 5.1 in Crispy Doom on Doomworld forums and recalling your solution, that's why I decided to invite you to the thread here. |
Ah, no problem. My code should make an OK basis but does use a fair bit of C++isms, so will probably need a bit of expanding out to be less metaprogrammingy. |
I made a small discovery regarding this issue. I'm on Windows 10 Pro x64, and I use a pair of 7.1 headphones. Obviously I was experiencing the issue in Chocolate Doom, Crispy Doom, Doom Retro and even with the port fabiangreffrath made recently called Woof. What made the issue go away in all of the aforementioned ports for me, was to enable Windows Sonic. In order to do that, simply right click the speaker icon in your taskbar, select spatial sound and enable Windows Sonic. Alternatively, you can do it by going to Control Panel > Hardware and Sound > Sound > Right clicking your preferred sound device > Properties > Spatial Sound and selecting Windows Sonic. I still had to use the Old DLL pack provided by Zodomaniac for Crispy and Choco, however. Despite the sound now working correctly, I noticed that music from music packs would stutter at the start of tracks and during a loop. This is a different issue altogether and it has been reported in Chocolate Doom's issues here. Another oddity I noticed is that Crispy Doom's SFX sound seem quieter than Chocolate Doom after having enabled Windows Sonic, but nothing that presents any serious issues. I just had to crank up the volume in-game. Anyway, hope this proves useful in any way. |
Is this still an issue with the 5.8.0 release? |
The issue is still present for me in 5.8.0 if I disable Windows Sonic for Headphones while using my 7.1 Headphones. Enabling Windows Sonic or switching to my stereo speakers fixes the issue. |
Thanks for the feedback. Given how fragile this is on Windows, I have now idea how I could mitigate the issue from the source port's side. |
am now outta work and at home to test 5.8.0. just a heads up though, "crispy-doom-setup.exe" gets quarantined by Microsoft Security Essentials as "Program:Win32/Unwaders.A!ml". will post back the rest of my results shortly |
My sincerest apologies for my lack of thoroughness previously, during testing this time around i discovered i had an old install of kode54's BASSMIDI installed... from YEARS ago... that i completely forgot was even installed... which lead to the previous testing results. this time around such software has been uninstalled. I'm sorry. This weekend I did much more extensive testing than previously. I re-downloaded every single version of Crispy Doom available in github that doesn't need to be compiled, v5.4 to 5.8. Chocolate Doom 3.0.0 sounds correct using OPL, provided that the in-game volume sliders are not touched. The problem exists whether i am using my PCIe Sound Blaster X-Fi card (5.1, 24-bit, 96KHz), my motherboard's Realtek HD audio chip (stereo, 24-bit, 48KHz), or the headphone port of my Blue Yeti USB microphone (stereo, 16-bit, 44.1Khz) so it is not explicitly related to a 5.1 speaker setup as previously suspected. Please forgive me for my inability to properly articulate what i am hearing except that it's almost as if the sounds and music are distorted, or are playing too slowly, or at the wrong sample rate, or something... i did notice a very strange behavior that happened only once while testing that i could not reproduce, crispy sounded distorted, i closed crispy and ran chocolate and then chocolate sounded distorted. so i closed chocolate and reopened chocolate and it was still distorted. so i closed chocolate again, opened chocolate setup and ESC'd out of chocolate setup and then launched chocolate one more time and chocolate was back to sounding correct again... i hope this makes more sense to you than it does to me. chocolate is in it's own folder, crispy is in it's own folder. also, while testing i did notice something- that crispy doesn't seem to properly reproduce the L & R stereo music channels, the right side is significantly dominant & may have the left side mixed into it, and even more so the music channels seem reversed. this is not shown in the recording but while testing chocolate doom on E1M1 the music very clearly starts in the left speaker and then new music sounds begin in the right speaker doing to whole "look! stereo!" bit. however this is not the case when using crispy doom, all the music starts from the right speaker and remains very prominently there and is much more faintly heard from the left speaker. |
Hi @drivetheory , thank you very much for your detailed analysis! However, I am sorry to tell you that comparisons with Choco 3.0 do not really lead any further, since it has been released some 2.5 years ago and the SDL libraries bundled with it are several releases behind. For example, the default sound backend on Windows has been replaced in the meantime. Would you mind carrying out the comparison with a daily Choco snapshot again? I am sure the differences will more or less vanish. Thanks! |
no problem @fabiangreffrath , sorry for not doing that to begin with I'll download the latest daily build at http://latest.chocolate-doom.org/ and repeat the process. |
so @fabiangreffrath , I've actually made 2 discoveries that you might find interesting/amusing/useful. I downloaded both daily build for choco & crispy, you were correct, 99% identical problems exist in both. at this point I downloaded versions 2.0.5 and newer of "SDL2.dll" & versions 2.0.1 and newer of "SDL2_mixer.dll" from www.libsdl.org and spent the past few hours this morning testing since it's a bit of a slow day for me. discovery PT1 simply dropping in "SDL2_mixer.dll" v2.0.1 to either choco or crispy, (not touching the other DLL files) completely solves the problems i am experiencing. the problems i am experiencing were created by changes made between "SDL2_mixer.dll" v2.0.1 and v2.0.2, most notably of which was "Updated for SDL 2.0.6 and newer" (https://www.libsdl.org/projects/SDL_mixer/), and lots of changes exist in SDL v2.0.6 (https://www.libsdl.org/tmp/SDL/WhatsNew.txt) pairing SDL2_mixer v2.0.2 and SDL2 v.2.0.6 produces an entry point not found error regarding DSL_AudioStreamFlush not being located in SDL2.dll and crispy won't load, so much for being updated to work with v2.0.6 and newer.... discovery PT2 using "SDL2_mixer.dll" v2.0.1 as i describe above actually shows very clearly the discrepancy between current code base of chocolate doom and crispy doom regarding the Left & Right stereo mixing. in chocolate doom, in E1M1, the music starts playing in the left speaker, then the right speaker, and in crispy it's reversed. included a screenshot of the audio recording. one of the nice features of the creative sound cards, they actually have a "what you hear" feature that turns the sound cards audio output into an input source, great for recording in situations like this. sorry for all the edits, lots of typos... |
Thank you very much for the detailed analyses! Re discovery 1: As I suspected thi s turns out to be an issue between SDL, SDL_Mixer and other parts of the audio stack including audio hardware drivers and the actual Windows audio API being used. Probably not much a Doom port deveoper can do about, especially since the current approach apparently works with some older releases of the same libraries. Re discovery 2: Are you using the OPL audio backend? Because there is a bug in the OPL music code causing flipped stero channels that I unconditionaly fixed: However, if it turns out that everyone got used to the Vanilla behaviour so much that the corrected stereo channels are considered as buggy, then I'll have to revert that fix. |
People got so much used to the flipped channels that the correct channel order is now regarded as a bug. :) Thanks @drivetheory for the analyses in #454!
Background
Version of Crispy Doom:
5.6+
Operating System and version:
Win7 SP1 (x64)
Game: (Doom/Heretic/Hexen/Strife/other)
Doom
Any loaded WADs and mods (please include full command line):
doom.wad
Sound Card:
Creative Sound Blaster X-Fi Titanium Fatal1ty
Bug description
Observed behavior:
Crispy Doom v5.6+ Sound effects: "Digital sound effects" causing sounds to be high pitched and sound very strange.
Crispy Doom v5.6+ Music: "OPL (Adlib/Soundblaster) Chip Type: OLP2/OPL3" causes no music to be heard, however, selecting "GUS (emulated)" allows music to play correctly
Expected behavior:
Proper sound and music as experienced in Crispy Doom version 5.5.2
The text was updated successfully, but these errors were encountered: