#include <SidTune.h>
|
static const int | MD5_LENGTH = 32 |
|
◆ SidTune() [1/2]
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().
- Parameters
-
fileName | |
fileNameExt | |
separatorIsSlash | |
◆ SidTune() [2/2]
SidTune::SidTune |
( |
const uint_least8_t * |
oneFileFormatSidtune, |
|
|
uint_least32_t |
sidtuneLength |
|
) |
| |
Load a single-file sidtune from a memory buffer. Currently supported: PSID and MUS formats.
- Parameters
-
oneFileFormatSidtune | the buffer that contains song data |
sidtuneLength | length of the buffer |
◆ createMD5()
const char * SidTune::createMD5 |
( |
char * |
md5 = 0 | ) |
|
Calculates the MD5 hash of the tune, old method. Not providing an md5 buffer will cause the internal one to be used. If provided, buffer must be MD5_LENGTH + 1
- Returns
- a pointer to the buffer containing the md5 string, 0 if no tune is loaded.
◆ createMD5New()
const char * SidTune::createMD5New |
( |
char * |
md5 = 0 | ) |
|
Calculates the MD5 hash of the tune, new method, introduced in HVSC#68. Not providing an md5 buffer will cause the internal one to be used. If provided, buffer must be MD5_LENGTH + 1
- Returns
- a pointer to the buffer containing the md5 string, 0 if no tune is loaded.
◆ getInfo() [1/2]
Retrieve current active sub-song specific information.
- Returns
- a pointer to SidTuneInfo, 0 if no tune is loaded. The pointer must not be deleted.
◆ getInfo() [2/2]
const SidTuneInfo * SidTune::getInfo |
( |
unsigned int |
songNum | ) |
|
Select sub-song and retrieve information.
- Parameters
-
songNum | the selected song (0 = default starting song) |
- Returns
- a pointer to SidTuneInfo, 0 if no tune is loaded. The pointer must not be deleted.
◆ getStatus()
bool SidTune::getStatus |
( |
| ) |
const |
Determine current state of object. Upon error condition use statusString to get a descriptive text string.
- Returns
- current state (true = okay, false = error)
◆ load()
void SidTune::load |
( |
const char * |
fileName, |
|
|
bool |
separatorIsSlash = false |
|
) |
| |
Load a sidtune into an existing object from a file.
- Parameters
-
fileName | |
separatorIsSlash | |
◆ placeSidTuneInC64mem()
Copy sidtune into C64 memory (64 KB).
◆ read()
void SidTune::read |
( |
const uint_least8_t * |
sourceBuffer, |
|
|
uint_least32_t |
bufferLen |
|
) |
| |
Load a sidtune into an existing object from a buffer.
- Parameters
-
sourceBuffer | the buffer that contains song data |
bufferLen | length of the buffer |
◆ selectSong()
unsigned int SidTune::selectSong |
( |
unsigned int |
songNum | ) |
|
Select sub-song.
- Parameters
-
songNum | the selected song (0 = default starting song) |
- Returns
- active song number, 0 if no tune is loaded.
◆ setFileNameExtensions()
void SidTune::setFileNameExtensions |
( |
const char ** |
fileNameExt | ) |
|
The SidTune class does not copy the list of file name extensions, so make sure you keep it. If the provided pointer is 0, the default list will be activated. This is a static list which is used by all SidTune objects.
- Parameters
-
◆ statusString()
const char * SidTune::statusString |
( |
| ) |
const |
Error/status message of last operation.
The documentation for this class was generated from the following files: