From a83c813ff40267fee11859f6381b7556b3d134ba Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Sat, 27 Sep 2025 15:21:04 +0200 Subject: [PATCH] increase buffer sizes --- .vscode/.server-controller-port.log | 2 +- src/chimer95.c | 2 +- src/fm95.c | 4 ++-- src/sca95.c | 2 +- src/vban95.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.vscode/.server-controller-port.log b/.vscode/.server-controller-port.log index aa661e8..160aa7b 100644 --- a/.vscode/.server-controller-port.log +++ b/.vscode/.server-controller-port.log @@ -1,5 +1,5 @@ { "port": 13452, - "time": 1754499532735, + "time": 1758977942619, "version": "0.0.3" } \ No newline at end of file diff --git a/src/chimer95.c b/src/chimer95.c index 57f529f..b7acaef 100644 --- a/src/chimer95.c +++ b/src/chimer95.c @@ -18,7 +18,7 @@ #define OUTPUT_DEVICE "FM_MPX" -#define BUFFER_SIZE 512 +#define BUFFER_SIZE 1024 #include "../io/audio.h" diff --git a/src/fm95.c b/src/fm95.c index c08b563..897ed38 100644 --- a/src/fm95.c +++ b/src/fm95.c @@ -14,7 +14,7 @@ #include "../filter/bs412.h" #include "../filter/gain_control.h" -#define BUFFER_SIZE 3072 // This defines how many samples to process at a time, because the loop here is this: get signal -> process signal -> output signal, and when we get signal we actually get BUFFER_SIZE of them +#define BUFFER_SIZE 8192 // This defines how many samples to process at a time, because the loop here is this: get signal -> process signal -> output signal, and when we get signal we actually get BUFFER_SIZE of them #include "../io/audio.h" @@ -390,7 +390,7 @@ int setup_audio(FM95_Runtime* runtime, const FM95_DeviceNames dv_names, const FM pa_buffer_attr output_buffer_atr = { .maxlength = buffer_maxlength, .tlength = buffer_tlength_fragsize, - .prebuf = 16 + .prebuf = 64 }; int opentime_pulse_error; diff --git a/src/sca95.c b/src/sca95.c index fd59492..8fcfe5a 100644 --- a/src/sca95.c +++ b/src/sca95.c @@ -16,7 +16,7 @@ #define INPUT_DEVICE "SCA.monitor" #define OUTPUT_DEVICE "FM_MPX" -#define BUFFER_SIZE 1024 +#define BUFFER_SIZE 3072 #include "../io/audio.h" diff --git a/src/vban95.c b/src/vban95.c index 3099135..db80b63 100644 --- a/src/vban95.c +++ b/src/vban95.c @@ -8,7 +8,7 @@ #define buffer_maxlength 12288 #define buffer_tlength_fragsize 12288 -#define buffer_prebuf 8 +#define buffer_prebuf 64 #include "../io/audio.h" #include "../lib/debug.h"