diff options
-rw-r--r-- | include/xas/drone.h | 4 | ||||
-rw-r--r-- | src/drone.c | 16 |
2 files changed, 20 insertions, 0 deletions
diff --git a/include/xas/drone.h b/include/xas/drone.h index b508e6d..d15b13b 100644 --- a/include/xas/drone.h +++ b/include/xas/drone.h @@ -66,6 +66,10 @@ void xas_drone_chamber_insert_drone(xas_drone_chamber *chamber, xas_drone *drone, size_t index); +void xas_drone_chamber_set_drone_gain(xas_drone_chamber *chamber, float gain); + +void xas_drone_chamber_set_synth_gain(xas_drone_chamber *chamber, float gain); + void xas_drone_chamber_bass_start(xas_drone_chamber *chamber); void xas_drone_chamber_bass_stop(xas_drone_chamber *chamber); diff --git a/src/drone.c b/src/drone.c index 2655758..d374e3b 100644 --- a/src/drone.c +++ b/src/drone.c @@ -181,6 +181,22 @@ void xas_drone_chamber_insert_drone(xas_drone_chamber *chamber, chamber->drones[index] = drone; } +void xas_drone_chamber_set_drone_gain(xas_drone_chamber *chamber, float gain) { + size_t i; + + for (i=0; i<chamber->drone_count; i++) { + xas_drone *drone = chamber->drones[i]; + + xas_object_set_gain(drone->obj->ctx, gain); + } +} + +void xas_drone_chamber_set_synth_gain(xas_drone_chamber *chamber, float gain) { + xas_object_set_gain(chamber->synth_bass->ctx, gain); + xas_object_set_gain(chamber->synth_l->ctx, gain); + xas_object_set_gain(chamber->synth_r->ctx, gain); +} + void xas_drone_chamber_bass_start(xas_drone_chamber *chamber) { xas_synth_start(chamber->synth_bass->ctx); } |