|
|
@ -11,7 +11,9 @@ restoreaudio() { |
|
|
|
record() { |
|
|
|
record() { |
|
|
|
TEMPFILE="$(mktemp --suffix=.wav)" |
|
|
|
TEMPFILE="$(mktemp --suffix=.wav)" |
|
|
|
NOW="$(date '+%y%m%d_%H%M%S')" |
|
|
|
NOW="$(date '+%y%m%d_%H%M%S')" |
|
|
|
|
|
|
|
sxmo_megiaudioroute "$1" |
|
|
|
st -e arecord -vv -f cd -c 1 "$TEMPFILE" |
|
|
|
st -e arecord -vv -f cd -c 1 "$TEMPFILE" |
|
|
|
|
|
|
|
restoreaudio |
|
|
|
DUR="$( |
|
|
|
DUR="$( |
|
|
|
mediainfo "$TEMPFILE" | |
|
|
|
mediainfo "$TEMPFILE" | |
|
|
|
grep ^Duration | |
|
|
|
grep ^Duration | |
|
|
@ -34,7 +36,6 @@ record() { |
|
|
|
dmenu -p "$DUR" -fn Terminus-18 -c -l 10 |
|
|
|
dmenu -p "$DUR" -fn Terminus-18 -c -l 10 |
|
|
|
)" |
|
|
|
)" |
|
|
|
if echo "$PICK" | grep "Playback"; then |
|
|
|
if echo "$PICK" | grep "Playback"; then |
|
|
|
restoreaudio |
|
|
|
|
|
|
|
st -e mpv -v "$FILE" |
|
|
|
st -e mpv -v "$FILE" |
|
|
|
elif echo "$PICK" | grep "Delete Recording"; then |
|
|
|
elif echo "$PICK" | grep "Delete Recording"; then |
|
|
|
rm "$FILE" |
|
|
|
rm "$FILE" |
|
|
@ -54,16 +55,12 @@ while true; do |
|
|
|
)" |
|
|
|
)" |
|
|
|
|
|
|
|
|
|
|
|
if [ "$OPTION" = "Line Jack" ]; then |
|
|
|
if [ "$OPTION" = "Line Jack" ]; then |
|
|
|
sxmo_megiaudioroute -l |
|
|
|
record -l |
|
|
|
record |
|
|
|
|
|
|
|
elif [ "$OPTION" = "Microphone" ]; then |
|
|
|
elif [ "$OPTION" = "Microphone" ]; then |
|
|
|
sxmo_megiaudioroute -m |
|
|
|
record -m |
|
|
|
record |
|
|
|
|
|
|
|
elif echo "$OPTION" | grep "Recordings$"; then |
|
|
|
elif echo "$OPTION" | grep "Recordings$"; then |
|
|
|
restoreaudio |
|
|
|
|
|
|
|
sxmo_files.sh "$RECDIR" |
|
|
|
sxmo_files.sh "$RECDIR" |
|
|
|
elif [ "$OPTION" = "Close Menu" ]; then |
|
|
|
elif [ "$OPTION" = "Close Menu" ]; then |
|
|
|
restoreaudio |
|
|
|
|
|
|
|
exit 0 |
|
|
|
exit 0 |
|
|
|
fi |
|
|
|
fi |
|
|
|
done |
|
|
|
done |
|
|
|