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_GXAUDIOPIN_H 00019 #define GXLIB_GXAUDIOPIN_H 00020 00021 #include "../gx.h" 00022 class gxAudioFilter; 00023 class gxMidiOutputPin; 00024 class gxMidiTransform; 00025 class gxMidiDataQueue; 00026 00027 class gxAudioPin 00028 { 00029 protected: 00030 gxAudioPin() { }; 00031 00032 public: 00033 virtual ~gxAudioPin() { }; 00037 virtual gxAudioPin * getOtherPin() = 0; 00038 00044 virtual void enable( bool isEnabled ) = 0; 00050 virtual bool isEnabled() = 0; 00055 virtual std::string getId() = 0; 00056 00060 virtual std::string getName() = 0; 00061 00065 virtual bool isInput() = 0; 00066 00070 virtual gxAudioFilter * getFilter() = 0; 00071 00072 enum pintype_t 00073 { 00074 PINTYPE_DIRECTX_AUDIO = 1, 00075 PINTYPE_DIRECTX_MIDI = 2 00076 }; 00077 00078 virtual bool isPinType( pintype_t theType ) = 0; 00079 00083 virtual bool isMemberOf( const char * groupName ) = 0; 00087 virtual void joinGroup( const char * groupName ) = 0; 00091 virtual void leaveGroup( const char * groupName ) = 0; 00100 virtual void setMidiTransform( gxMidiTransform * transform, bool own = true) = 0; 00101 00106 virtual gxMidiTransform * getMidiTransform() = 0; 00107 00111 virtual int onMidiInput( gxMidiDataQueue * queue ) = 0; 00112 00113 private: 00114 gxAudioPin( const gxAudioPin & rhs); 00115 gxAudioPin & operator=( const gxAudioPin & rhs); 00116 }; 00117 #endif