/[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 3731 by schoenebeck, Sat Feb 1 15:35:07 2020 UTC revision 3952 by schoenebeck, Sat Jun 19 09:10:33 2021 UTC
# Line 2  Line 2 
2   *                                                                         *   *                                                                         *
3   *   libgig - C++ cross-platform Gigasampler format file access library    *   *   libgig - C++ cross-platform Gigasampler format file access library    *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003-2020 by Christian Schoenebeck                      *   *   Copyright (C) 2003-2021 by Christian Schoenebeck                      *
6   *                              <cuse@users.sourceforge.net>               *   *                              <cuse@users.sourceforge.net>               *
7   *                                                                         *   *                                                                         *
8   *   This library is free software; you can redistribute it and/or modify  *   *   This library is free software; you can redistribute it and/or modify  *
# Line 857  namespace gig { Line 857  namespace gig {
857              bool VerifyWaveData(uint32_t* pActually = NULL);              bool VerifyWaveData(uint32_t* pActually = NULL);
858          protected:          protected:
859              static size_t        Instances;               ///< Number of instances of class Sample.              static size_t        Instances;               ///< Number of instances of class Sample.
860              static buffer_t      InternalDecompressionBuffer; ///< Buffer used for decompression as well as for truncation of 24 Bit -> 16 Bit samples.              static buffer_t      InternalDecompressionBuffer; ///< Buffer used for decompression of samples, and only if no external decompression buffer was supplied.
861              Group*               pGroup;                  ///< pointer to the Group this sample belongs to (always not-NULL)              Group*               pGroup;                  ///< pointer to the Group this sample belongs to (always not-NULL)
862              file_offset_t        FrameOffset;             ///< Current offset (sample points) in current sample frame (for decompression only).              file_offset_t        FrameOffset;             ///< Current offset (sample points) in current sample frame (for decompression only).
863              file_offset_t*       FrameTable;              ///< For positioning within compressed samples only: stores the offset values for each frame.              file_offset_t*       FrameTable;              ///< For positioning within compressed samples only: stores the offset values for each frame.
# Line 1231  namespace gig { Line 1231  namespace gig {
1231          public:          public:
1232              String   Name; ///< Name of this script group. For example to be displayed in an instrument editor.              String   Name; ///< Name of this script group. For example to be displayed in an instrument editor.
1233    
1234              Script*  GetScript(uint index);              Script*  GetScript(size_t index);
1235              Script*  AddScript();              Script*  AddScript();
1236              void     DeleteScript(Script* pScript);              void     DeleteScript(Script* pScript);
1237          protected:          protected:
# Line 1245  namespace gig { Line 1245  namespace gig {
1245          private:          private:
1246              File*                pFile;              File*                pFile;
1247              RIFF::List*          pList; ///< 'RTIS' list chunk              RIFF::List*          pList; ///< 'RTIS' list chunk
1248              std::list<Script*>*  pScripts;              std::vector<Script*>* pScripts;
1249      };      };
1250    
1251      /** @brief Provides access to a Gigasampler/GigaStudio instrument.      /** @brief Provides access to a Gigasampler/GigaStudio instrument.
# Line 1287  namespace gig { Line 1287  namespace gig {
1287              // derived methods from DLS::Resource              // derived methods from DLS::Resource
1288              using DLS::Resource::GetParent;              using DLS::Resource::GetParent;
1289              // overridden methods              // overridden methods
1290              Region*   GetFirstRegion();              Region*   GetRegionAt(size_t pos);
1291              Region*   GetNextRegion();              Region*   GetFirstRegion() LIBGIG_DEPRECATED_API("Use GetRegionAt() instead.");
1292                Region*   GetNextRegion() LIBGIG_DEPRECATED_API("Use GetRegionAt() instead.");
1293              Region*   AddRegion();              Region*   AddRegion();
1294              void      DeleteRegion(Region* pRegion);              void      DeleteRegion(Region* pRegion);
1295              void      MoveTo(Instrument* dst);              void      MoveTo(Instrument* dst);
# Line 1302  namespace gig { Line 1303  namespace gig {
1303              MidiRuleAlternator*  AddMidiRuleAlternator();              MidiRuleAlternator*  AddMidiRuleAlternator();
1304              void      DeleteMidiRule(int i);              void      DeleteMidiRule(int i);
1305              // real-time instrument script methods              // real-time instrument script methods
1306              Script*   GetScriptOfSlot(uint index);              Script*   GetScriptOfSlot(size_t index);
1307              void      AddScriptSlot(Script* pScript, bool bypass = false);              void      AddScriptSlot(Script* pScript, bool bypass = false);
1308              void      SwapScriptSlots(uint index1, uint index2);              void      SwapScriptSlots(uint index1, uint index2);
1309              void      RemoveScriptSlot(uint index);              void      RemoveScriptSlot(uint index);
# Line 1364  namespace gig { Line 1365  namespace gig {
1365          public:          public:
1366              String Name; ///< Stores the name of this Group.              String Name; ///< Stores the name of this Group.
1367    
1368              Sample* GetFirstSample();              Sample* GetSample(size_t index);
1369              Sample* GetNextSample();              Sample* GetFirstSample() LIBGIG_DEPRECATED_API("Use GetSample() instead.");
1370                Sample* GetNextSample() LIBGIG_DEPRECATED_API("Use GetSample() instead.");
1371              void AddSample(Sample* pSample);              void AddSample(Sample* pSample);
1372          protected:          protected:
1373              Group(File* file, RIFF::Chunk* ck3gnm);              Group(File* file, RIFF::Chunk* ck3gnm);
# Line 1377  namespace gig { Line 1379  namespace gig {
1379          private:          private:
1380              File*        pFile;              File*        pFile;
1381              RIFF::Chunk* pNameChunk; ///< '3gnm' chunk              RIFF::Chunk* pNameChunk; ///< '3gnm' chunk
1382                size_t       SamplesIterator; ///< Used by GetFirstSample(), GetNextSample() only.
1383      };      };
1384    
1385      /** @brief Provides convenient access to Gigasampler/GigaStudio .gig files.      /** @brief Provides convenient access to Gigasampler/GigaStudio .gig files.
# Line 1438  namespace gig { Line 1441  namespace gig {
1441              // overridden  methods              // overridden  methods
1442              File();              File();
1443              File(RIFF::File* pRIFF);              File(RIFF::File* pRIFF);
1444              Sample*     GetFirstSample(progress_t* pProgress = NULL); ///< Returns a pointer to the first <i>Sample</i> object of the file, <i>NULL</i> otherwise.              Sample*     GetFirstSample(progress_t* pProgress = NULL) LIBGIG_DEPRECATED_API("Use GetSample() instead.");
1445              Sample*     GetNextSample();      ///< Returns a pointer to the next <i>Sample</i> object of the file, <i>NULL</i> otherwise.              Sample*     GetNextSample() LIBGIG_DEPRECATED_API("Use GetSample() instead.");
1446              Sample*     GetSample(uint index);              Sample*     GetSample(size_t index, progress_t* pProgress = NULL);
1447              Sample*     AddSample();              Sample*     AddSample();
1448              size_t      CountSamples();              size_t      CountSamples();
1449              void        DeleteSample(Sample* pSample);              void        DeleteSample(Sample* pSample);
1450              Instrument* GetFirstInstrument(); ///< Returns a pointer to the first <i>Instrument</i> object of the file, <i>NULL</i> otherwise.              Instrument* GetFirstInstrument() LIBGIG_DEPRECATED_API("Use GetInstrument() instead.");
1451              Instrument* GetNextInstrument();  ///< Returns a pointer to the next <i>Instrument</i> object of the file, <i>NULL</i> otherwise.              Instrument* GetNextInstrument() LIBGIG_DEPRECATED_API("Use GetInstrument() instead.");
1452              Instrument* GetInstrument(uint index, progress_t* pProgress = NULL);              Instrument* GetInstrument(size_t index, progress_t* pProgress = NULL);
1453              Instrument* AddInstrument();              Instrument* AddInstrument();
1454              Instrument* AddDuplicateInstrument(const Instrument* orig);              Instrument* AddDuplicateInstrument(const Instrument* orig);
1455              size_t      CountInstruments();              size_t      CountInstruments();
1456              void        DeleteInstrument(Instrument* pInstrument);              void        DeleteInstrument(Instrument* pInstrument);
1457              Group*      GetFirstGroup(); ///< Returns a pointer to the first <i>Group</i> object of the file, <i>NULL</i> otherwise.              Group*      GetFirstGroup() LIBGIG_DEPRECATED_API("Use GetGroup() instead.");
1458              Group*      GetNextGroup();  ///< Returns a pointer to the next <i>Group</i> object of the file, <i>NULL</i> otherwise.              Group*      GetNextGroup() LIBGIG_DEPRECATED_API("Use GetGroup() instead.");
1459              Group*      GetGroup(uint index);              Group*      GetGroup(size_t index);
1460              Group*      GetGroup(String name);              Group*      GetGroup(String name);
1461              Group*      AddGroup();              Group*      AddGroup();
1462              void        DeleteGroup(Group* pGroup);              void        DeleteGroup(Group* pGroup);
# Line 1461  namespace gig { Line 1464  namespace gig {
1464              void        SetAutoLoad(bool b);              void        SetAutoLoad(bool b);
1465              bool        GetAutoLoad();              bool        GetAutoLoad();
1466              void        AddContentOf(File* pFile);              void        AddContentOf(File* pFile);
1467              ScriptGroup* GetScriptGroup(uint index);              ScriptGroup* GetScriptGroup(size_t index);
1468              ScriptGroup* GetScriptGroup(const String& name);              ScriptGroup* GetScriptGroup(const String& name);
1469              ScriptGroup* AddScriptGroup();              ScriptGroup* AddScriptGroup();
1470              void        DeleteScriptGroup(ScriptGroup* pGroup);              void        DeleteScriptGroup(ScriptGroup* pGroup);
# Line 1489  namespace gig { Line 1492  namespace gig {
1492              friend class Group; // so Group can access protected member pRIFF              friend class Group; // so Group can access protected member pRIFF
1493              friend class ScriptGroup; // so ScriptGroup can access protected member pRIFF              friend class ScriptGroup; // so ScriptGroup can access protected member pRIFF
1494          private:          private:
1495              std::list<Group*>*          pGroups;              std::vector<Group*>*          pGroups;
1496              std::list<Group*>::iterator GroupsIterator;              std::vector<Group*>::iterator GroupsIterator;
1497              bool                        bAutoLoad;              bool                        bAutoLoad;
1498              std::list<ScriptGroup*>*    pScriptGroups;              std::vector<ScriptGroup*>*    pScriptGroups;
1499    
1500              bool UsesAnyGigFormatExtension() const;              bool UsesAnyGigFormatExtension() const;
1501      };      };

Legend:
Removed from v.3731  
changed lines
  Added in v.3952

  ViewVC Help
Powered by ViewVC