author | František Kučera <franta-hg@frantovo.cz> |
Sat, 19 Dec 2020 23:59:39 +0100 | |
branch | v_0 |
changeset 6 | bddcf2bf29f2 |
parent 2 | f34476ab597f |
child 12 | 15d87fdd6e6c |
permissions | -rw-r--r-- |
franta-hg@0 | 1 |
/** |
franta-hg@0 | 2 |
* DJM-Fix |
franta-hg@0 | 3 |
* Copyright © 2020 František Kučera (Frantovo.cz, GlobalCode.info) |
franta-hg@0 | 4 |
* |
franta-hg@0 | 5 |
* This program is free software: you can redistribute it and/or modify |
franta-hg@0 | 6 |
* it under the terms of the GNU General Public License as published by |
franta-hg@0 | 7 |
* the Free Software Foundation, version 3 of the License. |
franta-hg@0 | 8 |
* |
franta-hg@0 | 9 |
* This program is distributed in the hope that it will be useful, |
franta-hg@0 | 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
franta-hg@0 | 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
franta-hg@0 | 12 |
* GNU General Public License for more details. |
franta-hg@0 | 13 |
* |
franta-hg@0 | 14 |
* You should have received a copy of the GNU General Public License |
franta-hg@0 | 15 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
franta-hg@0 | 16 |
*/ |
franta-hg@1 | 17 |
#pragma once |
franta-hg@1 | 18 |
|
franta-hg@1 | 19 |
#include <vector> |
franta-hg@1 | 20 |
|
franta-hg@1 | 21 |
namespace djmfix { |
franta-hg@1 | 22 |
|
franta-hg@1 | 23 |
using MidiMessage = std::vector<uint8_t>; |
franta-hg@2 | 24 |
|
franta-hg@2 | 25 |
class MidiSender { |
franta-hg@2 | 26 |
public: |
franta-hg@2 | 27 |
virtual ~MidiSender() = default; |
franta-hg@2 | 28 |
virtual void send(MidiMessage midiMessage) = 0; |
franta-hg@2 | 29 |
}; |
franta-hg@1 | 30 |
|
franta-hg@1 | 31 |
class DJMFix { |
franta-hg@1 | 32 |
public: |
franta-hg@1 | 33 |
virtual ~DJMFix() = default; |
franta-hg@2 | 34 |
virtual void setMidiSender(MidiSender* midiSender) = 0; |
franta-hg@6 | 35 |
virtual void receive(const MidiMessage& midiMessage) = 0; |
franta-hg@1 | 36 |
virtual void start() = 0; |
franta-hg@1 | 37 |
virtual void stop() = 0; |
franta-hg@1 | 38 |
}; |
franta-hg@1 | 39 |
|
franta-hg@2 | 40 |
DJMFix* create(); |
franta-hg@1 | 41 |
|
franta-hg@1 | 42 |
} |