/[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 3940 by schoenebeck, Fri Jun 18 13:47:46 2021 UTC revision 3941 by schoenebeck, Fri Jun 18 14:06:20 2021 UTC
# Line 1846  namespace DLS { Line 1846  namespace DLS {
1846          delete pSample;          delete pSample;
1847      }      }
1848    
1849        /**
1850         * Returns the instrument with the given @a index from the list of
1851         * instruments of this file.
1852         *
1853         * @param index - number of the sought instrument (0..n)
1854         * @returns  sought instrument or NULL if there's no such instrument
1855         */
1856        Instrument* File::GetInstrument(size_t index) {
1857            if (!pInstruments) LoadInstruments();
1858            if (!pInstruments) return NULL;
1859            if (index >= pInstruments->size()) return NULL;
1860            return (*pInstruments)[index];
1861        }
1862    
1863        /**
1864         * Returns a pointer to the first <i>Instrument</i> object of the file,
1865         * <i>NULL</i> otherwise.
1866         *
1867         * @deprecated  This method is not reentrant-safe, use GetInstrument()
1868         *              instead.
1869         */
1870      Instrument* File::GetFirstInstrument() {      Instrument* File::GetFirstInstrument() {
1871          if (!pInstruments) LoadInstruments();          if (!pInstruments) LoadInstruments();
1872          if (!pInstruments) return NULL;          if (!pInstruments) return NULL;
# Line 1853  namespace DLS { Line 1874  namespace DLS {
1874          return (InstrumentsIterator != pInstruments->end()) ? *InstrumentsIterator : NULL;          return (InstrumentsIterator != pInstruments->end()) ? *InstrumentsIterator : NULL;
1875      }      }
1876    
1877        /**
1878         * Returns a pointer to the next <i>Instrument</i> object of the file,
1879         * <i>NULL</i> otherwise.
1880         *
1881         * @deprecated  This method is not reentrant-safe, use GetInstrument()
1882         *              instead.
1883         */
1884      Instrument* File::GetNextInstrument() {      Instrument* File::GetNextInstrument() {
1885          if (!pInstruments) return NULL;          if (!pInstruments) return NULL;
1886          InstrumentsIterator++;          InstrumentsIterator++;

Legend:
Removed from v.3940  
changed lines
  Added in v.3941

  ViewVC Help
Powered by ViewVC