/* Arduino SID Copyright (c) 2015 Frank Bösing This library 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 3 of the License, or (at your option) any later version. This library 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 library. If not, see . Diese Bibliothek ist freie Software: Sie können es unter den Bedingungen der GNU General Public License, wie von der Free Software Foundation, Version 3 der Lizenz oder (nach Ihrer Wahl) jeder neueren veröffentlichten Version, weiterverbreiten und/oder modifizieren. Diese Bibliothek wird in der Hoffnung, dass es nützlich sein wird, aber OHNE JEDE GEWÄHRLEISTUNG, bereitgestellt; sogar ohne die implizite Gewährleistung der MARKTFÄHIGKEIT oder EIGNUNG FÜR EINEN BESTIMMTEN ZWECK. Siehe die GNU General Public License für weitere Details. Sie sollten eine Kopie der GNU General Public License zusammen mit diesem Programm erhalten haben. Wenn nicht, siehe . */ #include "sid.h" #ifndef play_sid_h_ #define play_sid_h_ #include class AudioPlaySID : public AudioStream { public: AudioPlaySID(void) : AudioStream(0, NULL) { begin(); } void begin(void); void setSampleParameters(float clockfreq, float samplerate); inline void setreg(int ofs, int val) { sid.write(ofs, val); } inline uint8_t getreg(int ofs) { return sid.read(ofs); } void reset(void); void stop(void); inline bool isPlaying(void) { return playing; } private: cycle_count csdelta; volatile bool playing; virtual void update(void); SID sid; SID* sidptr; }; #endif