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

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

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

revision 929 by schoenebeck, Tue Oct 24 22:24:45 2006 UTC revision 933 by schoenebeck, Fri Nov 24 12:50:05 2006 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2   *                                                                         *   *                                                                         *
3   *   libgig - C++ cross-platform Gigasampler format file loader library    *   *   libgig - C++ cross-platform Gigasampler format file access library    *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003-2006 by Christian Schoenebeck                      *   *   Copyright (C) 2003-2006 by Christian Schoenebeck                      *
6   *                              <cuse@users.sourceforge.net>               *   *                              <cuse@users.sourceforge.net>               *
7   *                                                                         *   *                                                                         *
8     *   This program is part of libgig.                                       *
9     *                                                                         *
10   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
11   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
12   *   the Free Software Foundation; either version 2 of the License, or     *   *   the Free Software Foundation; either version 2 of the License, or     *
# Line 151  void PrintSamples(gig::File* gig) { Line 153  void PrintSamples(gig::File* gig) {
153      gig::Sample* pSample = gig->GetFirstSample();      gig::Sample* pSample = gig->GetFirstSample();
154      while (pSample) {      while (pSample) {
155          samples++;          samples++;
156            // determine sample's name
157          string name = pSample->pInfo->Name;          string name = pSample->pInfo->Name;
158          if (name == "") name = "<NO NAME>";          if (name == "") name = "<NO NAME>";
159          else            name = '\"' + name + '\"';          else            name = '\"' + name + '\"';
160            // determine group this sample belongs to
161            int iGroup = 1;
162            for (gig::Group* pGroup = gig->GetFirstGroup(); pGroup; pGroup = gig->GetNextGroup(), iGroup++) {
163                if (pGroup == pSample->GetGroup()) break;
164            }
165            // print sample info
166          cout << "    Sample " << samples << ") " << name << ", ";          cout << "    Sample " << samples << ") " << name << ", ";
167            cout << "Group " << iGroup << ", ";
168          cout << pSample->SamplesPerSecond << "Hz, " << pSample->Channels << " Channels, " << pSample->Loops << " Loops";          cout << pSample->SamplesPerSecond << "Hz, " << pSample->Channels << " Channels, " << pSample->Loops << " Loops";
169          if (pSample->Loops) {          if (pSample->Loops) {
170              cout << " (Type: ";              cout << " (Type: ";
# Line 385  void PrintDimensionRegions(gig::Region* Line 395  void PrintDimensionRegions(gig::Region*
395  }  }
396    
397  string Revision() {  string Revision() {
398      string s = "$Revision: 1.20 $";      string s = "$Revision: 1.22 $";
399      return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword      return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword
400  }  }
401    

Legend:
Removed from v.929  
changed lines
  Added in v.933

  ViewVC Help
Powered by ViewVC