From e7746e3358b7dd8bb57e63aa67c020b598b723c6 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Tue, 1 Feb 2022 20:46:53 -0500 Subject: Use saner buffer size --- examples/test.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/test.c b/examples/test.c index 24d1d7b..56632a5 100644 --- a/examples/test.c +++ b/examples/test.c @@ -74,7 +74,8 @@ int main(int argc, char **argv) { }; size_t sample_rate = 44100, - duration_s = 60, + buffer_size = 4096, + duration_s = 60, i; if (argc != 2) { @@ -91,7 +92,7 @@ int main(int argc, char **argv) { if ((synth_l = xas_synth_new(XAS_AUDIO_STREAM_PCM_16_BIT, sample_rate, - sample_rate, + buffer_size, (xas_synth_callback_sample)sine_sample, (xas_synth_callback_cleanup)sine_cleanup, &sine_channels[0])) == NULL) { @@ -100,7 +101,7 @@ int main(int argc, char **argv) { if ((synth_r = xas_synth_new(XAS_AUDIO_STREAM_PCM_16_BIT, sample_rate, - sample_rate, + buffer_size, (xas_synth_callback_sample)sine_sample, (xas_synth_callback_cleanup)sine_cleanup, &sine_channels[1])) == NULL) { @@ -110,7 +111,7 @@ int main(int argc, char **argv) { if ((mixer = xas_mixer_new(XAS_AUDIO_STREAM_PCM_16_BIT, sample_rate, XAS_AUDIO_STREAM_STEREO, - sample_rate)) == NULL) { + buffer_size)) == NULL) { goto error_mixer_new; } -- cgit v1.2.3