#!/bin/sh

# laucher.sh - Disable PulseAudio before launching a JACKD based program
# Copyright © 2011 Alessio Treglia <alessio@debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

PROGRAM="/usr/lib/qjackctl/qjackctl.real"
PASUSPENDER="`whereis -b pasuspender | cut -d ':' -f 2 | tr -d ' '`"

( [ -x "${PASUSPENDER}" ] && ${PASUSPENDER} -- ${PROGRAM} ${@} ) || ${PROGRAM} ${@}

exit 0
