Sound irregularities, 0.4 [SOLVED]

For all the help you need with Armagetron!
Post Reply
User avatar
sinewav
Graphic Artist
Posts: 6203
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Sound irregularities, 0.4 [SOLVED]

Post by sinewav »

I just installed 0.4_alpha20190407 (from Lightron.org) and the sound is messed up. The pitch of the cycle engine volley up and down, occasionally cutting out completely in place of other sounds (explosions) and there is weird aliasing. This effect is present on all sound quality settings (low/med/high). I complied using libsdl2-mixer-dev (2.0.2+dfsg1-2)

Any suggestions?
Last edited by sinewav on Wed Apr 10, 2019 6:16 am, edited 1 time in total.

User avatar
aP|Nelg
Match Winner
Posts: 545
Joined: Wed Oct 22, 2014 10:22 pm
Contact:

Re: Sound irregularities, 0.4

Post by aP|Nelg »

I'm not sure whether I have sound issues quite as severe as yours, but there was a strange high pitched noise that came in and out which doesn't seem to happen on a different cyclrun file (from a moviepack from tr2n origins). I haven't investigated further, I usually just mute sound anyway.

It might be the issue Lucifer was mentioning about sound on his todo list.

User avatar
Lucifer
Project Developer & Local Moonshiner
Posts: 8610
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Re: Sound irregularities, 0.4

Post by Lucifer »

I'm 99% certain the main problem is digital distortion, because it happens the worst/most when you have several cycles close enough to each other that their volumes, when added up, would exceed the word size of the sound card.

I believe the other thing is a Feature-Not-A-Bug, at least to the extent that I intended the cycle sound to be the one cut off because the explosions are more important, but that's certainly negotiable.

My intended fix is to acquire a case of the fuckits and port to OpenAL instead, since that API is much easier to work with than sdl_mixer, and way more mature, and, not coincidentally, used in commercial games a lot.

It'll make my todo list sometime soon, I hope. My current todo list is still oriented around maintaining sobriety, and while armagetron is a part of that sobriety part, it's still lower in priority (for now) than some other things I'm working on.

But rest assured, I'm aware of the problem and have a solution. :) Now it's down to the same ol' barrier: finding time. Which, in my case, is about finding balance.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden

User avatar
sinewav
Graphic Artist
Posts: 6203
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: Sound irregularities, 0.4

Post by sinewav »

I made a short video of the problem.

https://adventuresoftron.com/aa/sound-bug.ogv

I might try to recompile with an earlier version and see if that helps.

User avatar
aP|Nelg
Match Winner
Posts: 545
Joined: Wed Oct 22, 2014 10:22 pm
Contact:

Re: Sound irregularities, 0.4

Post by aP|Nelg »

Can you try compiling with SDL1 instead of SDL2? I don't remember if that helped, but it might.

User avatar
Lucifer
Project Developer & Local Moonshiner
Posts: 8610
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Re: Sound irregularities, 0.4

Post by Lucifer »

Do we still support sdl1?
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden

User avatar
aP|Nelg
Match Winner
Posts: 545
Joined: Wed Oct 22, 2014 10:22 pm
Contact:

Re: Sound irregularities, 0.4

Post by aP|Nelg »

Lucifer wrote:Do we still support sdl1?
I assume so. On 0.4 when you run configure you can do --disable-sdl2 --enable-sdl1

User avatar
sinewav
Graphic Artist
Posts: 6203
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: Sound irregularities, 0.4

Post by sinewav »

aP|Nelg wrote:
Lucifer wrote:Do we still support sdl1?
I assume so. On 0.4 when you run configure you can do --disable-sdl2 --enable-sdl1
I tried with those flags and Arma failed on make install:

Code: Select all

make[2]: Entering directory '/home/user/0.4-armagetronad/src'
g++   -I./tools -I./resource -I./thirdparty/mathexpr -I./thirdparty/utf8 -I./protobuf -Iprotobuf  -I./render -I./ui -I./thirdparty/shttpd -I./thirdparty/scrap     -I./network -I./engine -I./engine/sound -I./thirdparty/particles -I./tron -I./tron/cockpit -O2 -std=c++11   -o armagetronad_main tron/armagetronad_main-gFloor.o tron/cockpit/armagetronad_main-cCockpit.o tron/cockpit/armagetronad_main-cMap.o tron/cockpit/armagetronad_main-cCamview.o tron/zone/armagetronad_main-zFortress.o libtron.a libenginecore.a libengine.a libnetwork.a libui.a librender.a libtools.a protobuf/libprotobuf.a thirdparty/mathexpr/libmathexpr.a thirdparty/particles/libparticles.a thirdparty/scrap/libscrap.a -lpthread -lSDL_image -lGLEW -lGLU -lGL -lX11 -L/usr/X11R6/lib -lSDL_mixer -L/usr/lib/x86_64-linux-gnu -lSDL -lm -lrt -lprotobuf -lpthread -lboost_thread -lboost_system -lxml2   -lpng16 -lftgl -lfreetype
/usr/bin/ld: thirdparty/scrap/libscrap.a(libscrap_a-scrap.o): undefined reference to symbol 'SDL_GetClipboardText'
//usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:1566: recipe for target 'armagetronad_main' failed
make[2]: *** [armagetronad_main] Error 1
make[2]: Leaving directory '/home/user/0.4-armagetronad/src'
Makefile:4145: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/home/user/0.4-armagetronad/src'
Makefile:768: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
I'm over my head with at this point. Went from bad sound to no game. :( It's asking for SDL2, but I'm not sure how to pass SDL1 to make.

User avatar
Lucifer
Project Developer & Local Moonshiner
Posts: 8610
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Re: Sound irregularities, 0.4

Post by Lucifer »

try a make clean, or make veryclean. Then configure it again, with the flags Nelg mentioned, and it //should// work. ;)
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden

User avatar
sinewav
Graphic Artist
Posts: 6203
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: Sound irregularities, 0.4

Post by sinewav »

Lucifer wrote:try a make clean...
That did the trick: make clean plus the configure flags provided by Nelg has fixed the sound issue (roll back to SDL1). I lost all my key bindings, but that's not a big deal.

:star: Thanks for the help guys, hope to see you in-game soon!

User avatar
Lucifer
Project Developer & Local Moonshiner
Posts: 8610
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Re: Sound irregularities, 0.4 [SOLVED]

Post by Lucifer »

Well then, that's a very interesting piece of information. Why does it work fine in SDL1 and not SDL2? This deserves further research...
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden

Post Reply