From 2f5b2d36a07e53cf451538c814182ef7722dc776 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Thu, 10 Mar 2022 15:48:07 -0500 Subject: Explicitly specify speech part to get duration for --- src/drone.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/drone.c b/src/drone.c index 8b47b10..2a130fd 100644 --- a/src/drone.c +++ b/src/drone.c @@ -268,6 +268,7 @@ error_xas_seq_add: } static void max_speech_duration(xas_drone_chamber *chamber, + size_t speech_part, struct timeval *max) { size_t i; @@ -275,13 +276,12 @@ static void max_speech_duration(xas_drone_chamber *chamber, max->tv_usec = 0; for (i=0; idrone_count; i++) { - xas_drone *drone = chamber->drones[i]; - xas_bank_player *player = (xas_bank_player *)drone->obj->ctx; + xas_drone *drone = chamber->drones[i]; struct timeval duration; xas_bank_entry_duration(drone->bank, - player->entry, + speech_part, &duration); if (timercmp(&duration, max, >)) { @@ -301,7 +301,7 @@ int xas_drone_chamber_seq_chorus(xas_drone_chamber *chamber, size_t i; - max_speech_duration(chamber, &duration); + max_speech_duration(chamber, speech_part, &duration); for (i=0; idrone_count; i++) { xas_drone *drone = chamber->drones[i]; -- cgit v1.2.3