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

Diff of /libgig/trunk/src/tools/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 931 by schoenebeck, Sun Oct 29 17:58:14 2006 UTC
# Line 151  void PrintSamples(gig::File* gig) { Line 151  void PrintSamples(gig::File* gig) {
151      gig::Sample* pSample = gig->GetFirstSample();      gig::Sample* pSample = gig->GetFirstSample();
152      while (pSample) {      while (pSample) {
153          samples++;          samples++;
154            // determine sample's name
155          string name = pSample->pInfo->Name;          string name = pSample->pInfo->Name;
156          if (name == "") name = "<NO NAME>";          if (name == "") name = "<NO NAME>";
157          else            name = '\"' + name + '\"';          else            name = '\"' + name + '\"';
158            // determine group this sample belongs to
159            int iGroup = 1;
160            for (gig::Group* pGroup = gig->GetFirstGroup(); pGroup; pGroup = gig->GetNextGroup(), iGroup++) {
161                if (pGroup == pSample->GetGroup()) break;
162            }
163            // print sample info
164          cout << "    Sample " << samples << ") " << name << ", ";          cout << "    Sample " << samples << ") " << name << ", ";
165            cout << "Group " << iGroup << ", ";
166          cout << pSample->SamplesPerSecond << "Hz, " << pSample->Channels << " Channels, " << pSample->Loops << " Loops";          cout << pSample->SamplesPerSecond << "Hz, " << pSample->Channels << " Channels, " << pSample->Loops << " Loops";
167          if (pSample->Loops) {          if (pSample->Loops) {
168              cout << " (Type: ";              cout << " (Type: ";
# Line 385  void PrintDimensionRegions(gig::Region* Line 393  void PrintDimensionRegions(gig::Region*
393  }  }
394    
395  string Revision() {  string Revision() {
396      string s = "$Revision: 1.20 $";      string s = "$Revision: 1.21 $";
397      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
398  }  }
399    

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

  ViewVC Help
Powered by ViewVC