mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-02 09:33:33 +00:00
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:
parent
0eed7ca98f
commit
85f45a3ef6
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue