00001 /********** 00002 This library is free software; you can redistribute it and/or modify it under 00003 the terms of the GNU Lesser General Public License as published by the 00004 Free Software Foundation; either version 2.1 of the License, or (at your 00005 option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.) 00006 00007 This library is distributed in the hope that it will be useful, but WITHOUT 00008 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00009 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 00010 more details. 00011 00012 You should have received a copy of the GNU Lesser General Public License 00013 along with this library; if not, write to the Free Software Foundation, Inc., 00014 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00015 **********/ 00016 // Copyright (c) 1996-2003, Live Networks, Inc. All rights reserved 00017 // A program that prints out this computer's audio input ports 00018 00019 #include "AudioInputDevice.hh" 00020 #include <stdio.h> 00021 00022 int main(int argc, char** argv) { 00023 AudioPortNames* portNames = AudioInputDevice::getPortNames(); 00024 if (portNames == NULL) { 00025 fprintf(stderr, "AudioInputDevice::getPortNames() failed!\n"); 00026 exit(1); 00027 } 00028 00029 printf("%d available audio input ports:\n", portNames->numPorts); 00030 for (unsigned i = 0; i < portNames->numPorts; ++i) { 00031 printf("%d\t%s\n", i, portNames->portName[i]); 00032 } 00033 00034 return 0; 00035 }
1.5.5