From 36aae6b5d16e8f11e4a6944f29936fa0d9d55046 Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Mon, 21 Mar 2022 21:39:16 -0400 Subject: [PATCH] Update call_concluder.cc Changing upload script call Normalization now called on the combined file --- trunk-recorder/call_concluder/call_concluder.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/trunk-recorder/call_concluder/call_concluder.cc b/trunk-recorder/call_concluder/call_concluder.cc index 36415a47b..4b369db0e 100644 --- a/trunk-recorder/call_concluder/call_concluder.cc +++ b/trunk-recorder/call_concluder/call_concluder.cc @@ -9,7 +9,8 @@ std::list Call_Concluder::retry_call_list = {}; int combine_wav(std::string files, char *target_filename) { char shell_command[4000]; - int nchars = snprintf(shell_command, 4000, "sox %s %s --norm=-.01", files.c_str(), target_filename); + + int nchars = snprintf(shell_command, 4000, "sox %s %s ", files.c_str(), target_filename); if (nchars >= 4000) { BOOST_LOG_TRIVIAL(error) << "Call uploader: SOX Combine WAV Command longer than 4000 characters"; @@ -31,7 +32,7 @@ int combine_wav(std::string files, char *target_filename) { int convert_media(char *filename, char *converted) { char shell_command[400]; - int nchars = snprintf(shell_command, 400, "sox %s -t wav - | fdkaac --silent -p 2 --ignorelength -b 8000 -o %s -", filename, converted); + int nchars = snprintf(shell_command, 400, "sox %s --norm -t wav - | fdkaac --silent -p 2 --ignorelength -b 8000 -o %s -", filename, converted); if (nchars >= 400) { BOOST_LOG_TRIVIAL(error) << "Call uploader: Command longer than 400 characters"; @@ -194,7 +195,7 @@ Call_Data_t upload_call_worker(Call_Data_t call_info) { // Handle the Upload Script, if set if (call_info.upload_script.length() != 0) { - shell_command << "./" << call_info.upload_script << " " << call_info.filename << " " << call_info.status_filename << " " << call_info.converted; + shell_command << call_info.upload_script << " " << call_info.filename << " " << call_info.status_filename << " " << call_info.converted; shell_command_string = shell_command.str(); BOOST_LOG_TRIVIAL(info) << "[" << call_info.short_name << "]\t\033[0;34m" << call_info.call_num << "C\033[0m \t Running upload script: " << shell_command_string;