From b27c582f11f29680b5ac6033d69e50c9263e1320 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Sat, 12 Mar 2022 17:22:37 -0500 Subject: Add methods to set drone, chamber synth gain --- src/drone.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src') 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; idrone_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); } -- cgit v1.2.3