/*---------------------------------------------------------------------------*\ FILE....: PLAY.CPP TYPE....: C++ Console program AUTHOR..: David Rowe DATE....: 10/5/01 This program plays a wave file. \*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*\ Voicetronix Voice Processing Board (VPB) Software Copyright (C) 1999-2001 Voicetronix www.voicetronix.com.au This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA \*---------------------------------------------------------------------------*/ #include #include #include #include #include "../src/vpbapi.h" #include "../src/verbose.h" int main(int argc, char * argv[]) { int h; if (argc != 3) { printf("usage: playwav WaveFile ChNum[1..4]\n"); exit(0); } vpb_seterrormode(VPB_DEVELOPMENT); h = vpb_open(1,atoi(argv[2])); vpb_sethook_sync(h, VPB_OFFHOOK); vpb_play_file_sync(h, argv[1]); vpb_sethook_sync(h, VPB_ONHOOK); vpb_close(h); return 0; }