/[svn]/libgig/trunk/src/DLS.cpp
ViewVC logotype

Diff of /libgig/trunk/src/DLS.cpp

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

revision 2608 by schoenebeck, Mon Nov 25 02:22:38 2013 UTC revision 2609 by schoenebeck, Sun Jun 8 19:00:30 2014 UTC
# Line 1743  namespace DLS { Line 1743  namespace DLS {
1743      void File::Save(const String& Path) {      void File::Save(const String& Path) {
1744          UpdateChunks();          UpdateChunks();
1745          pRIFF->Save(Path);          pRIFF->Save(Path);
1746          __UpdateWavePoolTableChunk();          UpdateFileOffsets();
1747      }      }
1748    
1749      /** @brief Save changes to same file.      /** @brief Save changes to same file.
# Line 1758  namespace DLS { Line 1758  namespace DLS {
1758      void File::Save() {      void File::Save() {
1759          UpdateChunks();          UpdateChunks();
1760          pRIFF->Save();          pRIFF->Save();
1761            UpdateFileOffsets();
1762        }
1763    
1764        /** @brief Updates all file offsets stored all over the file.
1765         *
1766         * This virtual method is called whenever the overall file layout has been
1767         * changed (i.e. file or individual RIFF chunks have been resized). It is
1768         * then the responsibility of this method to update all file offsets stored
1769         * in the file format. For example samples are referenced by instruments by
1770         * file offsets. The gig format also stores references to instrument
1771         * scripts as file offsets, and thus it overrides this method to update
1772         * those file offsets as well.
1773         */
1774        void File::UpdateFileOffsets() {
1775          __UpdateWavePoolTableChunk();          __UpdateWavePoolTableChunk();
1776      }      }
1777    

Legend:
Removed from v.2608  
changed lines
  Added in v.2609

  ViewVC Help
Powered by ViewVC