/[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 1953 by schoenebeck, Thu Jul 30 08:16:02 2009 UTC revision 2329 by schoenebeck, Mon Mar 12 14:59:10 2012 UTC
# Line 600  namespace DLS { Line 600  namespace DLS {
600          // copy old loops array (skipping given loop)          // copy old loops array (skipping given loop)
601          for (int i = 0, o = 0; i < SampleLoops; i++) {          for (int i = 0, o = 0; i < SampleLoops; i++) {
602              if (&pSampleLoops[i] == pLoopDef) continue;              if (&pSampleLoops[i] == pLoopDef) continue;
603              if (o == SampleLoops - 1)              if (o == SampleLoops - 1) {
604                    delete[] pNewLoops;
605                  throw Exception("Could not delete Sample Loop, because it does not exist");                  throw Exception("Could not delete Sample Loop, because it does not exist");
606                }
607              pNewLoops[o] = pSampleLoops[i];              pNewLoops[o] = pSampleLoops[i];
608              o++;              o++;
609          }          }
# Line 1431  namespace DLS { Line 1433  namespace DLS {
1433      }      }
1434    
1435      /**      /**
1436         * Returns extension file of given index. Extension files are used
1437         * sometimes to circumvent the 2 GB file size limit of the RIFF format and
1438         * of certain operating systems in general. In this case, instead of just
1439         * using one file, the content is spread among several files with similar
1440         * file name scheme. This is especially used by some GigaStudio sound
1441         * libraries.
1442         *
1443         * @param index - index of extension file
1444         * @returns sought extension file, NULL if index out of bounds
1445         * @see GetFileName()
1446         */
1447        RIFF::File* File::GetExtensionFile(int index) {
1448            if (index < 0 || index >= ExtensionFiles.size()) return NULL;
1449            std::list<RIFF::File*>::iterator iter = ExtensionFiles.begin();
1450            for (int i = 0; iter != ExtensionFiles.end(); ++iter, ++i)
1451                if (i == index) return *iter;
1452            return NULL;
1453        }
1454    
1455        /** @brief File name of this DLS file.
1456         *
1457         * This method returns the file name as it was provided when loading
1458         * the respective DLS file. However in case the File object associates
1459         * an empty, that is new DLS file, which was not yet saved to disk,
1460         * this method will return an empty string.
1461         *
1462         * @see GetExtensionFile()
1463         */
1464        String File::GetFileName() {
1465            return pRIFF->GetFileName();
1466        }
1467    
1468        /**
1469       * Apply all the DLS file's current instruments, samples and settings to       * Apply all the DLS file's current instruments, samples and settings to
1470       * the respective RIFF chunks. You have to call Save() to make changes       * the respective RIFF chunks. You have to call Save() to make changes
1471       * persistent.       * persistent.

Legend:
Removed from v.1953  
changed lines
  Added in v.2329

  ViewVC Help
Powered by ViewVC