When setting up the capture, the plugin will now query pulse for the default
format of the specific source instead of the server.
This is useful if a source has different settings than what the defaults are
for the server, e.g. when the source is an output with 5.1 surround sound
and the microphone input is mono while the server defaults to stereo sound.
Doing timestamp smoothing in obs-source.c is good because timestamps can
typically operate on a different timebase, however, obs-source.c can
also change that time base dynamically (such as with async video and
unexpected timestamp jumps), so in order to ensure that audio is
seamless in the output as well, perform timestamp smoothing in
audio-io.c as well just as an extra precautionary measure.
the pos_x and pos_y variables were somewhat deceptive, because they were
not actually the poition of the cursor. They represented the position
of the cursor's bitmap on the screen, not the position of the cursor.
Some devices burst their audio (such as when querying audio from
directshow), and the 250 millisecond threshold that sets the audio meter
back to muted status would erroneously cause the meter to appear bounce
back between muted and unmuted. Instead, a one second test should be
sufficient time to prevent that from happening.
This implements audio support, allowing not only the ability to capture
the built-in audio from the video device's audio capture pin, but also
the ability to override the default audio with a custom audio device.
The DShowInput::Update function was split up and refactored a bit, as it
was getting a bit large and messy.
If the audio didn't start at the 0 timestamp, it would misinterpret it
as a timestamp jump because obs_source::next_audio_ts_min is set to 0 on
creation. Timestamp starting values should be allowed to start at any
arbitrary value.
This fixes a bug where the pulseaudio plugin always reported
a speaker layout of stereo to obs, regardless of how many channels
pulseaudio actually recorded.
If the default number of channels was different to 2 this would
cause audio distortion.
If the properties view changed in the properties window, the viewport of
the properties would not trigger a resize because the size of the window
itself does not change. This creates a signal that allows the parent to
know whether or not to update a viewport, if any.
Originally, I tested the fontconfig code on mac and it was working
swimmingly. However, it seems to be related to the fact that I am using
the ports/homebrew version of fontconfig. Most users do not have that
version, and instead use the system built-in version of fontconfig,
which apparently does not find any mac fonts.. at all. So, this
reverts the mac code to the older mac code we were using to manually
find and associate fonts with font files on the mac.
Sometimes certain drivers do not have the capability required to
initialize the graphics subsystem (mesa currently, for example).
Instead of saying "your hardware is too old", state that the drivers may
also be at fault.
GCC marks fread as a function that will throw a warning if you do not
use its return value. This is most likely done as a measure to ensure
code security.