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

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

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

revision 3350 by schoenebeck, Tue Oct 3 17:35:02 2017 UTC revision 3414 by schoenebeck, Tue Jan 30 20:17:12 2018 UTC
# Line 2  Line 2 
2   *                                                                         *   *                                                                         *
3   *   libgig - C++ cross-platform Gigasampler format file access library    *   *   libgig - C++ cross-platform Gigasampler format file access library    *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003-2017 by Christian Schoenebeck                      *   *   Copyright (C) 2003-2018 by Christian Schoenebeck                      *
6   *                              <cuse@users.sourceforge.net>               *   *                              <cuse@users.sourceforge.net>               *
7   *                                                                         *   *                                                                         *
8   *   This library is free software; you can redistribute it and/or modify  *   *   This library is free software; you can redistribute it and/or modify  *
# Line 5590  namespace { Line 5590  namespace {
5590          return static_cast<gig::Sample*>( *it );          return static_cast<gig::Sample*>( *it );
5591      }      }
5592    
5593        /**
5594         * Returns the total amount of samples of this gig file.
5595         *
5596         * Note that this method might block for a long time in case it is required
5597         * to load the sample info for the first time.
5598         *
5599         * @returns total amount of samples
5600         */
5601        size_t File::CountSamples() {
5602            if (!pSamples) LoadSamples();
5603            if (!pSamples) return 0;
5604            return pSamples->size();
5605        }
5606    
5607      /** @brief Add a new sample.      /** @brief Add a new sample.
5608       *       *
5609       * This will create a new Sample object for the gig file. You have to       * This will create a new Sample object for the gig file. You have to
# Line 5725  namespace { Line 5739  namespace {
5739      }      }
5740    
5741      /**      /**
5742         * Returns the total amount of instruments of this gig file.
5743         *
5744         * Note that this method might block for a long time in case it is required
5745         * to load the instruments info for the first time.
5746         *
5747         * @returns total amount of instruments
5748         */
5749        size_t File::CountInstruments() {
5750            if (!pInstruments) LoadInstruments();
5751            if (!pInstruments) return 0;
5752            return pInstruments->size();
5753        }
5754    
5755        /**
5756       * Returns the instrument with the given index.       * Returns the instrument with the given index.
5757       *       *
5758       * @param index     - number of the sought instrument (0..n)       * @param index     - number of the sought instrument (0..n)

Legend:
Removed from v.3350  
changed lines
  Added in v.3414

  ViewVC Help
Powered by ViewVC