Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

envelope.h

Go to the documentation of this file.
00001 //
00002 // 1997/05/30 13:36:14
00003 //
00004 
00005 #ifndef ENVELOPE_H
00006 #define ENVELOPE_H
00007 
00008 //#include "mytypes.h"
00009 #include "opstruct.h"
00010 #include "epocglue.h"
00011 
00012 static const ubyte ENVE_STARTATTACK = 0;
00013 static const ubyte ENVE_STARTRELEASE = 2;
00014 
00015 static const ubyte ENVE_ATTACK = 4;
00016 static const ubyte ENVE_DECAY = 6;
00017 static const ubyte ENVE_SUSTAIN = 8;
00018 static const ubyte ENVE_RELEASE = 10;
00019 static const ubyte ENVE_SUSTAINDECAY = 12;
00020 static const ubyte ENVE_MUTE = 14;
00021 
00022 static const ubyte ENVE_STARTSHORTATTACK = 16;
00023 static const ubyte ENVE_SHORTATTACK = 16;
00024 
00025 static const ubyte ENVE_ALTER = 32;
00026 
00027 #if defined(SID_LINENVE)
00028 static const udword attackTabLen = 255;
00029 #endif
00030 
00034 #if defined (__SYMBIAN32__)
00035 class Envelope : public CBase
00036 #else
00037 class Envelope
00038 #endif
00039         {
00040         friend sidEmu;
00041         
00042   public:    // methods
00043         Envelope();
00044         virtual ~Envelope();
00045         //
00046         void enveEmuInit( udword updateFreq, bool measuredValues );
00047         void enveEmuResetOperator(struct sidOperator* pVoice);
00048         const ptr2sidUwordFunc* getEnveModeTable() const;
00049 
00050 //  private:   // methods TODO
00051         inline uword enveEmuStartAttack(struct sidOperator*) const;
00052         inline uword enveEmuStartDecay(struct sidOperator*) const;
00053         inline uword enveEmuStartRelease(struct sidOperator*) const;
00054         inline uword enveEmuAlterAttack(struct sidOperator*) const;
00055         inline uword enveEmuAlterDecay(struct sidOperator*) const;
00056         inline uword enveEmuAlterSustain(struct sidOperator*) const;
00057         inline uword enveEmuAlterSustainDecay(struct sidOperator*) const;
00058         inline uword enveEmuAlterRelease(struct sidOperator*) const;
00059         inline uword enveEmuAttack(struct sidOperator*) const;
00060         inline uword enveEmuDecay(struct sidOperator*) const;
00061         inline uword enveEmuSustain(struct sidOperator*) const;
00062         inline uword enveEmuSustainDecay(struct sidOperator*) const;
00063         inline uword enveEmuRelease(struct sidOperator*) const;
00064         inline uword enveEmuMute(struct sidOperator*) const;
00065 
00066         inline uword enveEmuStartShortAttack(struct sidOperator*) const;
00067         inline uword enveEmuAlterShortAttack(struct sidOperator*) const;
00068         inline uword enveEmuShortAttack(struct sidOperator*) const;
00069 
00070   public:    // members
00071         ubyte masterVolume;
00072         uword masterVolumeAmplIndex;
00073   private:   // members
00074         uword masterAmplModTable[16*256];
00075 
00076 #ifdef SID_FPUENVE
00077         float attackRates[16];
00078         float decayReleaseRates[16];  
00079 #elif defined(DIRECT_FIXPOINT)
00080         udword attackRates[16];
00081         udword decayReleaseRates[16];
00082 #else
00083         udword attackRates[16];
00084         udword attackRatesP[16];
00085         udword decayReleaseRates[16];  
00086         udword decayReleaseRatesP[16];  
00087 #endif
00088 
00089 
00090 #if !defined(SID_LINENVE)
00091         udword attackTabLen;
00092         udword attackPos[256];
00093 #endif
00094 
00095         udword releaseTabLen;
00096         udword releasePos[256];
00097  
00098         static const ptr2sidUwordFunc enveModeTable[32];
00099         
00100         }; // end, class
00101 
00102 #endif

Generated on Tue Feb 8 04:13:57 2005 for Esidplay by doxygen 1.3.3