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

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

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

revision 518 by schoenebeck, Sun May 8 16:19:34 2005 UTC revision 1953 by schoenebeck, Thu Jul 30 08:16:02 2009 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-2005 by Christian Schoenebeck                      *   *   Copyright (C) 2003-2009 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 62  int main(int argc, char *argv[]) Line 64  int main(int argc, char *argv[])
64      try {      try {
65          RIFF::File* riff = new RIFF::File(argv[1]);          RIFF::File* riff = new RIFF::File(argv[1]);
66          DLS::File*  dls  = new DLS::File(riff);          DLS::File*  dls  = new DLS::File(riff);
67          if (dls->pInfo->Name != "") cout << "File Name: " << dls->pInfo->Name << endl;          if (dls->pInfo->Name != "") cout << "File Name: \"" << dls->pInfo->Name << "\"\n";
68          PrintSamples(dls);          PrintSamples(dls);
69          cout << endl;          cout << endl;
70          PrintInstruments(dls);          PrintInstruments(dls);
# Line 123  void PrintRegions(DLS::Instrument* instr Line 125  void PrintRegions(DLS::Instrument* instr
125          cout << "        Region " << regions << ") ";          cout << "        Region " << regions << ") ";
126          DLS::Sample* pSample = pRegion->GetSample();          DLS::Sample* pSample = pRegion->GetSample();
127          if (pSample) {          if (pSample) {
128              cout << "Sample: " << pSample->SamplesPerSecond << "Hz, ";              cout << "Sample: ";
129                if (pSample->pInfo->Name != "") {
130                    cout << "\"" << pSample->pInfo->Name << "\", ";
131                }
132                cout << pSample->SamplesPerSecond << "Hz, ";
133          }          }
134          else {          else {
135              cout << "<NO_VALID_SAMPLE_REFERENCE> ";              cout << "<NO_VALID_SAMPLE_REFERENCE> ";
# Line 137  void PrintRegions(DLS::Instrument* instr Line 143  void PrintRegions(DLS::Instrument* instr
143  }  }
144    
145  string Revision() {  string Revision() {
146      string s = "$Revision: 1.3 $";      string s = "$Revision: 1.6 $";
147      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
148  }  }
149    

Legend:
Removed from v.518  
changed lines
  Added in v.1953

  ViewVC Help
Powered by ViewVC