Opened 6 years ago
Last modified 6 years ago
#18544 assigned defect
detection and configuration of pulse audio is inconsistent
Reported by: | tim.mooney | Owned by: | pentagonik |
---|---|---|---|
Component: | audio | Version: | VirtualBox 6.0.4 |
Keywords: | pulse | Cc: | |
Guest type: | all | Host type: | all |
Description
The way 'configure' detects and enables Pulse audio support is inconsistent and seems like there may be some steps missing.
- unlike most of the check_<something>() functions in configure, if check_pulse() is even called (more on that in a minute), and it detects that Pulse is present and usable, it doesn't do anything to enable Pulse. In particular it does not call
cnf_append "VBOX_WITH_AUDIO_PULSE" "1"
if it finds pulse.
- in addition to the fact that check_pulse doesn't set the define, check_pulse is limited to only being called on certain platforms, by this code:
if [ "$OS" = "linux" -o "$OS" = "freebsd" -o "$OS" = "netbsd" ]; then if [ $WITH_PULSE -eq 1 ]; then check_pulse elif [ $WITH_PULSE -eq 0 ]; then cnf_append "VBOX_WITH_AUDIO_PULSE" "" fi fi
- finally, if you pass --enable-pulse to configure, it sets WITH_PULSE=2 ... which does nothing.
What I think should happen, to make this more consistent:
1) check_pulse() should be modified so that
- if it finds working/acceptable pulse, it calls cnf_append to add VBOX_WITH_AUDIO_PULSE=1
- conversely, if check_pulse is called and it *doesn't* find acceptable pulse, it should call cnf_append to set "VBOX_WITH_AUDIO_PULSE" ""
2) the code block that decides whether check_pulse should even be called should be adjusted so that it doesn't restrict the call by OS and it handles the --enable-pulse case. Some preliminary code might look like:
if [ $WITH_PULSE -eq 1 ]; then check_pulse elif [ $WITH_PULSE -eq 0 ]; then # --disable-pulse or platform default cnf_append "VBOX_WITH_AUDIO_PULSE" "" elif [ $WITH_PULSE -eq 2 ]; then # --enable-pulse was passed cnf_append "VBOX_WITH_AUDIO_PULSE" "1" fi
These changes still honor platform defaults for darwin & haiku (both set WITH_PULSE=0 early in configure). If there isn't a platform-specific override, then the configure default of WITH_PULSE=1 causes check_pulse() to be called, and it sets VBOX_WITH_AUDIO_PULSE appropriately, based on whether it found pulse or not. Finally, if --enable-pulse is passed to configure, VBOX_WITH_AUDIO_PULSE=1 is forced on, with no call to check_pulse.
I can provide patches to configure to make these changes, if you agree that the proposed changes are good ones and make things more consistent.
Thanks,
Tim
Change History (2)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
Hi Tim, thanks for the pointer and work you've invested! I'll give this a shot soon and let you know once OSE has been updated with a fix.