Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

/root/src/subsynth/syn/Module/IStreamModule.h

Go to the documentation of this file.
00001 
00002 /****************** <SYN heading BEGIN do not edit this line> *****************
00003  *
00004  * subsynth - modular audio synthesizer
00005  * subsynth is (C) Copyright 2001-2002 by Kevin Meinert
00006  *
00007  * Original Author: Kevin Meinert
00008  *
00009  * This library is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU Library General Public
00011  * License as published by the Free Software Foundation; either
00012  * version 2 of the License, or (at your option) any later version.
00013  *
00014  * This library is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017  * Library General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU Library General Public
00020  * License along with this library; if not, write to the
00021  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00022  * Boston, MA 02111-1307, USA.
00023  *
00024  * -----------------------------------------------------------------
00025  * File:          $RCSfile: IStreamModule.h,v $
00026  * Date modified: $Date: 2002/04/15 07:28:46 $
00027  * Version:       $Revision: 1.15 $
00028  * -----------------------------------------------------------------
00029  *
00030  ****************** <SYN heading END do not edit this line> ******************/
00031 
00032 #ifndef SUBSYNTH_ISTREAM_CONVERTER_MODULE_H
00033 #define SUBSYNTH_ISTREAM_CONVERTER_MODULE_H
00034 
00035 #include <map>
00036 #include "syn/Stream/AudioIStreamPtr.h"
00037 #include "syn/Core/SampleBuffer.h"
00038 #include "syn/Core/SampleBufferQueue.h"
00039 #include "syn/Core/Module.h"
00040 #include "syn/Core/Terminal.h"
00041 #include "syn/Core/Terminal.h"
00042 
00043 namespace syn
00044 {
00052    class IStreamModule : public Module
00053    {
00054    public:
00056       IStreamModule();
00057    
00059       virtual ~IStreamModule();
00060 
00062       virtual void update();
00063 
00065       virtual bool open();
00066 
00068       virtual bool isOpen();
00069       
00071       virtual void close();
00072       
00074       virtual Module* clone() const
00075       {
00076          IStreamModule* mod = new IStreamModule;
00077          //mod->setStream( mStream );
00078          assert( false && "broken" );
00079          mod->trigger( mTrigger );
00080          return mod;
00081       }
00082 
00086       virtual void getParam( const std::string& key, MultivariateType& value )
00087       {
00088       }
00089 
00091       virtual void setParam( const std::string& key, const MultivariateType& value )
00092       {
00093       }
00095    // methods new for this specialized module...
00096    public:
00098       void setStream( AudioIStreamPtr& istream );
00099       
00104       void trigger( float t = -1 );
00105       
00107       void release();
00108       
00109    private:
00110       TerminalPtr mAmplitudeControlInput;
00111       TerminalPtr mPitchControlInput, mTriggerControlInput;
00112       TerminalPtr mMonoAudioOutput;
00113 
00114       AudioIStreamPtr mStream;
00115       bool mTrigger;
00116       SampleBuffer1f* mWriteBuf;
00117 
00119       /*#  Terminal lnkTerminal; */
00120 
00122       /*#  Terminal lnkTerminal; */
00123    };  
00124 }
00125 #endif

Generated at Mon Apr 15 09:26:07 2002 for subsynth by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001