/[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 2912 by schoenebeck, Tue May 17 14:30:10 2016 UTC revision 2989 by schoenebeck, Sat Sep 24 14:00:46 2016 UTC
# Line 45  Line 45 
45  # define CHUNK_ID_SCRI  0x53637269 // own gig format extension  # define CHUNK_ID_SCRI  0x53637269 // own gig format extension
46  # define CHUNK_ID_LSNM  0x4c534e4d // own gig format extension  # define CHUNK_ID_LSNM  0x4c534e4d // own gig format extension
47  # define CHUNK_ID_SCSL  0x5343534c // own gig format extension  # define CHUNK_ID_SCSL  0x5343534c // own gig format extension
 # define CHUNK_ID_FFMT  0x46466D74 // own gig format extension  
48  #else  // little endian  #else  // little endian
49  # define LIST_TYPE_3PRG 0x67727033  # define LIST_TYPE_3PRG 0x67727033
50  # define LIST_TYPE_3EWL 0x6C776533  # define LIST_TYPE_3EWL 0x6C776533
# Line 64  Line 63 
63  # define CHUNK_ID_SCRI  0x69726353 // own gig format extension  # define CHUNK_ID_SCRI  0x69726353 // own gig format extension
64  # define CHUNK_ID_LSNM  0x4d4e534c // own gig format extension  # define CHUNK_ID_LSNM  0x4d4e534c // own gig format extension
65  # define CHUNK_ID_SCSL  0x4c534353 // own gig format extension  # define CHUNK_ID_SCSL  0x4c534353 // own gig format extension
 # define CHUNK_ID_FFMT  0x746D4646 // own gig format extension  
66  #endif // WORDS_BIGENDIAN  #endif // WORDS_BIGENDIAN
67    
68  /** Gigasampler/GigaStudio specific classes and definitions */  /** Gigasampler/GigaStudio specific classes and definitions */
# Line 591  namespace gig { Line 589  namespace gig {
589              } _lev_ctrl_t;              } _lev_ctrl_t;
590              typedef std::map<uint32_t, double*> VelocityTableMap;              typedef std::map<uint32_t, double*> VelocityTableMap;
591    
592              static uint              Instances;                  ///< Number of DimensionRegion instances.              static size_t            Instances;                  ///< Number of DimensionRegion instances.
593              static VelocityTableMap* pVelocityTables;            ///< Contains the tables corresponding to the various velocity parameters (VelocityResponseCurve and VelocityResponseDepth).              static VelocityTableMap* pVelocityTables;            ///< Contains the tables corresponding to the various velocity parameters (VelocityResponseCurve and VelocityResponseDepth).
594              double*                  pVelocityAttenuationTable;  ///< Points to the velocity table corresponding to the velocity parameters of this DimensionRegion.              double*                  pVelocityAttenuationTable;  ///< Points to the velocity table corresponding to the velocity parameters of this DimensionRegion.
595              double*                  pVelocityReleaseTable;      ///< Points to the velocity table corresponding to the release velocity parameters of this DimensionRegion              double*                  pVelocityReleaseTable;      ///< Points to the velocity table corresponding to the release velocity parameters of this DimensionRegion
# Line 663  namespace gig { Line 661  namespace gig {
661              static void     DestroyDecompressionBuffer(buffer_t& DecompressionBuffer);              static void     DestroyDecompressionBuffer(buffer_t& DecompressionBuffer);
662              // overridden methods              // overridden methods
663              void          ReleaseSampleData();              void          ReleaseSampleData();
664              void          Resize(int iNewSize);              void          Resize(file_offset_t NewSize);
665              file_offset_t SetPos(file_offset_t SampleCount, RIFF::stream_whence_t Whence = RIFF::stream_start);              file_offset_t SetPos(file_offset_t SampleCount, RIFF::stream_whence_t Whence = RIFF::stream_start);
666              file_offset_t GetPos() const;              file_offset_t GetPos() const;
667              file_offset_t Read(void* pBuffer, file_offset_t SampleCount, buffer_t* pExternalDecompressionBuffer = NULL);              file_offset_t Read(void* pBuffer, file_offset_t SampleCount, buffer_t* pExternalDecompressionBuffer = NULL);
# Line 673  namespace gig { Line 671  namespace gig {
671              virtual void  UpdateChunks(progress_t* pProgress);              virtual void  UpdateChunks(progress_t* pProgress);
672              void CopyAssignMeta(const Sample* orig);              void CopyAssignMeta(const Sample* orig);
673              void CopyAssignWave(const Sample* orig);              void CopyAssignWave(const Sample* orig);
674                uint32_t GetWaveDataCRC32Checksum();
675                bool VerifyWaveData(uint32_t* pActually = NULL);
676          protected:          protected:
677              static unsigned int  Instances;               ///< Number of instances of class Sample.              static size_t        Instances;               ///< Number of instances of class Sample.
678              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 as well as for truncation of 24 Bit -> 16 Bit samples.
679              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)
680              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).
# Line 687  namespace gig { Line 687  namespace gig {
687              unsigned long        FileNo;                  ///< File number (> 0 when sample is stored in an extension file, 0 when it's in the gig)              unsigned long        FileNo;                  ///< File number (> 0 when sample is stored in an extension file, 0 when it's in the gig)
688              RIFF::Chunk*         pCk3gix;              RIFF::Chunk*         pCk3gix;
689              RIFF::Chunk*         pCkSmpl;              RIFF::Chunk*         pCkSmpl;
690              uint32_t             crc;                     ///< CRC-32 checksum of the raw sample data              uint32_t             crc;                     ///< Reflects CRC-32 checksum of the raw sample data at the last time when the sample's raw wave form data has been modified consciously by the user by calling Write().
691    
692              Sample(File* pFile, RIFF::List* waveList, file_offset_t WavePoolOffset, unsigned long fileNo = 0);              Sample(File* pFile, RIFF::List* waveList, file_offset_t WavePoolOffset, unsigned long fileNo = 0, int index = -1);
693             ~Sample();             ~Sample();
694                uint32_t CalculateWaveDataChecksum();
695    
696              // Guess size (in bytes) of a compressed sample              // Guess size (in bytes) of a compressed sample
697              inline file_offset_t GuessSize(file_offset_t samples) {              inline file_offset_t GuessSize(file_offset_t samples) {
# Line 1269  namespace gig { Line 1270  namespace gig {
1270              virtual void LoadInstruments(progress_t* pProgress);              virtual void LoadInstruments(progress_t* pProgress);
1271              virtual void LoadScriptGroups();              virtual void LoadScriptGroups();
1272              void SetSampleChecksum(Sample* pSample, uint32_t crc);              void SetSampleChecksum(Sample* pSample, uint32_t crc);
1273              uint GetFormatExtensionVersion() const;              uint32_t GetSampleChecksum(Sample* pSample);
1274              bool HasMonolithicLargeFilePolicy() const;              uint32_t GetSampleChecksumByIndex(int index);
1275                bool VerifySampleChecksumTable();
1276                bool RebuildSampleChecksumTable();
1277                int  GetWaveTableIndexOf(gig::Sample* pSample);
1278              friend class Region;              friend class Region;
1279              friend class Sample;              friend class Sample;
1280              friend class Instrument;              friend class Instrument;

Legend:
Removed from v.2912  
changed lines
  Added in v.2989

  ViewVC Help
Powered by ViewVC