More jack overruns with autostart

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi list,

I have a SuperCollider project that I wish to run headless on a Raspberry Pi 3. While it has no GUI, one of the classes that I defined inherits from another QT dependent class so it's necessary to use Xvfb when not using X forwardin over ssh or running headless.

To test, I'm using SuperCollider file (.scd) which pushes the Pi quite a bit, to the point where there are occasional jack overruns when I launch sclang and the scd file manually in a terminal. It's pushed hard, but does run without failing.

What I'm having trouble with is getting it to run from startup. When I run it manually, the 4 CPU cores of the Pi are running at between 40 and 55% capacity. All fine. However when I run from startup (and if I'm able to make a reading before it locks up), the CPUs run at between 70-100%. I am able to run less demanding scd files with no problems at startup, just not the more demanding ones.

To run from startup  there is a crontab entry for the user pi with the following:

@reboot cd /home/pi && ./runproject.sh

The runproject.sh script contains the following:

#!/bin/bash
PATH=$PATH:/usr/local/bin
sleep 10
export DISPLAY=:99
Xvfb $DISPLAY -screen 0 1024x768x16 &
sleep 5
/usr/bin/jackd -P75 -dalsa -dhw:0 -r44100 -p1024 -n3 -P&
sleep 15
cd /home/pi
sclang project.scd
exit 0

It's not normally necessary to run jackd independently of sclang, but I found it helped to avoid heavy distortion from overruns. I'm experimenting with various sleep values in various positions too, but I can't seem to emulate a manual start in the terminal. Usually, when running demanding scd files, an autostart from cron results in far more overruns or the system freezing up entirely. I've piped the standard out sclang to file and there's no errors.

Can anyone suggest a better approach?

Thanks,

Iain

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
https://lists.linuxaudio.org/listinfo/linux-audio-user




[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux