Skip to content

Commit e4a5a81

Browse files
committed
Mac: buffer more output frames to avoid audio input lag issue
goal is to eradicate these warning messages which indicates the buffer has been filled and audio will be restarted: coreaudio_input_capture_63f7ec05-cafb-49af-aea8-c8240e1246be audio is lagging (over by 51.92 ms) at max audio buffering. Restarting source audio. Source mac_screen_capture audio is lagging (over by 5.66 ms) at max audio buffering. Restarting source audio.
1 parent 417ec1b commit e4a5a81

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libobs/media-io/audio-io.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ extern "C" {
2929
#define MAX_AUDIO_MIXES 6
3030
#define MAX_AUDIO_CHANNELS 8
3131
#define MAX_DEVICE_INPUT_CHANNELS 64
32+
#ifdef __APPLE__
33+
// Increase audio buffer to eliminate error: Source X is lagging (over by X ms) at max audio buffering. Restarting source audio.
34+
// Users have submitted logs where their audio restarts. Increasing buffer size resolved the issue locally
35+
#define AUDIO_OUTPUT_FRAMES 4096
36+
#else
3237
#define AUDIO_OUTPUT_FRAMES 1024
38+
#endif
3339

3440
#define TOTAL_AUDIO_SIZE \
3541
(MAX_AUDIO_MIXES * MAX_AUDIO_CHANNELS * AUDIO_OUTPUT_FRAMES * \

0 commit comments

Comments
 (0)