Skip to content
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

UI: Enhancing sound options menu #147

Closed
15 tasks done
kai-li-wop opened this issue Apr 13, 2022 · 7 comments
Closed
15 tasks done

UI: Enhancing sound options menu #147

kai-li-wop opened this issue Apr 13, 2022 · 7 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@kai-li-wop
Copy link
Member

kai-li-wop commented Apr 13, 2022

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:

  • Add auto mute option to enable the user to automatically mute the sound of the game when window loses focus or being minimized.
  • Add doppler effect option (radio button)
  • Set doppler speed to new ioq3 default value 9000 --> 13512
  • Sound options depending on OpenAL or SDL should be visible or hidden related to the selected sound system. Hide all OpenAL option when SDL is selected and vice versa.
  • Add option to select the sound output device directly in the sound menu so people can choose their preferred output device (spin control)
  • Add option to select the sound input device directly in the sound menu so people can choose their preferred input device (spin control)
  • Add code extensions to SDL and UI to list audio input/output devices
  • Add precache option (radio button) to OpenAL sound options
  • Add sources option (spin control) to OpenAL sound options
  • Handle input of negative values by using sliders which can happen when first using mouse and second keyboard. Set slider scale from 10 to 100.
  • Unify function names
  • Add useful tool tips to all option on the menu page
  • Fix: Input device list showing output devices when changing from OpenAL to SDL sound backend
  • Fix: Check and show a warning if WoP failed to load OpenAL: if s_backend = base and s_useOpenAL = 1 it must have failed to load! To test this rename OpenAL32.dll in wop root to OpenAL32.dll.old and make sure you don't have OpenAL installed extra,
  • Fix: Sources Allocation selection closing the sound menu
@kai-li-wop kai-li-wop added the enhancement New feature or request label Apr 13, 2022
@kai-li-wop kai-li-wop added this to the v1.7.0 milestone Apr 13, 2022
@kai-li-wop kai-li-wop moved this to In Progress in WoP 1.7.x Apr 13, 2022
@kai-li-wop
Copy link
Member Author

@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
Copy link
Member Author

kai-li-wop commented Apr 13, 2022

@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

@kai-li-wop kai-li-wop moved this from In Progress to Ready for Review in WoP 1.7.x Apr 14, 2022
@kai-li-wop kai-li-wop moved this from Ready for Review to In Progress in WoP 1.7.x Apr 14, 2022
@kai-li-wop kai-li-wop moved this from In Progress to Ready for Review in WoP 1.7.x Apr 14, 2022
@kai-li-wop kai-li-wop added the bug Something isn't working label Apr 20, 2022
@3aTmE
Copy link

3aTmE commented May 7, 2022

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
Copy link
Member Author

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
Copy link
Member

mgerhardy commented May 8, 2022

^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.

libsdl-org/SDL#5640

@kai-li-wop
Copy link
Member Author

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.

Repository owner moved this from Ready for Review to Done in WoP 1.7.x May 14, 2022
@mgerhardy
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

3 participants