#include <SidTune.h>
Public Member Functions | |
SidTune (const char *fileName, const char **fileNameExt=0, bool separatorIsSlash=false) | |
SidTune (const uint_least8_t *oneFileFormatSidtune, uint_least32_t sidtuneLength) | |
void | setFileNameExtensions (const char **fileNameExt) |
void | load (const char *fileName, bool separatorIsSlash=false) |
void | read (const uint_least8_t *sourceBuffer, uint_least32_t bufferLen) |
unsigned int | selectSong (unsigned int songNum) |
const SidTuneInfo * | getInfo () const |
const SidTuneInfo * | getInfo (unsigned int songNum) |
bool | getStatus () const |
const char * | statusString () const |
bool | placeSidTuneInC64mem (sidmemory *mem) |
const char * | createMD5 (char *md5=0) |
Static Public Attributes | |
static const int | MD5_LENGTH = 32 |
SidTune::SidTune | ( | const char * | fileName, | |
const char ** | fileNameExt = 0 , |
|||
bool | separatorIsSlash = false | |||
) |
Load a sidtune from a file.
To retrieve data from standard input pass in filename "-". If you want to override the default filename extensions use this contructor. Please note, that if the specified "fileName" does exist and the loader is able to determine its file format, this function does not try to append any file name extension. See "SidTune.cpp" for the default list of file name extensions. You can specify "fileName = 0", if you do not want to load a sidtune. You can later load one with open().
fileName | ||
fileNameExt | ||
separatorIsSlash |
SidTune::SidTune | ( | const uint_least8_t * | oneFileFormatSidtune, | |
uint_least32_t | sidtuneLength | |||
) |
Load a single-file sidtune from a memory buffer. Currently supported: PSID format.
oneFileFormatSidtune | the buffer that contains song data | |
sidtuneLength | length of the buffer |
const char * SidTune::createMD5 | ( | char * | md5 = 0 |
) |
Calculates the MD5 hash of the tune. Not providing an md5 buffer will cause the internal one to be used. If provided, buffer must be MD5_LENGTH + 1
const SidTuneInfo * SidTune::getInfo | ( | unsigned int | songNum | ) |
Select sub-song and retrieve information.
songNum | the selected song (0 = default starting song) |
const SidTuneInfo * SidTune::getInfo | ( | ) | const |
Retrieve current active sub-song specific information.
bool SidTune::getStatus | ( | ) | const |
Determine current state of object. Upon error condition use statusString to get a descriptive text string.
void SidTune::load | ( | const char * | fileName, | |
bool | separatorIsSlash = false | |||
) |
Load a sidtune into an existing object from a file.
fileName | ||
separatorIsSlash |
bool SidTune::placeSidTuneInC64mem | ( | sidmemory * | mem | ) |
Copy sidtune into C64 memory (64 KB).
void SidTune::read | ( | const uint_least8_t * | sourceBuffer, | |
uint_least32_t | bufferLen | |||
) |
Load a sidtune into an existing object from a buffer.
sourceBuffer | the buffer that contains song data | |
bufferLen | length of the buffer |
unsigned int SidTune::selectSong | ( | unsigned int | songNum | ) |
Select sub-song.
songNum | the selected song (0 = default starting song) |
void SidTune::setFileNameExtensions | ( | const char ** | fileNameExt | ) |
const char * SidTune::statusString | ( | ) | const |
Error/status message of last operation