diff options
author | XANTRONIX Development | 2022-02-01 20:46:53 -0500 |
---|---|---|
committer | XANTRONIX Development | 2022-02-01 20:46:53 -0500 |
commit | e7746e3358b7dd8bb57e63aa67c020b598b723c6 (patch) | |
tree | f252940e500b4d7150b58c17cd32779ce825b29d /examples | |
parent | 60f36ea87360169439a472be6355874797b72390 (diff) | |
download | xas-e7746e3358b7dd8bb57e63aa67c020b598b723c6.tar.gz xas-e7746e3358b7dd8bb57e63aa67c020b598b723c6.tar.bz2 xas-e7746e3358b7dd8bb57e63aa67c020b598b723c6.zip |
Use saner buffer size
Diffstat (limited to 'examples')
-rw-r--r-- | examples/test.c | 9 |
1 files 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; } |