00001 /* Copyright (C) 2004 Guido Simone 00002 * 00003 * This program is free software; you can redistribute it and/or modify 00004 * it under the terms of the GNU General Public License as published by 00005 * the Free Software Foundation; either version 2 of the License, or 00006 * (at your option) any later version. 00007 * 00008 * This program is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 * GNU General Public License for more details. 00012 00013 * You should have received a copy of the GNU General Public License 00014 * along with this program; if not, write to the Free Software 00015 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 */ 00017 00018 #ifndef GXLIB_GXAUDIOGRAPH_H 00019 #define GXLIB_GXAUDIOGRAPH_H 00020 00021 #include "../gx.h" 00022 00023 class gxAudioFilter; 00024 class gxAudioPin; 00025 class gxAudioFilterVisitor; 00026 00032 class gxAudioGraph 00033 { 00034 protected: 00035 gxAudioGraph() { }; 00036 00037 public: 00038 virtual ~gxAudioGraph() { }; 00039 00040 enum audio_graph_errors 00041 { 00042 DuplicateFilterName = 1000 00043 }; 00044 virtual bool accept( gxAudioFilterVisitor * visitor, bool alsoVisitPins = false ) = 0; 00052 virtual int addFilter( gxAudioFilter * filter, const char * name) = 0; 00058 virtual int connectPins( gxAudioPin * outPin, gxAudioPin * inPin ) = 0; 00062 virtual int disconnectPin( gxAudioPin * pin ) = 0; 00067 virtual gxAudioFilter * findFilter( const char * name ) = 0; 00071 virtual int pause() = 0; 00078 virtual int removeFilter( gxAudioFilter * filter ) = 0; 00079 00083 virtual int run() = 0; 00084 00085 virtual int sendMidi( gxAudioPin * pin, midi_message_t message ) = 0; 00089 virtual int stop() = 0; 00090 private: 00091 gxAudioGraph( const gxAudioGraph & rhs); 00092 gxAudioGraph & operator=( const gxAudioGraph & rhs); 00093 }; 00094 #endif