libsidplayfp
1.0.3
|
00001 /* 00002 * This file is part of libsidplayfp, a SID player engine. 00003 * 00004 * Copyright 2011-2013 Leandro Nini <drfiemost@users.sourceforge.net> 00005 * Copyright 2007-2010 Antti Lankila 00006 * Copyright 2000 Simon White 00007 * 00008 * This program is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00021 */ 00022 00023 #ifndef SIDPLAYFP_H 00024 #define SIDPLAYFP_H 00025 00026 #include <stdint.h> 00027 #include <stdio.h> 00028 00029 #include "sidplayfp/siddefs.h" 00030 #include "sidplayfp/sidversion.h" 00031 00032 class SidConfig; 00033 class SidTune; 00034 class SidInfo; 00035 class EventContext; 00036 class SidTuneInfo; 00037 00038 // Private Sidplayer 00039 namespace SIDPLAYFP_NAMESPACE 00040 { 00041 class Player; 00042 } 00043 00047 class SID_EXTERN sidplayfp 00048 { 00049 private: 00050 SIDPLAYFP_NAMESPACE::Player &sidplayer; 00051 00052 public: 00053 sidplayfp(); 00054 ~sidplayfp(); 00055 00061 const SidConfig &config() const; 00062 00068 const SidInfo &info() const; 00069 00077 bool config(const SidConfig &cfg); 00078 00084 const char *error() const; 00085 00091 bool fastForward(unsigned int percent); 00092 00100 bool load(SidTune *tune); 00101 00109 uint_least32_t play(short *buffer, uint_least32_t count); 00110 00116 bool isPlaying() const; 00117 00121 void stop(); 00122 00131 void debug(bool enable, FILE *out); 00132 00140 void mute(unsigned int sidNum, unsigned int voice, bool enable); 00141 00147 uint_least32_t time() const; 00148 00157 void setRoms(const uint8_t* kernal, const uint8_t* basic=0, const uint8_t* character=0); 00158 00164 EventContext *getEventContext(); 00165 00169 uint_least16_t getCia1TimerA() const; 00170 }; 00171 00172 #endif // SIDPLAYFP_H