CLAM-Development
1.1
|
00001 /* 00002 * Copyright (c) 2001-2004 MUSIC TECHNOLOGY GROUP (MTG) 00003 * UNIVERSITAT POMPEU FABRA 00004 * 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 */ 00021 00022 #ifndef __AudioIO__ 00023 #define __AudioIO__ 00024 00025 #include "Audio.hxx" 00026 #include "Processing.hxx" 00027 00028 #ifdef WIN32 00029 //#define DEFAULT_AUDIO_ARCH "directx" 00030 //#define DEFAULT_AUDIO_ARCH "portaudio" 00031 #define DEFAULT_AUDIO_ARCH "rtaudio" 00032 #else 00033 #ifdef linux 00034 #define DEFAULT_AUDIO_ARCH "alsa" 00035 #else 00036 #define DEFAULT_AUDIO_ARCH "rtaudio" 00037 #endif 00038 #endif 00039 00040 namespace CLAM { 00041 00050 class AudioIOConfig: public ProcessingConfig 00051 { 00052 public: 00053 DYNAMIC_TYPE_USING_INTERFACE (AudioIOConfig, 4, ProcessingConfig); 00055 DYN_ATTRIBUTE (0, public, std::string, Device); 00057 DYN_ATTRIBUTE (1, public, int, ChannelID); 00059 DYN_ATTRIBUTE (2, public, int, FrameSize); 00061 DYN_ATTRIBUTE (3, public, int, SampleRate); 00062 protected: 00063 void DefaultInit(void) 00064 { 00065 AddAll(); 00066 UpdateData(); 00067 00068 SetDevice("default:default"); 00069 SetChannelID(0); 00070 SetSampleRate(0); /* leave it to the device */ 00071 SetFrameSize(512); 00072 } 00073 }; 00074 00075 00076 } 00077 00078 #endif 00079