PadWorld-Entertainment / worldofpadman

World of PADMAN game repository
https://worldofpadman.net
Other
39 stars 9 forks source link

UI: Enhancing sound options menu #147

Closed kai-li-wop closed 2 years ago

kai-li-wop commented 2 years ago

Since the VoIP options have now all been transferred to the network options (see #143), there is now more space in the sound options to put other useful things there.

ToDo:

kai-li-wop commented 2 years ago

@mgerhardy: When changing from OpenAL to SDL the input device list shows input AND output devices after sound engine restart. After changing back from SDL to OpenAL input device list only shows input devices like expected.

shot0001

kai-li-wop commented 2 years ago

@mgerhardy: I experienced another issue. When having OpenAL not available for some reason and it failed to load, the menu still shows OpenAL and no device is shown, so the device selection is useless. If OpenAL failed to load as default selection on UI start, I think we need to check first which sound backend was loaded and then to provide the correct selection to what was loaded or to set it back to SDL. "s_backend" might be helpful, it is read only and offers "base" or "openal" as values. I am not sure what would be a good solution here, maybe this: if s_backend = base and s_useOpenAL = 1 it must have failed to load!

shot0006

3aTmE commented 2 years ago

While testing the new menu i had no issues using OpenAL. I was able to change devices and settings. Everything just worked. Nice that OpenAL sounds quite a lot better out of the box!

With SDL however.. There were some big issues.

I wanted to try the changes made to the ingame viop in #143 and i could not change my devices without crashing the whole game. In my case it was the Input device i wanted to change.

I'll provide a crashlog at a later hour , probably tomorrow. (if im getting any, that is.)

kai-li-wop commented 2 years ago

Oh, this is interesting. I have only one input device on my desktop computer, so I never tired to change the input device in SDL. I will test this too on my laptop, where I have a built-in capturing device.

mgerhardy commented 2 years ago
^5Channel memory manager started
^5Channel memory manager started
^5S_StartBackgroundTrack( music/menuloop, music/menuloop )
^5Can't read sound file music/menuloop.wav
Closing SDL audio playback device...
tty][Thread 0x7fff95e6c640 (LWP 3842160) exited]
SDL audio playback device closed.
Closing SDL audio capture device...
tty]
Thread 1 "wop.x86_64" received signal SIGINT, Interrupt.
0x00007ffff7acc0fa in __futex_abstimed_wait_common64 (futex_word=futex_word@entry=0x7fffccc9b910, expected=3842161, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=128, cancel=cancel@entry=true) at ../sysdeps/nptl/futex-internal.c:74
74  ../sysdeps/nptl/futex-internal.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0  0x00007ffff7acc0fa in __futex_abstimed_wait_common64 (futex_word=futex_word@entry=0x7fffccc9b910, expected=3842161, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=128, cancel=cancel@entry=true) at ../sysdeps/nptl/futex-internal.c:74
#1  0x00007ffff7acc15b in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7fffccc9b910, expected=<optimized out>, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=128) at ../sysdeps/nptl/futex-internal.c:123
#2  0x00007ffff7ac1274 in __pthread_clockjoin_ex (threadid=140736629159488, thread_return=0x0, clockid=0, abstime=0x0, block=<optimized out>) at pthread_join_common.c:102
#3  0x00007ffff7d42816 in ?? () from /lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#4  0x00007ffff7cdc983 in ?? () from /lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#5  0x00005555555e6358 in SNDDMA_Shutdown () at /home/mgerhardy/dev/worldofpadman/code/sdl/sdl_snd.c:360
#6  0x0000555555585f41 in S_Base_Shutdown () at /home/mgerhardy/dev/worldofpadman/code/client/snd_dma.c:1481
#7  0x0000555555589bad in S_Shutdown () at /home/mgerhardy/dev/worldofpadman/code/client/snd_main.c:537
#8  0x0000555555575636 in CL_Snd_Shutdown () at /home/mgerhardy/dev/worldofpadman/code/client/cl_main.c:1773
#9  0x000055555557564c in CL_Snd_Restart_f () at /home/mgerhardy/dev/worldofpadman/code/client/cl_main.c:1787
#10 0x00005555555a5d2a in Cmd_ExecuteString (text=0x7fffffffd560 "snd_restart") at /home/mgerhardy/dev/worldofpadman/code/qcommon/cmd.c:759
#11 0x00005555555a529c in Cbuf_Execute () at /home/mgerhardy/dev/worldofpadman/code/qcommon/cmd.c:237
#12 0x00005555555ab026 in Com_Frame () at /home/mgerhardy/dev/worldofpadman/code/qcommon/common.c:2892
#13 0x00005555555e7a30 in main (argc=22, argv=0x7fffffffdf18) at /home/mgerhardy/dev/worldofpadman/code/sys/sys_main.c:807
(gdb) c
Continuing.

https://github.com/libsdl-org/SDL/issues/5640

kai-li-wop commented 2 years ago

Ok, this issue seems to be fixed in the future outside of World of Padman directly in SDL 2.0.24 and then can be solved by subsequent integration once it is released. Closing this issue because it is not directly related to the sound options menu, which seems to work flawless.

mgerhardy commented 2 years ago

I am not sure yet. As the original issue was on windows. Pulseaudio is linux only… let’s see…