No audio through headphone jack


I installed Sonic-pi, on my Raspberry Pi 4. Can’t switch audio from HDMI to headphone output. The headphone output works fine when I play a Youtube video, but sonic-pi only outputs via my hdmi display. I set the OS preferences to analog. New to sonic-pi, I am sure I ammissing something, if any one can help I would appreciate it.

On my RPi3 I had to set the preference to headphone jack and then restart sonic. Or restart the RPi? Not sure which but both are worth trying.

Yes you have to select the audio output required BEFORE starting Sonic Pi. It uses the value which is the current default when it starts, and you can’t change it without stopping Sonic Pi, changing the default, then restarting it.

Solved! Turning on the audio preferences on the computer before starting the Sonic Pi, ( latest version) got the audio going through the headphone jack. Thanks very much for the help