Skip to content

Commit

Permalink
Fix output detection when sox is enabled (fixes #14, fixes #21)
Browse files Browse the repository at this point in the history
  • Loading branch information
Elleo committed Nov 17, 2024
1 parent bb41004 commit a233412
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/templates.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
// on what is available on the system.
const String modelTemplate = """
GenericExecuteSynth "if command -v sox > /dev/null; then\\
PROCESS=\\'sox -r SAMPLE_RATE -c 1 -b 16 -e signed-integer -t raw - -t wav - tempo \$RATE pitch \$PITCH norm\\'; OUTPUT=\\'\$PLAY_COMMAND\\';\\
PROCESS=\\'sox -r SAMPLE_RATE -c 1 -b 16 -e signed-integer -t raw - -t wav - tempo \$RATE pitch \$PITCH norm\\';\\
if command -v paplay > /dev/null; then\\
OUTPUT=\\'\$PLAY_COMMAND\\';\\
else\\
OUTPUT=\\'aplay\\';\\
fi;\\
elif command -v paplay > /dev/null; then\\
PROCESS=\\'cat\\'; OUTPUT=\\'\$PLAY_COMMAND --raw --channels 1 --rate SAMPLE_RATE\\';\\
else\\
Expand Down

0 comments on commit a233412

Please sign in to comment.