obs-studio
obs-studio copied to clipboard
libobs: Pulseaudio audio-monitoring list sinks
List Pulse Sinks not Sink monitors in Settings DropDown
Description
It is Listig sinks instead of sink monitors. Now
Before
Motivation and Context
In the drop Down in the Audio Monitor Settings the Monitors of sinks where display instead of the sinks. With string manipulation the monior was changed to the actual sink to connect audio. So it was working but not easy to understand. For me as a user.
How Has This Been Tested?
I checked it on my ArchLinux Pulseaudio Jack setup. I am able to Monitor audio form Media.
Types of changes
No breaking changes. Bug fix I am not sure if there is more Documentation i need to chage?
Checklist:
- [x] My code has been run through clang-format.
- [x] I have read the contributing document.
- [x] My code is not on the master branch.
- [x] The code has been tested.
- [x] All commit messages are properly formatted and commits squashed where appropriate.
- [?] I have included updates to all appropriate documentation.
Would this not be a breaking change for existing setups? If a user previously set up a monitoring device then updated to this, would their monitoring device reset to default or update to the correct item?
You are right. I addressed that better now. Old config will work but you if you change some thing it will save in the new way.
Is something missing getting the fix into master?
This doesnt work on my machine. Loading an old configuration actually did work but trying to choose one of the new options didnt on one try and segfaulted on a 2nd try.
Backtrace from flipping between option, note this was rebased onto master:
(gdb) bt
#0 0x00007ffff45f4148 in () at /usr/lib/libswresample.so.3
#1 0x00007ffff45f5642 in swr_free () at /usr/lib/libswresample.so.3
#2 0x00007ffff5be10d4 in audio_resampler_destroy (rs=0x55555782fd20)
at /obs-studio-main/libobs/media-io/audio-resampler-ffmpeg.c:155
#3 0x00007ffff5c42aa1 in audio_monitor_free (monitor=0x555557806120)
at /obs-studio-main/libobs/audio-monitoring/pulse/pulseaudio-output.c:522
#4 audio_monitor_free (monitor=0x555557806120)
at /obs-studio-main/libobs/audio-monitoring/pulse/pulseaudio-output.c:513
#5 audio_monitor_reset (monitor=0x555557806120)
at /obs-studio-main/libobs/audio-monitoring/pulse/pulseaudio-output.c:558
#6 0x00007ffff5c17fa4 in obs_set_audio_monitoring_device
(name=<optimized out>, id=0x555558e37738 "alsa_output.usb-Audio-Technica_ATR_USB_microphone-00.pro-output-0")
at /obs-studio-main/libobs/obs.c:2267
#7 0x000055555567a961 in OBSBasicSettings::SaveAdvancedSettings() (this=0x7fffffffc9c0)
at /obs-studio-main/UI/window-basic-settings.cpp:3278
#8 0x000055555568bdf8 in OBSBasicSettings::SaveSettings() (this=0x7fffffffc9c0)
at /obs-studio-main/UI/window-basic-settings.cpp:3682
#9 0x000055555568c0c8 in OBSBasicSettings::on_buttonBox_clicked(QAbstractButton*)
(this=0x7fffffffc9c0, button=<optimized out>)
at /obs-studio-main/UI/window-basic-settings.cpp:3797
``
I can confirm this doesn't seem to work
info: pulse-am: Server name: 'pulseaudio 14.2'
error: pulse-am: An error occurred while getting the source info!
It also seems to cause a source memory leak (counted on shutdown), but that may be caused by the error and not the new code.
Edit: For reference, here's how it looks on master
:
info: pulse-am: Server name: 'pulseaudio 14.2'
info: pulse-am: Audio format: s16le, 44100 Hz, 6 channels
info: pulse-am: Started Monitoring in 'alsa_output.pci-0000_0b_00.4.analog-surround-51.monitor'