46 |
void PrintUsage(); |
void PrintUsage(); |
47 |
void PrintDimensionRegions(gig::Region* rgn); |
void PrintDimensionRegions(gig::Region* rgn); |
48 |
|
|
49 |
|
class PubSample : public gig::Sample { |
50 |
|
public: |
51 |
|
using DLS::Sample::pCkData; |
52 |
|
}; |
53 |
|
|
54 |
int main(int argc, char *argv[]) |
int main(int argc, char *argv[]) |
55 |
{ |
{ |
56 |
if (argc <= 1) { |
if (argc <= 1) { |
158 |
void PrintSamples(gig::File* gig) { |
void PrintSamples(gig::File* gig) { |
159 |
int samples = 0; |
int samples = 0; |
160 |
cout << "ALL Available Samples (as there might be more than referenced by Instruments):" << endl; |
cout << "ALL Available Samples (as there might be more than referenced by Instruments):" << endl; |
161 |
gig::Sample* pSample = gig->GetFirstSample(); |
PubSample* pSample = (PubSample*) gig->GetFirstSample(); |
162 |
while (pSample) { |
while (pSample) { |
163 |
samples++; |
samples++; |
164 |
// determine sample's name |
// determine sample's name |
184 |
cout << ", LoopFraction=" << pSample->LoopFraction << ", Start=" << pSample->LoopStart << ", End=" << pSample->LoopEnd; |
cout << ", LoopFraction=" << pSample->LoopFraction << ", Start=" << pSample->LoopStart << ", End=" << pSample->LoopEnd; |
185 |
cout << ", LoopPlayCount=" << pSample->LoopPlayCount; |
cout << ", LoopPlayCount=" << pSample->LoopPlayCount; |
186 |
} |
} |
187 |
cout << ", Length=" << pSample->SamplesTotal << " Compressed=" << ((pSample->Compressed) ? "true" : "false") << endl; |
cout << ", Length=" << pSample->SamplesTotal << " Compressed=" << ((pSample->Compressed) ? "true" : "false") |
188 |
pSample = gig->GetNextSample(); |
<< " foffset=" << pSample->pCkData->GetFilePos() |
189 |
|
<< " fsz=" << pSample->pCkData->GetSize() |
190 |
|
<< endl; |
191 |
|
#if 0 |
192 |
|
{ |
193 |
|
const uint bufSize = 64; |
194 |
|
unsigned char buf[bufSize] = {}; |
195 |
|
pSample->SetPos(0); |
196 |
|
RIFF::file_offset_t n = pSample->pCkData->Read(&buf[0], bufSize, 1); |
197 |
|
//RIFF::file_offset_t n = pSample->Read(&buf[0], bufSize / pSample->FrameSize); |
198 |
|
cout << " FrameSize=" << pSample->FrameSize << ",Data[" << n << "]" << flush; |
199 |
|
for (int x = 0; x < bufSize; ++x) |
200 |
|
printf("%02x ", buf[x]); |
201 |
|
printf("\n"); |
202 |
|
fflush(stdout); |
203 |
|
} |
204 |
|
#endif |
205 |
|
pSample = (PubSample*) gig->GetNextSample(); |
206 |
} |
} |
207 |
} |
} |
208 |
|
|