diff options
author | XANTRONIX Development | 2022-03-13 17:16:26 -0400 |
---|---|---|
committer | XANTRONIX Development | 2022-03-13 17:16:26 -0400 |
commit | 7b8375ee2026d42b5444f8ae0e7b98e272e87d69 (patch) | |
tree | 38382c0062f095c9efcd0d6bc29e1b5a5e6ac2f1 /examples | |
parent | 98de824b0eb038d37f62f5317a367b2bfbd38b9d (diff) | |
download | xas-7b8375ee2026d42b5444f8ae0e7b98e272e87d69.tar.gz xas-7b8375ee2026d42b5444f8ae0e7b98e272e87d69.tar.bz2 xas-7b8375ee2026d42b5444f8ae0e7b98e272e87d69.zip |
Refactor drone speech modules
Changes:
* Implement xas_drone_vox type to wrap a xas_vox and audio
stream object in one, and save rendered speech to a drone's
audio bank
* Implement xas_drone_speech_import() as a convenience wrapper to
xas_drone_vox methods
Diffstat (limited to 'examples')
-rw-r--r-- | examples/seq.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/examples/seq.c b/examples/seq.c index 601e46a..ab8da55 100644 --- a/examples/seq.c +++ b/examples/seq.c @@ -195,19 +195,15 @@ int main(int argc, char **argv) { if ((drone = xas_drone_new(scene, (xas_spatial_coord){ 0.0, 0.0, -1.0 }, - 1.3f, 2646000, - 4, - drone_lines)) == NULL) { + 4)) == NULL) { goto error_drone_new; } if ((nurse = xas_drone_new(scene, (xas_spatial_coord){ 1.0, 0.0, 0.0 }, - 1.0f, 2646000, - 4, - nurse_lines)) == NULL) { + 4)) == NULL) { goto error_drone_new_nurse; } @@ -217,6 +213,14 @@ int main(int argc, char **argv) { goto error_drone_chamber_new; } + if (xas_drone_speech_import(drone, NULL, 0.75f, 0, 4, drone_lines) < 0) { + goto error_drone_speech_import; + } + + if (xas_drone_speech_import(nurse, NULL, 1.0f, 0, 4, nurse_lines) < 0) { + goto error_drone_speech_import_nurse; + } + xas_drone_chamber_insert_drone(chamber, drone, 0); xas_drone_chamber_insert_drone(chamber, nurse, 1); xas_drone_chamber_bass_start(chamber); @@ -291,6 +295,8 @@ int main(int argc, char **argv) { return EX_OK; error_seq: +error_drone_speech_import_nurse: +error_drone_speech_import: xas_drone_chamber_destroy(chamber); error_drone_chamber_new: |