libobs/audio-monitoring: Fix PulseAudio monitoring volume for u8 format

Change `char` to `uint8_t` in `process_byte` because the type is
expected unsigned 8-bit.
This commit is contained in:
Norihiro Kamae 2021-10-12 09:37:09 +09:00 committed by Jim
parent 0eed7ca98f
commit 85f45a3ef6

View file

@ -126,11 +126,11 @@ static pa_channel_map pulseaudio_channel_map(enum speaker_layout layout)
static void process_byte(void *p, size_t frames, size_t channels, float vol)
{
register char *cur = (char *)p;
register char *end = cur + frames * channels;
register uint8_t *cur = (uint8_t *)p;
register uint8_t *end = cur + frames * channels;
while (cur < end)
*(cur++) *= vol;
for (; cur < end; cur++)
*cur = ((int)*cur - 128) * vol + 128;
}
static void process_s16(void *p, size_t frames, size_t channels, float vol)