gxAudioFactory.h

Go to the documentation of this file.
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_GXAUDIOFACTORY_H
00019 #define GXLIB_GXAUDIOFACTORY_H
00020 
00021 #include "../gx.h"
00022 
00023 class gxAudioFilter;
00024 class gxAudioGraph;
00025 class gxAudioDeviceEnumerator;
00026 class gxAudioFilterEnumerator;
00027 class gxMidiStatusMap;
00028 
00032 class gxAudioFactory
00033 {
00034 public:
00035    virtual ~gxAudioFactory();
00036 
00046    virtual int createFilter( const char * type, gxAudioFilter ** filter ) = 0;
00047 
00051    virtual int createGraph( gxAudioGraph ** graph ) = 0;
00052 
00058    virtual int createMidiMerge( int inPinCount, int outPinCount, gxAudioFilter ** midiMerge) = 0;
00059 
00063    virtual int createMidiThru( int outPinCount, gxAudioFilter ** midiThru) = 0;
00064 
00069    virtual int createMidiStatusMap( gxMidiStatusMap ** statusMap) = 0;
00070 
00074    virtual int createMixer(int inputPinCount, long sampleRate, long framesPerBuffer,
00075       gxAudioFilter ** mixer ) = 0;
00076 
00081    virtual int createNullSource( long sampleRate, long framesPerBuffer, 
00082       gxAudioFilter ** filter) = 0;
00086    virtual int enumAudioCards( gxAudioDeviceEnumerator ** devices ) = 0;
00087 
00088    virtual int enumFilters( gxAudioFilterEnumerator ** filters ) = 0;
00092    virtual int enumMidiInPorts( gxAudioDeviceEnumerator ** devices ) = 0;
00096    virtual int enumMidiOutPorts( gxAudioDeviceEnumerator ** devices ) = 0;
00106    virtual int openAudioCard( const char * deviceName, long * sampleRate, 
00107       long * framesPerBuffer, gxAudioFilter ** filter) = 0;
00108 
00113    virtual int createMidiInBank( gxAudioFilter ** inBank) = 0;
00114 
00119    virtual int createMidiOutBank( gxAudioFilter ** outBank) = 0;
00124    virtual int initialize() = 0;
00128    static gxAudioFactory * getInstance();
00129 
00130 protected:
00135    gxAudioFactory();
00136 private:
00137    gxAudioFactory( const gxAudioFactory & rhs);
00138    gxAudioFactory & operator=( const gxAudioFactory & rhs);
00139 };
00140 
00141 #endif

Generated on Mon Nov 21 01:01:35 2005 for gxLib by  doxygen 1.4.5