DJMFix.cpp
branchv_0
changeset 1 98274757fcf6
parent 0 4ee5349be21d
child 2 f34476ab597f
     1.1 --- a/DJMFix.cpp	Fri Dec 18 20:13:05 2020 +0100
     1.2 +++ b/DJMFix.cpp	Fri Dec 18 21:35:36 2020 +0100
     1.3 @@ -14,3 +14,42 @@
     1.4   * You should have received a copy of the GNU General Public License
     1.5   * along with this program. If not, see <http://www.gnu.org/licenses/>.
     1.6   */
     1.7 +#include <iostream>
     1.8 +
     1.9 +#include "DJMFix.h"
    1.10 +
    1.11 +namespace djmfix {
    1.12 +
    1.13 +class DJMFixImpl : public DJMFix {
    1.14 +private:
    1.15 +	MidiSender midiSender;
    1.16 +public:
    1.17 +
    1.18 +	DJMFixImpl(MidiSender midiSender) : midiSender(midiSender) {
    1.19 +		std::cerr << "DJMFixImpl()" << std::endl; // TODO: do not mess STDIO
    1.20 +	}
    1.21 +
    1.22 +	virtual ~DJMFixImpl() override {
    1.23 +		std::cerr << "~DJMFixImpl()" << std::endl; // TODO: do not mess STDIO
    1.24 +	}
    1.25 +
    1.26 +	virtual void receive(MidiMessage midiMessage) override {
    1.27 +		std::cerr << "DJMFixImpl::receive()" << std::endl; // TODO: do not mess STDIO
    1.28 +
    1.29 +		midiSender({0xf0, 0xf7});
    1.30 +	}
    1.31 +
    1.32 +	void start() override {
    1.33 +		std::cerr << "DJMFixImpl::start()" << std::endl; // TODO: do not mess STDIO
    1.34 +	}
    1.35 +
    1.36 +	void stop() override {
    1.37 +		std::cerr << "DJMFixImpl::stop()" << std::endl; // TODO: do not mess STDIO
    1.38 +	}
    1.39 +};
    1.40 +
    1.41 +DJMFix* create(MidiSender midiSender) {
    1.42 +	return new DJMFixImpl(midiSender);
    1.43 +}
    1.44 +
    1.45 +}