GCC Code Coverage Report


Directory: src/
File: src/controller/rtmidi_controller.h
Date: 2022-05-10 08:17:32
Exec Total Coverage
Lines: 4 4 100.0%
Functions: 1 1 100.0%
Branches: 1 2 50.0%

Line Branch Exec Source
1 #ifndef RTMIDI_CONTROLLER_H
2 #define RTMIDI_CONTROLLER_H
3
4 #include "controller.h"
5
6 class RtMidiController : public Controller
7 {
8 public:
9 explicit RtMidiController(QObject *parent = nullptr);
10 ~RtMidiController() noexcept override;
11
12 [[nodiscard]] const QList<QString> &getInputMidiPort() const override;
13 [[nodiscard]] const QList<QString> &getOutputMidiPort() const override;
14
15 public slots:
16 void activateInputMidiPort(int index) override;
17 void activateInputMidiPort(QString port_name) override;
18 void activateOutputMidiPort(int index) override;
19 void activateOutputMidiPort(QString port_name) override;
20 protected:
21 void load_input_port();
22 void load_output_port();
23
24 protected:
25 1 static void emitSignalOnNewMessageStatic(double timeStamp, std::vector<unsigned char> *message, void *userData) {
26 1 auto *this_controller = reinterpret_cast<RtMidiController *>(userData);
27
1/2
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
1 if (this_controller != nullptr) this_controller->emitSignalOnNewMessage(timeStamp, message);
28 1 }
29 void emitSignalOnNewMessage(double timeStamp, std::vector<unsigned char> *message);
30
31 private:
32 RtMidiOut m_midiOut;
33 RtMidiIn m_midiIn;
34
35 QList<QString> m_inputMidi;
36 QList<QString> m_outputMidi;
37
38 signals:
39
40 };
41
42 #endif // RTMIDI_CONTROLLER_H
43