From 59b4c61578756606b79a178210ea147fc4374755 Mon Sep 17 00:00:00 2001 From: Tobias Blomberg Date: Wed, 27 Mar 2024 22:08:40 +0100 Subject: [PATCH 1/2] Update link path for retrieving metar info --- src/svxlink/modules/metarinfo/ModuleMetarInfo.conf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/svxlink/modules/metarinfo/ModuleMetarInfo.conf b/src/svxlink/modules/metarinfo/ModuleMetarInfo.conf index 1264b9d55..e69ab7d35 100644 --- a/src/svxlink/modules/metarinfo/ModuleMetarInfo.conf +++ b/src/svxlink/modules/metarinfo/ModuleMetarInfo.conf @@ -7,14 +7,16 @@ TYPE=XML #SERVER=tgftp.nws.noaa.gov SERVER=https://aviationweather.gov #LINK=data/observations/metar/stations -LINK=/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&hoursBeforeNow=3&mostRecent=true&stationString= +#LINK=/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&hoursBeforeNow=3&mostRecent=true&stationString= +LINK=/cgi-bin/data/dataserver.php?requestType=retrieve&dataSource=metars&hoursBeforeNow=3&stationString= #STARTDEFAULT=EDDP #LONGMESSAGES=1 #REMARKS=1 #DEBUG=1 -# insert ICAO airport shortcuts here. You can -# request the METAR by sending dtmf commands as + +# Insert ICAO airport shortcuts here. You can +# request the METAR by sending DTMF commands as # follows: # -# 1# 2# 3# 4# 5# ... +# 1# 2# 3# 4# 5# 6# 7# 8# AIRPORTS=ESSB,EDDP,SKSM,EDDS,EDDM,EDDF,KJAC,KTOL From b89ffa9d5882179c8aee8a75777ec9d98eb68bbb Mon Sep 17 00:00:00 2001 From: Tobias Blomberg Date: Wed, 27 Mar 2024 22:10:21 +0100 Subject: [PATCH 2/2] Enable using different effects for trim and maximize --- src/svxlink/scripts/filter_sounds.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/svxlink/scripts/filter_sounds.sh b/src/svxlink/scripts/filter_sounds.sh index b2916ef6e..3e5bb1d84 100755 --- a/src/svxlink/scripts/filter_sounds.sh +++ b/src/svxlink/scripts/filter_sounds.sh @@ -90,6 +90,10 @@ if [ ! -r "${SRC_DIR}/filter_sounds.cfg" ]; then fi . "${SRC_DIR}/filter_sounds.cfg" +EFFECT="${EFFECT:-}" +MAXIMIZE_EFFECT="${MIXIMIZE_EFFECT:-$EFFECT}" +TRIM_EFFECT="${TRIM_EFFECT:-$EFFECT}" + # Check if the SUBDIRS config variable is set if [ -z "$SUBDIRS" ]; then echo "*** ERROR: Configuration variable SUBDIRS not set." @@ -115,9 +119,12 @@ for subdir in $SUBDIRS; do [ ! -d $(dirname $dest_clip) ] && mkdir -p $(dirname $dest_clip) if [ -r "$src_clip.raw" -o -r "$src_clip.wav" ]; then echo "Maximizing $src_clip -> $dest_clip.$ext" - $basedir/play_sound.sh -f$endian$encoding -r$target_rate \ - -l$SILENCE_LEVEL -e "$EFFECT" "$src_clip" | - sox ${SOX_RAW_SAMP_FMT} -r$target_rate - "$dest_clip.$ext" + $basedir/play_sound.sh -f$endian$encoding \ + -r$target_rate \ + -l$SILENCE_LEVEL \ + ${MAXIMIZE_EFFECT:+-e "$MAXIMIZE_EFFECT"} \ + "$src_clip" | + sox ${SOX_RAW_SAMP_FMT} -r$target_rate - "$dest_clip.$ext" else warning "Missing sound clip: $src_clip" fi @@ -129,9 +136,12 @@ for subdir in $SUBDIRS; do [ ! -d $(dirname "$dest_clip") ] && mkdir -p $(dirname "$dest_clip") if [ -r "$src_clip.raw" -o -r "$src_clip.wav" ]; then echo "Trimming $src_clip -> $dest_clip.$ext" - $basedir/play_sound.sh -tf$endian$encoding -r$target_rate \ - -l$SILENCE_LEVEL -e "$EFFECT" "$src_clip" | - sox ${SOX_RAW_SAMP_FMT} -r$target_rate - "$dest_clip.$ext" + $basedir/play_sound.sh -tf$endian$encoding \ + -r$target_rate \ + -l$SILENCE_LEVEL \ + ${TRIM_EFFECT:+-e "$TRIM_EFFECT"} \ + "$src_clip" | + sox ${SOX_RAW_SAMP_FMT} -r$target_rate - "$dest_clip.$ext" sox "$dest_clip.$ext" -r$target_rate ${SOX_RAW_SAMP_FMT} - >> /tmp/all_trimmed.raw else warning "Missing sound clip: $src_clip"