SidTune.h
/*
* This file is part of libsidplayfp, a SID player engine.
*
* Copyright 2011-2013 Leandro Nini <drfiemost@users.sourceforge.net>
* Copyright 2007-2010 Antti Lankila
* Copyright 2000 Simon White
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef SIDTUNE_H
#define SIDTUNE_H
#include <stdint.h>
#include <memory>
#include "sidplayfp/siddefs.h"
class SidTuneInfo;
class SidTuneBase;
class sidmemory;
class SID_EXTERN SidTune
{
public:
static const int MD5_LENGTH = 32;
private:
static const char** fileNameExtensions;
private: // -------------------------------------------------------------
std::auto_ptr<SidTuneBase> tune;
const char* m_statusString;
bool m_status;
public: // ----------------------------------------------------------------
SidTune(const char* fileName, const char **fileNameExt = 0,
bool separatorIsSlash = false);
SidTune(const uint_least8_t* oneFileFormatSidtune, uint_least32_t sidtuneLength);
virtual ~SidTune();
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);
const uint_least8_t* c64Data() const;
private: // prevent copying
SidTune(const SidTune&);
SidTune& operator=(SidTune&);
};
#endif /* SIDTUNE_H */
SidTune
Definition: SidTune.h:38
SidTuneInfo
Definition: SidTuneInfo.h:38
SidTuneBase
Definition: SidTuneBase.h:55
sidmemory
Definition: sidmemory.h:30