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: "; |
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 |
|
|