jp9000/obs-studio — pull request #276 by reboot (2014-10-07 20:36:03+00:00)
Title: Fix pulse audio format conversion

1. When I was recording from a PulseAudio source that uses the format s32le the output video only contained very distorted audio. The helper function in pulse-input.c only maps PA_SAMPLE_S24_32LE to AUDIO_FORMAT_32BIT, but according to the PulseAudio documentation PA_SAMPLE_S24_32LE is a 24 bit sample format, which doesn't seem to be right, so I changed that to PA_SAMPLE_S32LE which then allowed me to correctly record from the s32le source.

2. During the investigation of the first problem I noticed that recording from every PulseAudio source with a format that OBS does not support will result in the distorted audio, because OBS always handles it as AUDIO_FORMAT_UNKNOWN, which doesn't seem like a good idea. So I made the second change that forces PulseAudio to provide data in a sample format supported by OBS when the default format of the source is not supported. Like that I was able to record from a source with s24-32le sample format without problems.