gigextract.cpp File Reference

#include <iostream>
#include <cstdlib>
#include <string.h>
#include <string>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <errno.h>
#include <dlfcn.h>
#include <audiofile.h>
#include "gig.h"

Go to the source code of this file.

Defines

#define USE_DISK_STREAMING   1
#define HASHED_READS_TEST   1

Typedefs

typedef map< unsigned int,
bool > 
OrderMap

Functions

string Revision ()
void PrintVersion ()
void PrintUsage ()
void ExtractSamples (gig::File *gig, char *destdir, OrderMap *ordered)
int writeWav (const char *filename, void *samples, long samplecount, int channels, int bitdepth, long rate)
string ToString (int i)
void openAFlib (void)
void closeAFlib (void)
int main (int argc, char *argv[])

Variables

OrderMappOrderedSamples = NULL
void * hAFlib
AFfilesetup(*) _afNewFileSetup (void)
void(*) _afFreeFileSetup (AFfilesetup)
void(*) _afInitChannels (AFfilesetup, int, int)
void(*) _afInitSampleFormat (AFfilesetup, int, int, int)
void(*) _afInitFileFormat (AFfilesetup, int)
void(*) _afInitRate (AFfilesetup, int, double)
int(*) _afWriteFrames (AFfilehandle, int, const void *, int)
AFfilehandle(*) _afOpenFile (const char *, const char *, AFfilesetup)
int(*) _afCloseFile (AFfilehandle file)


Define Documentation

#define HASHED_READS_TEST   1

Definition at line 38 of file gigextract.cpp.

#define USE_DISK_STREAMING   1

Definition at line 32 of file gigextract.cpp.


Typedef Documentation

typedef map<unsigned int, bool> OrderMap

Definition at line 73 of file gigextract.cpp.


Function Documentation

void closeAFlib ( void   ) 

Definition at line 344 of file gigextract.cpp.

References hAFlib.

Referenced by ExtractSamples().

void ExtractSamples ( gig::File gig,
char *  destdir,
OrderMap ordered 
)

Definition at line 169 of file gigextract.cpp.

References DLS::Sample::BitDepth, DLS::Sample::Channels, closeAFlib(), gig::Sample::Compressed, DLS::Sample::FrameSize, gig::File::GetFirstSample(), gig::File::GetNextSample(), hAFlib, gig::Sample::LoadSampleData(), openAFlib(), DLS::Resource::pInfo, gig::Sample::Read(), gig::Sample::ReleaseSampleData(), DLS::Sample::SamplesPerSecond, DLS::Sample::SamplesTotal, ToString(), and writeWav().

Referenced by main().

int main ( int  argc,
char *  argv[] 
)

Definition at line 99 of file gigextract.cpp.

References ExtractSamples(), pOrderedSamples, RIFF::Exception::PrintMessage(), PrintUsage(), and PrintVersion().

void openAFlib ( void   ) 

Definition at line 326 of file gigextract.cpp.

References _afCloseFile, _afFreeFileSetup, _afInitChannels, _afInitFileFormat, _afInitRate, _afInitSampleFormat, _afNewFileSetup, _afOpenFile, _afWriteFrames, and hAFlib.

Referenced by ExtractSamples().

void PrintUsage (  ) 

void PrintVersion (  ) 

string Revision (  ) 

string ToString ( int  i  ) 

Definition at line 388 of file gigextract.cpp.

Referenced by ExtractSamples(), and writeWav().

int writeWav ( const char *  filename,
void *  samples,
long  samplecount,
int  channels,
int  bitdepth,
long  rate 
)

Definition at line 267 of file gigextract.cpp.

References _afCloseFile, _afFreeFileSetup, _afInitChannels, _afInitFileFormat, _afInitRate, _afInitSampleFormat, _afNewFileSetup, _afOpenFile, _afWriteFrames, and ToString().

Referenced by ExtractSamples().


Variable Documentation

int(*) _afCloseFile(AFfilehandle file)

Definition at line 96 of file gigextract.cpp.

Referenced by openAFlib(), and writeWav().

void(*) _afFreeFileSetup(AFfilesetup)

Definition at line 89 of file gigextract.cpp.

Referenced by openAFlib(), and writeWav().

void(*) _afInitChannels(AFfilesetup, int, int)

Definition at line 90 of file gigextract.cpp.

Referenced by openAFlib(), and writeWav().

void(*) _afInitFileFormat(AFfilesetup, int)

Definition at line 92 of file gigextract.cpp.

Referenced by openAFlib(), and writeWav().

void(*) _afInitRate(AFfilesetup, int, double)

Definition at line 93 of file gigextract.cpp.

Referenced by openAFlib(), and writeWav().

void(*) _afInitSampleFormat(AFfilesetup, int, int, int)

Definition at line 91 of file gigextract.cpp.

Referenced by openAFlib(), and writeWav().

AFfilesetup(*) _afNewFileSetup(void)

Definition at line 88 of file gigextract.cpp.

Referenced by openAFlib(), and writeWav().

AFfilehandle(*) _afOpenFile(const char *, const char *, AFfilesetup)

Definition at line 95 of file gigextract.cpp.

Referenced by openAFlib(), and writeWav().

int(*) _afWriteFrames(AFfilehandle, int, const void *, int)

Definition at line 94 of file gigextract.cpp.

Referenced by openAFlib(), and writeWav().

void* hAFlib

Definition at line 84 of file gigextract.cpp.

Referenced by closeAFlib(), ExtractSamples(), and openAFlib().

OrderMap* pOrderedSamples = NULL

Definition at line 74 of file gigextract.cpp.

Referenced by main().


Generated on Mon Jul 31 05:49:58 2006 for libgig by  doxygen 1.4.7