File: feedjack-client.bin

package info (click to toggle)
jacktrip 2.7.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,804 kB
  • sloc: cpp: 44,416; sh: 965; makefile: 152; ansic: 32; ruby: 20; python: 15
file content (81 lines) | stat: -rw-r--r-- 1,725 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/bash

if test $# -ne 2; then
    echo usage: $0 [client-number] [program]
    echo  client-number is 1-12
    echo  program is like a max patch or something

    exit -1
fi

echo I hope you died
echo Someday this script to check to see if Max or MiniAudicle or jacktrip.. are sunning...
#die


echo Launching Jack \(in the background\) and requiring MOTU
feedjack-launchjack &

if [ $? -eq 0 ]
then
    echo Jack seems to have launched OK.
else
    echo Had to set system to MOTU - please try again
    exit 1
fi

# a little time for Jack to get settled
sleep 2


echo Launching Jacktrip client
feedjack-launch-one-jacktrip-client $1 &

# We can't check to see if it was successful because we have to launch
# it in the background

# if [ $? -eq 0 ]
# then
#    echo Jacktrip client seems to have launched OK.
# else
#    echo Could not launch jacktrip client - try again.
#    exit 1
# fi


# Disconnect All - workaround to problem of jacktrip auto-connecting
# to system audio.  We'll do feedjack-clientconnect later anyway.
~/slork/bin/jmess-1.0.3 -D


echo your program is \"$2\"

# Now see what to launch on the client side

if [ "$2" = "remotespeaker" ]
then
    sleep 10
    echo This machine will just be a remote speaker
    feedjack-remotespeakerconnect
else

    # should check to see whether Max is really needed...
    echo launching max
    open ~/slork/users/matt/max-choose-JackRouter.maxpat
    
    sleep 2

    echo launching the program you asked for:
    echo $2
    open-in-dir $2



    echo Waiting for Max and Jacktrip to finish initializing
    sleep 10

    echo trying feedjack-clientconnect - You may need to run it again
    echo     feedjack-clientconnect

    feedjack-clientconnect
fi