#!/bin/bash

#   idjcskype(_): Skype(tm) launcher script for idjc
#   Copyright (C) 2005 Stephen Fairchild
#
#   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.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

artsd -F 15 -S 128 -r 44100 -a jack -d &
sleep 0.5
(artsdsp -m skype ; killall artsd) &
sleep 0.5
jack_disconnect alsa_pcm:capture_1 artsd:in_1
jack_disconnect alsa_pcm:capture_2 artsd:in_2
jack_disconnect artsd:out_1 alsa_pcm:playback_1
jack_disconnect artsd:out_2 alsa_pcm:playback_2
jack_connect idjc-mx:voip_send_lt artsd:in_1
jack_connect idjc-mx:voip_send_rt artsd:in_2
jack_connect artsd:out_1 idjc-mx:voip_recv_lt
jack_connect artsd:out_2 idjc-mx:voip_recv_rt
