Skip to content

Commit

Permalink
Merge branch 'master' into dl1hrc-reflector-ptyctrl
Browse files Browse the repository at this point in the history
  • Loading branch information
sm0svx committed Mar 30, 2024
2 parents 7f362f9 + b89ffa9 commit b4c0117
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
10 changes: 6 additions & 4 deletions src/svxlink/modules/metarinfo/ModuleMetarInfo.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
22 changes: 16 additions & 6 deletions src/svxlink/scripts/filter_sounds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand All @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit b4c0117

Please sign in to comment.