/[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 3927 by schoenebeck, Tue Jun 15 11:00:50 2021 UTC revision 3928 by schoenebeck, Tue Jun 15 11:38:38 2021 UTC
# Line 1700  namespace DLS { Line 1700  namespace DLS {
1700              delete pRIFF;              delete pRIFF;
1701      }      }
1702    
1703        /**
1704         * Returns Sample object of @a index.
1705         *
1706         * @param index - position of sample in sample list (0..n)
1707         * @returns sample object or NULL if index is out of bounds
1708         */
1709        Sample* File::GetSample(size_t index) {
1710            if (!pSamples) LoadSamples();
1711            if (!pSamples) return NULL;
1712            if (index >= pSamples->size()) return NULL;
1713            return (*pSamples)[index];
1714        }
1715    
1716        /**
1717         * Returns a pointer to the first <i>Sample</i> object of the file,
1718         * <i>NULL</i> otherwise.
1719         *
1720         * @deprecated  This method is not reentrant-safe, use GetSample()
1721         *              instead.
1722         */
1723      Sample* File::GetFirstSample() {      Sample* File::GetFirstSample() {
1724          if (!pSamples) LoadSamples();          if (!pSamples) LoadSamples();
1725          if (!pSamples) return NULL;          if (!pSamples) return NULL;
# Line 1707  namespace DLS { Line 1727  namespace DLS {
1727          return (SamplesIterator != pSamples->end()) ? *SamplesIterator : NULL;          return (SamplesIterator != pSamples->end()) ? *SamplesIterator : NULL;
1728      }      }
1729    
1730        /**
1731         * Returns a pointer to the next <i>Sample</i> object of the file,
1732         * <i>NULL</i> otherwise.
1733         *
1734         * @deprecated  This method is not reentrant-safe, use GetSample()
1735         *              instead.
1736         */
1737      Sample* File::GetNextSample() {      Sample* File::GetNextSample() {
1738          if (!pSamples) return NULL;          if (!pSamples) return NULL;
1739          SamplesIterator++;          SamplesIterator++;

Legend:
Removed from v.3927  
changed lines
  Added in v.3928

  ViewVC Help
Powered by ViewVC