File: mscore.sh

package info (click to toggle)
mscore 0.9.2%2Bdfsg-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 15,740 kB
  • ctags: 8,260
  • sloc: cpp: 71,800; xml: 11,363; sh: 323; makefile: 156
file content (27 lines) | stat: -rw-r--r-- 504 bytes parent folder | download
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
#!/bin/sh
PATH=/bin:/usr/bin:/sbin:/usr/sbin
MSCORE=$(which mscore.real)
PULSEAUDIO=$(pgrep -f pulseaudio > /dev/null)

if $PULSEAUDIO; then

	PACTL=$(which pactl)
	JACK=$($PACTL list | grep jack-sink)
	PASUSPENDER=$(which pasuspender)

	if [ $PACTL -a $JACK ]; then
		echo "Using JACK for audio";
		$MSCORE "$@";
	elif [ $PASUSPENDER ]; then
		echo "Suspending PulseAudio";
		$PASUSPENDER -- $MSCORE "$@";
	else
		echo "Warning: Cannot suspend PulseAudio";
		$MSCORE "$@";
	fi

else

	$MSCORE "$@";

fi