/[svn]/libgig/trunk/src/gig.h
ViewVC logotype

Diff of /libgig/trunk/src/gig.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2639 by schoenebeck, Mon Jun 16 13:22:50 2014 UTC revision 2682 by schoenebeck, Mon Dec 29 16:25:51 2014 UTC
# Line 69  Line 69 
69  namespace gig {  namespace gig {
70    
71      typedef std::string String;      typedef std::string String;
72        typedef RIFF::progress_t progress_t;
73    
74      /** Lower and upper limit of a range. */      /** Lower and upper limit of a range. */
75      struct range_t {      struct range_t {
# Line 311  namespace gig { Line 312  namespace gig {
312          unsigned long loop_cycles_left;  ///< How many times the loop has still to be passed, this value will be decremented with each loop cycle.          unsigned long loop_cycles_left;  ///< How many times the loop has still to be passed, this value will be decremented with each loop cycle.
313      };      };
314    
     /**  
      * @brief Used for indicating the progress of a certain task.  
      *  
      * The function pointer argument has to be supplied with a valid  
      * function of the given signature which will then be called on  
      * progress changes. An equivalent progress_t structure will be passed  
      * back as argument to the callback function on each progress change.  
      * The factor field of the supplied progress_t structure will then  
      * reflect the current progress as value between 0.0 and 1.0. You might  
      * want to use the custom field for data needed in your callback  
      * function.  
      */  
     struct progress_t {  
         void (*callback)(progress_t*); ///< Callback function pointer which has to be assigned to a function for progress notification.  
         float factor;                  ///< Reflects current progress as value between 0.0 and 1.0.  
         void* custom;                  ///< This pointer can be used for arbitrary data.  
         float __range_min;             ///< Only for internal usage, do not modify!  
         float __range_max;             ///< Only for internal usage, do not modify!  
         progress_t();  
     };  
   
315      // just symbol prototyping      // just symbol prototyping
316      class File;      class File;
317      class Instrument;      class Instrument;
# Line 467  namespace gig { Line 447  namespace gig {
447              using DLS::Sampler::DeleteSampleLoop;              using DLS::Sampler::DeleteSampleLoop;
448              // overridden methods              // overridden methods
449              virtual void SetGain(int32_t gain);              virtual void SetGain(int32_t gain);
450              virtual void UpdateChunks();              virtual void UpdateChunks(progress_t* pProgress);
451              virtual void CopyAssign(const DimensionRegion* orig);              virtual void CopyAssign(const DimensionRegion* orig);
452          protected:          protected:
453              uint8_t* VelocityTable; ///< For velocity dimensions with custom defined zone ranges only: used for fast converting from velocity MIDI value to dimension bit number.              uint8_t* VelocityTable; ///< For velocity dimensions with custom defined zone ranges only: used for fast converting from velocity MIDI value to dimension bit number.
# Line 647  namespace gig { Line 627  namespace gig {
627              unsigned long ReadAndLoop(void* pBuffer, unsigned long SampleCount, playback_state_t* pPlaybackState, DimensionRegion* pDimRgn, buffer_t* pExternalDecompressionBuffer = NULL);              unsigned long ReadAndLoop(void* pBuffer, unsigned long SampleCount, playback_state_t* pPlaybackState, DimensionRegion* pDimRgn, buffer_t* pExternalDecompressionBuffer = NULL);
628              unsigned long Write(void* pBuffer, unsigned long SampleCount);              unsigned long Write(void* pBuffer, unsigned long SampleCount);
629              Group*        GetGroup() const;              Group*        GetGroup() const;
630              virtual void  UpdateChunks();              virtual void  UpdateChunks(progress_t* pProgress);
631              void CopyAssignMeta(const Sample* orig);              void CopyAssignMeta(const Sample* orig);
632              void CopyAssignWave(const Sample* orig);              void CopyAssignWave(const Sample* orig);
633          protected:          protected:
# Line 735  namespace gig { Line 715  namespace gig {
715              void             SetDimensionType(dimension_t oldType, dimension_t newType);              void             SetDimensionType(dimension_t oldType, dimension_t newType);
716              // overridden methods              // overridden methods
717              virtual void     SetKeyRange(uint16_t Low, uint16_t High);              virtual void     SetKeyRange(uint16_t Low, uint16_t High);
718              virtual void     UpdateChunks();              virtual void     UpdateChunks(progress_t* pProgress);
719              virtual void     CopyAssign(const Region* orig);              virtual void     CopyAssign(const Region* orig);
720          protected:          protected:
721              Region(Instrument* pInstrument, RIFF::List* rgnList);              Region(Instrument* pInstrument, RIFF::List* rgnList);
# Line 885  namespace gig { Line 865  namespace gig {
865          protected:          protected:
866              Script(ScriptGroup* group, RIFF::Chunk* ckScri);              Script(ScriptGroup* group, RIFF::Chunk* ckScri);
867              virtual ~Script();              virtual ~Script();
868              void UpdateChunks();              void UpdateChunks(progress_t* pProgress);
869              void RemoveAllScriptReferences();              void RemoveAllScriptReferences();
870              friend class ScriptGroup;              friend class ScriptGroup;
871              friend class Instrument;              friend class Instrument;
# Line 918  namespace gig { Line 898  namespace gig {
898              ScriptGroup(File* file, RIFF::List* lstRTIS);              ScriptGroup(File* file, RIFF::List* lstRTIS);
899              virtual ~ScriptGroup();              virtual ~ScriptGroup();
900              void LoadScripts();              void LoadScripts();
901              void UpdateChunks();              void UpdateChunks(progress_t* pProgress);
902              friend class Script;              friend class Script;
903              friend class File;              friend class File;
904          private:          private:
# Line 956  namespace gig { Line 936  namespace gig {
936              Region*   GetNextRegion();              Region*   GetNextRegion();
937              Region*   AddRegion();              Region*   AddRegion();
938              void      DeleteRegion(Region* pRegion);              void      DeleteRegion(Region* pRegion);
939              virtual void UpdateChunks();              virtual void UpdateChunks(progress_t* pProgress);
940              virtual void CopyAssign(const Instrument* orig);              virtual void CopyAssign(const Instrument* orig);
941              // own methods              // own methods
942              Region*   GetRegion(unsigned int Key);              Region*   GetRegion(unsigned int Key);
# Line 1024  namespace gig { Line 1004  namespace gig {
1004          protected:          protected:
1005              Group(File* file, RIFF::Chunk* ck3gnm);              Group(File* file, RIFF::Chunk* ck3gnm);
1006              virtual ~Group();              virtual ~Group();
1007              virtual void UpdateChunks();              virtual void UpdateChunks(progress_t* pProgress);
1008              void MoveAll();              void MoveAll();
1009              friend class File;              friend class File;
1010          private:          private:
# Line 1080  namespace gig { Line 1060  namespace gig {
1060              ScriptGroup* AddScriptGroup();              ScriptGroup* AddScriptGroup();
1061              void        DeleteScriptGroup(ScriptGroup* pGroup);              void        DeleteScriptGroup(ScriptGroup* pGroup);
1062              virtual    ~File();              virtual    ~File();
1063              virtual void UpdateChunks();              virtual void UpdateChunks(progress_t* pProgress);
1064          protected:          protected:
1065              // overridden protected methods from DLS::File              // overridden protected methods from DLS::File
1066              virtual void LoadSamples();              virtual void LoadSamples();

Legend:
Removed from v.2639  
changed lines
  Added in v.2682

  ViewVC Help
Powered by ViewVC