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 * |
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); |
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> "; |
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 |
|
|