libsidplayfp  2.0.2
Public Member Functions | List of all members
SidDatabase Class Reference

#include <SidDatabase.h>

Public Member Functions

bool open (const char *filename)
 
void close ()
 
int_least32_t length (SidTune &tune)
 
int_least32_t length (const char *md5, unsigned int song)
 
int_least32_t lengthMs (SidTune &tune)
 
int_least32_t lengthMs (const char *md5, unsigned int song)
 
const char * error () const
 

Detailed Description

SidDatabase An utility class to deal with the songlength DataBase.

Member Function Documentation

◆ close()

void SidDatabase::close ( )

Close the songlength DataBase.

◆ error()

const char* SidDatabase::error ( ) const
inline

Get descriptive error message.

◆ length() [1/2]

int_least32_t SidDatabase::length ( const char *  md5,
unsigned int  song 
)

Get the length of the selected subtune.

Parameters
md5the md5 hash of the tune.
songthe subtune.
Returns
tune length in seconds, -1 in case of errors.

◆ length() [2/2]

int_least32_t SidDatabase::length ( SidTune tune)

Get the length of the current subtune. The hash is obtained with a specific MD5 calculation (old format).

Parameters
tunethe SID tune
Returns
tune length in seconds, -1 in case of errors.

◆ lengthMs() [1/2]

int_least32_t SidDatabase::lengthMs ( const char *  md5,
unsigned int  song 
)

Get the length of the selected subtune.

Parameters
md5the md5 hash of the tune.
songthe subtune.
Returns
tune length in milliseconds, -1 in case of errors.

◆ lengthMs() [2/2]

int_least32_t SidDatabase::lengthMs ( SidTune tune)

Get the length of the current subtune. The hash is based on the full content (new format).

Parameters
tunethe SID tune
Returns
tune length in milliseconds, -1 in case of errors.

◆ open()

bool SidDatabase::open ( const char *  filename)

Open the songlength DataBase.

Parameters
filenamesonglengthDB file name with full path.
Returns
false in case of errors, true otherwise.

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