The mainloop time_new is supposed to be called with wallclock time
but some apps use rttime instead. Handle the case better so that we
never end up disabling the timer.
Some controls (channelVolumes) list themselves as Float but are stored
in an array, as can be found from the type info. Use this info to
set channelVolumes with 1 channel.
fixes some assertions like pa_pod_is_array(pod)' failed at
../pipewire/spa/include/spa/pod/iter.h:334 spa_pod_get_array()
Make sure we don't report underrun for the first time we pull data.
Send STARTED message when we leave the underrun state
Send UNDERFLOW when we enter the underrun state
Count underrun when corked.
Pass process stats back to the mainloop after process.
Decrease the pending length when we get underrun so that we can request
more data.
After we get the Route update, schedule subscription events when
there are changes pending. When we scheduled a volume change ourselves,
it is likely that nothing got changed by the route update but
we still have to emit the subscription event to notify the new volume.
Fixes#298
We are linking against PulseAudio’s libpulse,
which adds its soname to DT_NEEDED but we are expecting
to actually use our shim with the same soname from LIBPULSE_PATH
(forced by adding the path to LD_LIBRARY_PATH).
Package managers like Nix will detect that we are linking against
PulseAudio’s libpulse and mark it as a runtime dependency by adding
its path to DT_RUNPATH entry so that it can be easily found
by the loader. LD_LIBRARY_PATH will take precedence but it will still
pull PulseAudio into the system’s closure.
This is needed for example for Clang compiler which uses different
annotations than GCC. It will make WebRTC to happily use PipeWire
since the spa library is header-only and WebRTC defaults to use
Clang with -Wimplicit-fallthrough.
When we change the volume/mute of a sink/source, mark the source
as changed so that when we get the update from the server we
emit a CHANGE event. We don't do this otherwise because the server
volume update and our local volume is the same.
Fixes#298
Detect if the mainloop_api is one of ours and use the loop directly in
that case. Otherwise, make a new loop and add the fd to the foreign
mainloop_api. Make sure we clean up as well.
Fixes#345
First parse the profile into a strv so that we have a copy of the
profiles and it can't change when the original string (in properties
or environment) gets changed.
See #345
Add a property for capture stream to signal that they would like
to capture the output (monitor) of the default sink instead of the
default source.
Check the desired device we would like to capture from and handle
the capture from the sink by monitoring the monitor source.