kopia lustrzana https://github.com/M17-Project/M17_Implementations
hopefully final fix
rodzic
0c83484dce
commit
2c21bfbabf
|
@ -15,11 +15,8 @@ str=$4
|
|||
#get the size in bytes
|
||||
len=$(echo -n "$str" | wc -c) #get UTF-8 encoded length in bytes
|
||||
len=$((len+2)) #add 2 additional bytes (0x05 and 0x00)
|
||||
len_chars=${#str} #get length in characters rather than bytes
|
||||
|
||||
#echo the message to the encoder
|
||||
str1=${str:0:$((len_chars-1))}
|
||||
str2=${str: -1}
|
||||
echo -en "\x05"$str1$str2"\x00" | m17-packet-encode -S $2 -D $1 -C $3 -n $len -o $5
|
||||
echo -en '\x05'$str'\x00' | m17-packet-encode -S $2 -D $1 -C $3 -n $len -o $5
|
||||
sox -t raw -r 48000 -b 16 -c 1 -L -e signed-integer $5 $5".wav"
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue