-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CPAL cannot be used on Organelle. * Using default audio device gives a EPIPE error in snd_pcm_start() * Specifying device `default=CARD=Codec` fails because of RustAudio/cpal#615 * Using JACK backend fails for reasons I didn't investigate - the `feedback` example fails with 'unsupported configuration' even though it's clearly using a supported configuration. JACK is available on Organelle and can play sound, we just need to start it in the run.sh script. I don't have time to fix any of the CPAL problems so let's switch to JACK for everything. This can also be tested locally on desktop, but see: RustAudio/rust-jack#142
- Loading branch information
Showing
4 changed files
with
229 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,38 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
./boucle_organelle | ||
set -em | ||
|
||
echo "boucle run.sh" | ||
|
||
FW_SCRIPTS_DIR=/root/fw_dir/scripts | ||
|
||
$FW_SCRIPTS_DIR/start-jack.sh | ||
echo "Started jackd as $(cat /tmp/pids/jack.pid)" | ||
|
||
jack_wait --wait | ||
|
||
export RUST_LOG=warn | ||
./boucle_organelle & | ||
echo $! > /tmp/pids/boucle_organelle.pid | ||
echo "Started boucle_organelle as $(cat /tmp/pids/boucle_organelle.pid)" | ||
|
||
trap 'echo "Received SIGINT"; $FW_SCRIPTS_DIR/killpatch.sh; jack_wait --quit' SIGINT | ||
trap 'echo "Received EXIT/ERR/TERM"; $FW_SCRIPTS_DIR/killpatch.sh; jack_wait --quit' EXIT ERR SIGTERM | ||
|
||
while ! jack_lsp boucle | grep --silent boucle:boucle_in; do | ||
echo "Waiting for patch audio ports..." | ||
jack_lsp boucle | ||
sleep 1 | ||
done | ||
# Sleep after ports appear so they are active: otherwise you see errors: | ||
# | ||
# cannot connect ports owned by inactive clients; "boucle" is not active | ||
sleep 1 | ||
|
||
echo "Connecting ports" | ||
jack_connect boucle:boucle_in system:capture_1 | ||
jack_connect boucle:boucle_in system:capture_2 | ||
jack_connect boucle:boucle_out system:playback_1 | ||
jack_connect boucle:boucle_out system:playback_2 | ||
|
||
fg %1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters