diff options
Diffstat (limited to 'examples/seq.c')
-rw-r--r-- | examples/seq.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/examples/seq.c b/examples/seq.c index 1c333c5..18dd60f 100644 --- a/examples/seq.c +++ b/examples/seq.c @@ -158,26 +158,26 @@ int main(int argc, char **argv) { } if ((nurse = xas_spatial_scene_add_bank_player(scene, - (xas_spatial_coord){ 5.0, 0.0, 0.0 }, + (xas_spatial_coord){ 3.0, 0.0, 0.0 }, bank)) == NULL) { goto error_spatial_scene_add_bank_player; } if ((synth_l = xas_spatial_scene_add_synth(scene, - (xas_spatial_coord){ -20.0, 0.0, 0.0 }, + (xas_spatial_coord){ -5.0, 0.0, 0.0 }, XAS_SYNTH_SINE)) == NULL) { goto error_spatial_scene_add_synth_l; } if ((synth_r = xas_spatial_scene_add_synth(scene, - (xas_spatial_coord){ 20.0, 0.0, 0.0 }, + (xas_spatial_coord){ 5.0, 0.0, 0.0 }, XAS_SYNTH_SINE)) == NULL) { goto error_spatial_scene_add_synth_r; } if ((bass = xas_spatial_scene_add_synth(scene, - (xas_spatial_coord){ 0.0, 0.0, 30.0 }, - XAS_SYNTH_SINE)) == NULL) { + (xas_spatial_coord){ 0.0, 0.0, 5.0 }, + XAS_SYNTH_SQUARE)) == NULL) { goto error_spatial_scene_add_synth_r; } @@ -228,7 +228,7 @@ int main(int argc, char **argv) { timerclear(&cur); - for (i=0; i<3; i++) { + for (i=0; i<2; i++) { struct timeval duration_drone, duration_nurse, delay = { 0, 500000 }, @@ -250,6 +250,21 @@ int main(int argc, char **argv) { cur = tmp; } + for (i=0; i<2; i++) { + struct timeval duration_drone, + delay = { 0, 500000 }, + tmp; + + xas_bank_entry_duration(bank, 0, &duration_drone); + + xas_seq_add_event_on(seq, drone, cur); + xas_seq_add_event_on(seq, nurse, cur); + timeradd(&cur, &duration_drone, &tmp); + cur = tmp; + timeradd(&cur, &delay, &tmp); + cur = tmp; + } + xas_seq_add_event_off(seq, synth_l, cur); xas_seq_add_event_off(seq, synth_r, cur); |