/[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 2 by schoenebeck, Sat Oct 25 20:15:04 2003 UTC revision 55 by schoenebeck, Tue Apr 27 09:06:07 2004 UTC
# Line 2  Line 2 
2   *                                                                         *   *                                                                         *
3   *   libgig - C++ cross-platform Gigasampler format file loader library    *   *   libgig - C++ cross-platform Gigasampler format file loader library    *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003 by Christian Schoenebeck                           *   *   Copyright (C) 2003, 2004 by Christian Schoenebeck                     *
6   *                         <cuse@users.sourceforge.net>                    *   *                               <cuse@users.sourceforge.net>              *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   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  *
# Line 22  Line 22 
22   ***************************************************************************/   ***************************************************************************/
23    
24  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
25  #include <config.h>  # include <config.h>
26  #endif  #endif
27    
28  #include <iostream>  #include <iostream>
# Line 81  void PrintSamples(gig::File* gig) { Line 81  void PrintSamples(gig::File* gig) {
81          if (name == "") name = "<NO NAME>";          if (name == "") name = "<NO NAME>";
82          else            name = '\"' + name + '\"';          else            name = '\"' + name + '\"';
83          cout << "    Sample " << samples << ") " << name << ", ";          cout << "    Sample " << samples << ") " << name << ", ";
84          cout << pSample->SamplesPerSecond << "Hz, " << pSample->Channels << " Channels, " << pSample->Loops          cout << pSample->SamplesPerSecond << "Hz, " << pSample->Channels << " Channels, " << pSample->Loops << " Loops";
85               << " Loops, LoopFraction=" << pSample->LoopFraction << ", Length=" << pSample->SamplesTotal << " Compressed=" << pSample->Compressed << endl;          if (pSample->Loops) {
86                cout << " (Type: ";
87                switch (pSample->LoopType) {
88                    case gig::loop_type_normal:         cout << "normal)";   break;
89                    case gig::loop_type_bidirectional:  cout << "pingpong)"; break;
90                    case gig::loop_type_backward:       cout << "reverse)";  break;
91                }
92                cout << ", LoopFraction=" << pSample->LoopFraction << ", Start=" << pSample->LoopStart << ", End=" << pSample->LoopEnd;
93            }
94            cout << ", Length=" << pSample->SamplesTotal << " Compressed=" << ((pSample->Compressed) ? "true" : "false") << endl;
95          pSample = gig->GetNextSample();          pSample = gig->GetNextSample();
96      }      }
97  }  }

Legend:
Removed from v.2  
changed lines
  Added in v.55

  ViewVC Help
Powered by ViewVC