LMMS
Loading...
Searching...
No Matches
Ca2mLoader Class Reference

#include <a2m.h>

Inheritance diagram for Ca2mLoader:
CmodPlayer CPlayer

Public Member Functions

 Ca2mLoader (Copl *newopl)
bool load (const std::string &filename, const CFileProvider &fp)
float getrefresh ()
std::string gettype ()
std::string gettitle ()
std::string getauthor ()
unsigned int getinstruments ()
std::string getinstrument (unsigned int n)
Public Member Functions inherited from CmodPlayer
 CmodPlayer (Copl *newopl)
virtual ~CmodPlayer ()
bool update ()
void rewind (int subsong)
float getrefresh ()
unsigned int getpatterns ()
unsigned int getpattern ()
unsigned int getorders ()
unsigned int getorder ()
unsigned int getrow ()
unsigned int getspeed ()
Public Member Functions inherited from CPlayer
 CPlayer (Copl *newopl)
virtual ~CPlayer ()
void seek (unsigned long ms)
unsigned long songlength (int subsong=-1)
virtual std::string getdesc ()
virtual unsigned int getsubsongs ()
virtual unsigned int getsubsong ()

Static Public Member Functions

static CPlayerfactory (Copl *newopl)

Private Member Functions

void inittree ()
void updatefreq (unsigned short a, unsigned short b)
void updatemodel (unsigned short code)
unsigned short inputcode (unsigned short bits)
unsigned short uncompress ()
void decode ()
unsigned short sixdepak (unsigned short *source, unsigned char *dest, unsigned short size)

Private Attributes

char songname [43]
char author [43]
char instname [250][33]
unsigned short ibitcount
unsigned short ibitbuffer
unsigned short ibufcount
unsigned short obufcount
unsigned short input_size
unsigned short output_size
unsigned short leftc [ADPLUG_A2M_MAXCHAR+1]
unsigned short rghtc [ADPLUG_A2M_MAXCHAR+1]
unsigned short dad [ADPLUG_A2M_TWICEMAX+1]
unsigned short freq [ADPLUG_A2M_TWICEMAX+1]
unsigned short * wdbuf
unsigned char * obuf
unsigned char * buf

Static Private Attributes

static const unsigned int MAXFREQ = 2000
static const unsigned int MINCOPY = ADPLUG_A2M_MINCOPY
static const unsigned int MAXCOPY = ADPLUG_A2M_MAXCOPY
static const unsigned int COPYRANGES = ADPLUG_A2M_COPYRANGES
static const unsigned int CODESPERRANGE = ADPLUG_A2M_CODESPERRANGE
static const unsigned int TERMINATE = 256
static const unsigned int FIRSTCODE = ADPLUG_A2M_FIRSTCODE
static const unsigned int MAXCHAR = FIRSTCODE + COPYRANGES * CODESPERRANGE - 1
static const unsigned int SUCCMAX = MAXCHAR + 1
static const unsigned int TWICEMAX = ADPLUG_A2M_TWICEMAX
static const unsigned int ROOT = 1
static const unsigned int MAXBUF = 42 * 1024
static const unsigned int MAXDISTANCE = 21389
static const unsigned int MAXSIZE = 21389 + MAXCOPY
static const unsigned short bitvalue [14]
static const signed short copybits [ADPLUG_A2M_COPYRANGES]
static const signed short copymin [ADPLUG_A2M_COPYRANGES]

Additional Inherited Members

Protected Types inherited from CmodPlayer
enum  Flags {
  Standard = 0 , Decimal = 1 << 0 , Faust = 1 << 1 , NoKeyOn = 1 << 2 ,
  Opl3 = 1 << 3 , Tremolo = 1 << 4 , Vibrato = 1 << 5 , Percussion = 1 << 6
}
Protected Member Functions inherited from CmodPlayer
void init_trackord ()
bool init_specialarp ()
void init_notetable (const unsigned short *newnotetable)
bool realloc_order (unsigned long len)
bool realloc_patterns (unsigned long pats, unsigned long rows, unsigned long chans)
bool realloc_instruments (unsigned long len)
void dealloc ()
Protected Attributes inherited from CmodPlayer
struct CmodPlayer::Instrumentinst
struct CmodPlayer::Tracks ** tracks
unsigned char * order
unsigned char * arplist
unsigned char * arpcmd
unsigned char initspeed
unsigned short tempo
unsigned short ** trackord
unsigned short bpm
unsigned short nop
unsigned long length
unsigned long restartpos
unsigned long activechan
int flags
int curchip
struct CmodPlayer::Channelchannel
Protected Attributes inherited from CPlayer
Coplopl
CAdPlugDatabasedb
Static Protected Attributes inherited from CPlayer
static const unsigned short note_table [12]
static const unsigned char op_table [9]

Constructor & Destructor Documentation

◆ Ca2mLoader()

Ca2mLoader::Ca2mLoader ( Copl * newopl)
inline

Member Function Documentation

◆ decode()

void Ca2mLoader::decode ( )
private

◆ factory()

CPlayer * Ca2mLoader::factory ( Copl * newopl)
static

◆ getauthor()

std::string Ca2mLoader::getauthor ( )
inlinevirtual

Reimplemented from CPlayer.

◆ getinstrument()

std::string Ca2mLoader::getinstrument ( unsigned int n)
inlinevirtual

Reimplemented from CPlayer.

◆ getinstruments()

unsigned int Ca2mLoader::getinstruments ( )
inlinevirtual

Reimplemented from CPlayer.

◆ getrefresh()

float Ca2mLoader::getrefresh ( )
virtual

Implements CPlayer.

◆ gettitle()

std::string Ca2mLoader::gettitle ( )
inlinevirtual

Reimplemented from CPlayer.

◆ gettype()

std::string Ca2mLoader::gettype ( )
inlinevirtual

Implements CPlayer.

◆ inittree()

void Ca2mLoader::inittree ( )
private

◆ inputcode()

unsigned short Ca2mLoader::inputcode ( unsigned short bits)
private

◆ load()

bool Ca2mLoader::load ( const std::string & filename,
const CFileProvider & fp )
virtual

Implements CPlayer.

◆ sixdepak()

unsigned short Ca2mLoader::sixdepak ( unsigned short * source,
unsigned char * dest,
unsigned short size )
private

◆ uncompress()

unsigned short Ca2mLoader::uncompress ( )
private

◆ updatefreq()

void Ca2mLoader::updatefreq ( unsigned short a,
unsigned short b )
private

◆ updatemodel()

void Ca2mLoader::updatemodel ( unsigned short code)
private

Member Data Documentation

◆ author

char Ca2mLoader::author[43]
private

◆ bitvalue

const unsigned short Ca2mLoader::bitvalue
staticprivate
Initial value:
=
{1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192}

◆ buf

unsigned char * Ca2mLoader::buf
private

◆ CODESPERRANGE

const unsigned int Ca2mLoader::CODESPERRANGE = ADPLUG_A2M_CODESPERRANGE
staticprivate

◆ copybits

const signed short Ca2mLoader::copybits
staticprivate
Initial value:
=
{4, 6, 8, 10, 12, 14}

◆ copymin

const signed short Ca2mLoader::copymin
staticprivate
Initial value:
=
{0, 16, 80, 336, 1360, 5456}

◆ COPYRANGES

const unsigned int Ca2mLoader::COPYRANGES = ADPLUG_A2M_COPYRANGES
staticprivate

◆ dad

unsigned short Ca2mLoader::dad[ADPLUG_A2M_TWICEMAX+1]
private

◆ FIRSTCODE

const unsigned int Ca2mLoader::FIRSTCODE = ADPLUG_A2M_FIRSTCODE
staticprivate

◆ freq

unsigned short Ca2mLoader::freq[ADPLUG_A2M_TWICEMAX+1]
private

◆ ibitbuffer

unsigned short Ca2mLoader::ibitbuffer
private

◆ ibitcount

unsigned short Ca2mLoader::ibitcount
private

◆ ibufcount

unsigned short Ca2mLoader::ibufcount
private

◆ input_size

unsigned short Ca2mLoader::input_size
private

◆ instname

char Ca2mLoader::instname[250][33]
private

◆ leftc

unsigned short Ca2mLoader::leftc[ADPLUG_A2M_MAXCHAR+1]
private

◆ MAXBUF

const unsigned int Ca2mLoader::MAXBUF = 42 * 1024
staticprivate

◆ MAXCHAR

const unsigned int Ca2mLoader::MAXCHAR = FIRSTCODE + COPYRANGES * CODESPERRANGE - 1
staticprivate

◆ MAXCOPY

const unsigned int Ca2mLoader::MAXCOPY = ADPLUG_A2M_MAXCOPY
staticprivate

◆ MAXDISTANCE

const unsigned int Ca2mLoader::MAXDISTANCE = 21389
staticprivate

◆ MAXFREQ

const unsigned int Ca2mLoader::MAXFREQ = 2000
staticprivate

◆ MAXSIZE

const unsigned int Ca2mLoader::MAXSIZE = 21389 + MAXCOPY
staticprivate

◆ MINCOPY

const unsigned int Ca2mLoader::MINCOPY = ADPLUG_A2M_MINCOPY
staticprivate

◆ obuf

unsigned char* Ca2mLoader::obuf
private

◆ obufcount

unsigned short Ca2mLoader::obufcount
private

◆ output_size

unsigned short Ca2mLoader::output_size
private

◆ rghtc

unsigned short Ca2mLoader::rghtc[ADPLUG_A2M_MAXCHAR+1]
private

◆ ROOT

const unsigned int Ca2mLoader::ROOT = 1
staticprivate

◆ songname

char Ca2mLoader::songname[43]
private

◆ SUCCMAX

const unsigned int Ca2mLoader::SUCCMAX = MAXCHAR + 1
staticprivate

◆ TERMINATE

const unsigned int Ca2mLoader::TERMINATE = 256
staticprivate

◆ TWICEMAX

const unsigned int Ca2mLoader::TWICEMAX = ADPLUG_A2M_TWICEMAX
staticprivate

◆ wdbuf

unsigned short * Ca2mLoader::wdbuf
private

The documentation for this class was generated from the following files: