8
# ALSA audio doesn't work on my SBLive, fall back to OSS
9
audioflags="-audio oss"
11
# ALSA sequencer support is always a nice feature
12
midiflags="-midi alsa -seq"
18
if test ! -d /proc/asound/seq; then
19
echo "ALSA sequencer not installed, falling back to OSS midi"
26
10
if [ $verbose = 1 ]; then
31
15
echo "startBristol [-explorer|-mini|-hammond|-b3|-dx|-juno|-prophet|-mixer|-vox|-pro10|-rhodes] [-oss|-alsa] [-libtest] [[-verbose|-v] -help|-h]"
33
17
echo "Press 'q' in any synth window to exit application"
34
echo "bristol -v -h for more verbose help output"
35
echo "You may want to give the /usr/bin/bristolengine suid root permissions"
18
echo "startBristol -v -h for more verbose help output"
19
echo "You may want to give the bin/bristolengine suid root permissions"
78
# Set the needed environment variables
61
# Nokey: Don't override BRISTOL if it's not already set
80
62
if [ -z "$BRISTOL" ]; then
81
63
declare -x BRISTOL=/usr/share/bristol
66
# Nokey: Does the BRISTOL directory actually exist?
84
67
if [ ! -d $BRISTOL ]; then
85
echo "incomplete installation of bristol"
68
# Apparently not. Let's try to make a guess as to where it is.
70
# Try to find out how we were started. If this script was in
71
# the PATH of the user, the $0 should have a leading '/'.
72
# This leading '/' would also be there if this script was
73
# executed as /full/path/name/startBristol
75
# If this script was started as ./"*whatever*" then we need
76
# to strip off the './' in order to accurately determine
77
# the BRISTOL directory
78
if [ "$(echo $STARTUP | cut -c 1-2)" = "./" ]; then
79
STARTUP=$(echo $STARTUP | cut -c 3-)
82
if [ "$(echo $STARTUP | cut -c 1)" = "/" ]; then
83
BIN_DIR=$(dirname $STARTUP)
85
BIN_DIR=$(dirname $PWD/$STARTUP)
88
declare -x BRISTOL=$(dirname $BIN_DIR)
93
# If slabhome already exists, we should take it rather than this definition.
95
declare -x SLAB_HOME=$BRISTOL
88
96
declare -x BRIGHTON=$BRISTOL
89
declare -x LD_LIBRARY_PATH=/usr/lib/bristol
98
declare -x LD_LIBRARY_PATH=/usr/lib/bristol:${BRISTOL}/lib
100
declare PATH=${PATH}:$BRISTOL/bin
102
# see if we should advise making the binary a suid root for FIFO scheduling
92
103
if [ ${EUID} -ne 0 ]; then
93
echo " You may want to make bristolengine a suid-root executable"
104
if [ `ls -l ${BRISTOL}/bin/bristolengine | awk '{printf $3}'` != "root" ]; then
105
echo " You may want to make bristolengine a suid-root executable"
106
elif [ ! -u ${BRISTOL}/bin/bristolengine ]; then
107
echo " You may want to make bristolengine a suid-root executable"
99
112
# bristolengine has flags for -oss or -alsa drivers, -preload buffers of
100
113
# -bufsize bytes (not samples):
103
116
if [ $engine = 1 ]; then
104
117
if [ $quiet = 0 ]; then
105
bristolengine -preload 4 -bufsize 1024 $audioflags $midiflags $* &
118
bristolengine -preload 4 -bufsize 1024 $* &
107
bristolengine -preload 4 -bufsize 1024 $audioflags $midiflags $* > /dev/null 2>&1 &
120
bristolengine -preload 4 -bufsize 1024 $* > /dev/null 2>&1 &
110
123
if [ $quiet = 0 ]; then
111
bristol.real $* -engine
113
bristol.real $* -engine > /dev/null 2>&1
126
bristol $* -engine > /dev/null 2>&1