gig.cpp File Reference

#include "gig.h"
#include "helper.h"
#include <math.h>
#include <iostream>

Go to the source code of this file.

Namespaces

namespace  gig

Defines

#define INITIAL_SAMPLE_BUFFER_SIZE   512000
 Initial size of the sample buffer which is used for decompression of compressed sample wave streams - this value should always be bigger than the biggest sample piece expected to be read by the sampler engine, otherwise the buffer size will be raised at runtime and thus the buffer reallocated which is time consuming and unefficient.
#define GIG_EXP_DECODE(x)   (pow(1.000000008813822, x))
 (so far) every exponential paramater in the gig format has a basis of 1.000000008813822
#define GIG_EXP_ENCODE(x)   (log(x) / log(1.000000008813822))
#define GIG_PITCH_TRACK_EXTRACT(x)   (!(x & 0x01))
#define GIG_PITCH_TRACK_ENCODE(x)   ((x) ? 0x00 : 0x01)
#define GIG_VCF_RESONANCE_CTRL_EXTRACT(x)   ((x >> 4) & 0x03)
#define GIG_VCF_RESONANCE_CTRL_ENCODE(x)   ((x & 0x03) << 4)
#define GIG_EG_CTR_ATTACK_INFLUENCE_EXTRACT(x)   ((x >> 1) & 0x03)
#define GIG_EG_CTR_DECAY_INFLUENCE_EXTRACT(x)   ((x >> 3) & 0x03)
#define GIG_EG_CTR_RELEASE_INFLUENCE_EXTRACT(x)   ((x >> 5) & 0x03)
#define GIG_EG_CTR_ATTACK_INFLUENCE_ENCODE(x)   ((x & 0x03) << 1)
#define GIG_EG_CTR_DECAY_INFLUENCE_ENCODE(x)   ((x & 0x03) << 3)
#define GIG_EG_CTR_RELEASE_INFLUENCE_ENCODE(x)   ((x & 0x03) << 5)
#define GET_PARAMS(params)
#define SKIP_ONE(x)
#define COPY_ONE(x)

Functions

static void gig::__notify_progress (progress_t *pProgress, float subprogress)
static void gig::__divide_progress (progress_t *pParentProgress, progress_t *pSubProgress, float totalTasks, float currentTask)
int gig::get12lo (const unsigned char *pSrc)
int gig::get12hi (const unsigned char *pSrc)
int16_t gig::get16 (const unsigned char *pSrc)
int gig::get24 (const unsigned char *pSrc)
void gig::store24 (unsigned char *pDst, int x)
void gig::Decompress16 (int compressionmode, const unsigned char *params, int srcStep, int dstStep, const unsigned char *pSrc, int16_t *pDst, unsigned long currentframeoffset, unsigned long copysamples)
void gig::Decompress24 (int compressionmode, const unsigned char *params, int dstStep, const unsigned char *pSrc, uint8_t *pDst, unsigned long currentframeoffset, unsigned long copysamples, int truncatedBits)
static split_type_t gig::__resolveSplitType (dimension_t dimension)
static int gig::__resolveZoneSize (dimension_def_t &dimension_definition)
String gig::libraryName ()
 Returns the name of this C++ library.
String gig::libraryVersion ()
 Returns version of this C++ library.

Variables

const int gig::bytesPerFrame [] = { 4096, 2052, 768, 524, 396, 268 }
const int gig::bytesPerFrameNoHdr [] = { 4096, 2048, 768, 512, 384, 256 }
const int gig::headerSize [] = { 0, 4, 0, 12, 12, 12 }
const int gig::bitsPerSample [] = { 16, 8, 24, 16, 12, 8 }


Define Documentation

#define COPY_ONE (  ) 

Value:

SKIP_ONE(x);                            \
        store24(pDst, y << truncatedBits);      \
        pDst += dstStep

Referenced by gig::Decompress24().

#define GET_PARAMS ( params   ) 

Value:

y    = get24(params);                   \
        dy   = y - get24((params) + 3);         \
        ddy  = get24((params) + 6);             \
        dddy = get24((params) + 9)

Referenced by gig::Decompress24().

#define GIG_EG_CTR_ATTACK_INFLUENCE_ENCODE (  )     ((x & 0x03) << 1)

Definition at line 48 of file gig.cpp.

Referenced by gig::DimensionRegion::UpdateChunks().

#define GIG_EG_CTR_ATTACK_INFLUENCE_EXTRACT (  )     ((x >> 1) & 0x03)

Definition at line 45 of file gig.cpp.

Referenced by gig::DimensionRegion::DimensionRegion().

#define GIG_EG_CTR_DECAY_INFLUENCE_ENCODE (  )     ((x & 0x03) << 3)

Definition at line 49 of file gig.cpp.

Referenced by gig::DimensionRegion::UpdateChunks().

#define GIG_EG_CTR_DECAY_INFLUENCE_EXTRACT (  )     ((x >> 3) & 0x03)

Definition at line 46 of file gig.cpp.

Referenced by gig::DimensionRegion::DimensionRegion().

#define GIG_EG_CTR_RELEASE_INFLUENCE_ENCODE (  )     ((x & 0x03) << 5)

Definition at line 50 of file gig.cpp.

Referenced by gig::DimensionRegion::UpdateChunks().

#define GIG_EG_CTR_RELEASE_INFLUENCE_EXTRACT (  )     ((x >> 5) & 0x03)

Definition at line 47 of file gig.cpp.

Referenced by gig::DimensionRegion::DimensionRegion().

#define GIG_EXP_DECODE (  )     (pow(1.000000008813822, x))

(so far) every exponential paramater in the gig format has a basis of 1.000000008813822

Definition at line 39 of file gig.cpp.

Referenced by gig::DimensionRegion::DimensionRegion().

#define GIG_EXP_ENCODE (  )     (log(x) / log(1.000000008813822))

Definition at line 40 of file gig.cpp.

Referenced by gig::DimensionRegion::UpdateChunks().

#define GIG_PITCH_TRACK_ENCODE (  )     ((x) ? 0x00 : 0x01)

Definition at line 42 of file gig.cpp.

Referenced by gig::DimensionRegion::UpdateChunks().

#define GIG_PITCH_TRACK_EXTRACT (  )     (!(x & 0x01))

Definition at line 41 of file gig.cpp.

Referenced by gig::DimensionRegion::DimensionRegion().

#define GIG_VCF_RESONANCE_CTRL_ENCODE (  )     ((x & 0x03) << 4)

Definition at line 44 of file gig.cpp.

Referenced by gig::DimensionRegion::UpdateChunks().

#define GIG_VCF_RESONANCE_CTRL_EXTRACT (  )     ((x >> 4) & 0x03)

Definition at line 43 of file gig.cpp.

Referenced by gig::DimensionRegion::DimensionRegion().

#define INITIAL_SAMPLE_BUFFER_SIZE   512000

Initial size of the sample buffer which is used for decompression of compressed sample wave streams - this value should always be bigger than the biggest sample piece expected to be read by the sampler engine, otherwise the buffer size will be raised at runtime and thus the buffer reallocated which is time consuming and unefficient.

Definition at line 36 of file gig.cpp.

Referenced by gig::Sample::Sample().

#define SKIP_ONE (  ) 

Value:

dddy -= (x);                            \
        ddy  -= dddy;                           \
        dy   =  -dy - ddy;                      \
        y    += dy

Referenced by gig::Decompress24().


Generated on Thu Aug 16 10:13:49 2007 for libgig by  doxygen 1.5.3