From 78a788bff6779a79357b346901f477060ad5d96f Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Mon, 28 Feb 2022 17:14:17 -0500 Subject: s/new_stream/stream_new/ for consistency --- examples/say.c | 12 ++++++------ examples/spatial.c | 12 ++++++------ examples/test.c | 12 ++++++------ include/xas/spatial.h | 2 +- include/xas/synth.h | 2 +- src/script.c | 6 +++--- src/spatial.c | 2 +- src/synth.c | 2 +- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/examples/say.c b/examples/say.c index 133ec12..6365b02 100644 --- a/examples/say.c +++ b/examples/say.c @@ -111,12 +111,12 @@ int main(int argc, char **argv) { goto error_bank_player_stream_new; } - if ((synth_l = xas_synth_new_stream(sine_l)) == NULL) { - goto error_synth_new_stream_l; + if ((synth_l = xas_synth_stream_new(sine_l)) == NULL) { + goto error_synth_stream_new_l; } - if ((synth_r = xas_synth_new_stream(sine_r)) == NULL) { - goto error_synth_new_stream_r; + if ((synth_r = xas_synth_stream_new(sine_r)) == NULL) { + goto error_synth_stream_new_r; } if ((mixer = xas_mixer_new(format, buffer_size)) == NULL) { @@ -201,10 +201,10 @@ error_mixer_input_add: error_mixer_new: xas_audio_stream_destroy(synth_r); -error_synth_new_stream_r: +error_synth_stream_new_r: xas_audio_stream_destroy(synth_l); -error_synth_new_stream_l: +error_synth_stream_new_l: xas_audio_stream_destroy(player_stream); error_bank_player_stream_new: diff --git a/examples/spatial.c b/examples/spatial.c index 3783500..68d064d 100644 --- a/examples/spatial.c +++ b/examples/spatial.c @@ -72,8 +72,8 @@ int main(int argc, char **argv) { goto error_synth_new; } - if ((synth = xas_synth_new_stream(sine)) == NULL) { - goto error_synth_new_stream; + if ((synth = xas_synth_stream_new(sine)) == NULL) { + goto error_synth_stream_new; } if ((vox = xas_vox_new(format, @@ -94,9 +94,9 @@ int main(int argc, char **argv) { goto error_spatial_scene_new; } - if ((output = xas_spatial_scene_new_stream(scene, + if ((output = xas_spatial_scene_stream_new(scene, buffer_size)) == NULL) { - goto error_spatial_scene_new_stream; + goto error_spatial_scene_stream_new; } if (xas_spatial_scene_add_object(scene, @@ -153,7 +153,7 @@ error_audio_stream_write: error_spatial_scene_add_object: xas_audio_stream_destroy(output); -error_spatial_scene_new_stream: +error_spatial_scene_stream_new: xas_spatial_scene_destroy(scene); error_spatial_scene_new: @@ -165,7 +165,7 @@ error_vox_stream_new: error_vox_new: xas_audio_stream_destroy(synth); -error_synth_new_stream: +error_synth_stream_new: xas_synth_destroy(sine); error_synth_new: diff --git a/examples/test.c b/examples/test.c index 272e32d..cc14571 100644 --- a/examples/test.c +++ b/examples/test.c @@ -64,8 +64,8 @@ int main(int argc, char **argv) { goto error_synth_new_l; } - if ((synth_l = xas_synth_new_stream(sine_l)) == NULL) { - goto error_synth_new_stream_l; + if ((synth_l = xas_synth_stream_new(sine_l)) == NULL) { + goto error_synth_stream_new_l; } if ((sine_r = xas_synth_new(format, @@ -74,8 +74,8 @@ int main(int argc, char **argv) { goto error_synth_new_r; } - if ((synth_r = xas_synth_new_stream(sine_r)) == NULL) { - goto error_synth_new_stream_r; + if ((synth_r = xas_synth_stream_new(sine_r)) == NULL) { + goto error_synth_stream_new_r; } if ((mixer = xas_mixer_new(format, buffer_size)) == NULL) { @@ -130,13 +130,13 @@ error_mixer_input_add: error_mixer_new: xas_audio_stream_destroy(synth_r); -error_synth_new_stream_r: +error_synth_stream_new_r: xas_synth_destroy(sine_r); error_synth_new_r: xas_audio_stream_destroy(synth_l); -error_synth_new_stream_l: +error_synth_stream_new_l: xas_synth_destroy(sine_l); error_synth_new_l: diff --git a/include/xas/spatial.h b/include/xas/spatial.h index 0eeab40..b9297f8 100644 --- a/include/xas/spatial.h +++ b/include/xas/spatial.h @@ -102,7 +102,7 @@ int xas_spatial_object_stop(xas_spatial_object *object); void xas_spatial_object_get_point(xas_spatial_object *object, xas_spatial_coord *point); -xas_audio_stream *xas_spatial_scene_new_stream(xas_spatial_scene *scene, +xas_audio_stream *xas_spatial_scene_stream_new(xas_spatial_scene *scene, size_t buffer_size); #endif /* _XAS_SPATIAL_H */ diff --git a/include/xas/synth.h b/include/xas/synth.h index c13c53e..6902643 100644 --- a/include/xas/synth.h +++ b/include/xas/synth.h @@ -57,6 +57,6 @@ void xas_synth_start(xas_synth *synth); void xas_synth_stop(xas_synth *synth); -xas_audio_stream *xas_synth_new_stream(xas_synth *synth); +xas_audio_stream *xas_synth_stream_new(xas_synth *synth); #endif /* _XAS_SYNTH_H */ diff --git a/src/script.c b/src/script.c index b983577..29d76ca 100644 --- a/src/script.c +++ b/src/script.c @@ -279,9 +279,9 @@ int xas_script_play(xas_script *script, xas_audio_stream *sink) { int16_t *samples; - if ((source = xas_spatial_scene_new_stream(script->scene, + if ((source = xas_spatial_scene_stream_new(script->scene, script->buffer_size)) == NULL) { - goto error_spatial_scene_new_stream; + goto error_spatial_scene_stream_new; } while (ev) { @@ -321,6 +321,6 @@ error_audio_stream_io: error_event_trigger: xas_audio_stream_destroy(source); -error_spatial_scene_new_stream: +error_spatial_scene_stream_new: return -1; } diff --git a/src/spatial.c b/src/spatial.c index da89ad3..63207fa 100644 --- a/src/spatial.c +++ b/src/spatial.c @@ -444,7 +444,7 @@ int xas_spatial_object_stop(xas_spatial_object *object) { return ((xas_object *)object->ctx)->stop((xas_object *)object->ctx); } -xas_audio_stream *xas_spatial_scene_new_stream(xas_spatial_scene *scene, +xas_audio_stream *xas_spatial_scene_stream_new(xas_spatial_scene *scene, size_t buffer_size) { return xas_audio_stream_new_source((xas_audio_fill)scene_fill, NULL, diff --git a/src/synth.c b/src/synth.c index 83787b7..650c8c9 100644 --- a/src/synth.c +++ b/src/synth.c @@ -183,7 +183,7 @@ void xas_synth_stop(xas_synth *synth) { synth->phase = 0.0f; } -xas_audio_stream *xas_synth_new_stream(xas_synth *synth) { +xas_audio_stream *xas_synth_stream_new(xas_synth *synth) { return xas_audio_stream_new_source((xas_audio_fill)synth_fill, NULL, synth->format, -- cgit v1.2.3