diff options
author | Chris Xiong <chirs241097@gmail.com> | 2020-05-12 00:58:40 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2020-05-12 00:58:40 +0800 |
commit | a7407edaf81c685d4a389785a405a53a5de4b148 (patch) | |
tree | e6e4f2d85f2172c94ac83a6e8f01e1e90a78ede9 /core/qmpmidioutrtmidi.hpp | |
parent | 437b7b16c322a8e53ac55a5f831098494d9a7073 (diff) | |
download | QMidiPlayer-a7407edaf81c685d4a389785a405a53a5de4b148.tar.xz |
Format EVERYTHING.
Hopefully this will make the source code less horrendous and actually
readable.
The command used was:
```
astyle --suffix=none --style=allman --attach-extern-c --attach-closing-while --indent-switches --indent-after-parens --pad-oper --pad-header --unpad-paren --align-pointer=name --recursive './*.cpp,*.hpp'
```
Diffstat (limited to 'core/qmpmidioutrtmidi.hpp')
-rw-r--r-- | core/qmpmidioutrtmidi.hpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/core/qmpmidioutrtmidi.hpp b/core/qmpmidioutrtmidi.hpp index 45662ba..8276cce 100644 --- a/core/qmpmidioutrtmidi.hpp +++ b/core/qmpmidioutrtmidi.hpp @@ -6,53 +6,53 @@ #include "../include/qmpcorepublic.hpp" struct qmpDeviceInitializer { - CMidiTrack initseq; - struct BankStore - { - std::unordered_map<uint8_t,std::string> presets; - std::string bankname; - }; - std::unordered_map<uint16_t,BankStore> banks; - uint8_t initv[130]; - uint8_t sinitv[16][130]; + CMidiTrack initseq; + struct BankStore + { + std::unordered_map<uint8_t, std::string> presets; + std::string bankname; + }; + std::unordered_map<uint16_t, BankStore> banks; + uint8_t initv[130]; + uint8_t sinitv[16][130]; - static qmpDeviceInitializer* parse(const char* path); + static qmpDeviceInitializer *parse(const char *path); }; class RtMidiOut; -class qmpMidiOutRtMidi:public qmpMidiOutDevice +class qmpMidiOutRtMidi : public qmpMidiOutDevice { private: - unsigned portid; - RtMidiOut* outport; - qmpDeviceInitializer* devinit; + unsigned portid; + RtMidiOut *outport; + qmpDeviceInitializer *devinit; public: - qmpMidiOutRtMidi(unsigned _portid); - ~qmpMidiOutRtMidi(); - void deviceInit(); - void deviceDeinit(); - void basicMessage(uint8_t type,uint8_t p1,uint8_t p2); - void extendedMessage(uint32_t length,const char *data); - void rpnMessage(uint8_t ch,uint16_t type,uint16_t val); - void nrpnMessage(uint8_t ch,uint16_t type,uint16_t val); - void panic(uint8_t ch); - void reset(uint8_t ch); - void onMapped(uint8_t ch,int refcnt); - void onUnmapped(uint8_t ch,int refcnt); - std::vector<std::pair<uint16_t,std::string>> getBankList(); - std::vector<std::pair<uint8_t,std::string>> getPresets(uint16_t bank); - std::string getPresetName(uint16_t bank,uint8_t preset); - bool getChannelPreset(int ch,uint16_t *bank,uint8_t *preset,std::string &presetname); - uint8_t getInitialCCValue(uint8_t cc,uint8_t ch); + qmpMidiOutRtMidi(unsigned _portid); + ~qmpMidiOutRtMidi(); + void deviceInit(); + void deviceDeinit(); + void basicMessage(uint8_t type, uint8_t p1, uint8_t p2); + void extendedMessage(uint32_t length, const char *data); + void rpnMessage(uint8_t ch, uint16_t type, uint16_t val); + void nrpnMessage(uint8_t ch, uint16_t type, uint16_t val); + void panic(uint8_t ch); + void reset(uint8_t ch); + void onMapped(uint8_t ch, int refcnt); + void onUnmapped(uint8_t ch, int refcnt); + std::vector<std::pair<uint16_t, std::string>> getBankList(); + std::vector<std::pair<uint8_t, std::string>> getPresets(uint16_t bank); + std::string getPresetName(uint16_t bank, uint8_t preset); + bool getChannelPreset(int ch, uint16_t *bank, uint8_t *preset, std::string &presetname); + uint8_t getInitialCCValue(uint8_t cc, uint8_t ch); - void setInitializerFile(const char* path); + void setInitializerFile(const char *path); }; class qmpRtMidiManager { - private: - static std::vector<std::pair<qmpMidiOutRtMidi*,std::string>> devices; - public: - static std::vector<std::pair<qmpMidiOutRtMidi*,std::string>> getDevices(); +private: + static std::vector<std::pair<qmpMidiOutRtMidi *, std::string>> devices; +public: + static std::vector<std::pair<qmpMidiOutRtMidi *, std::string>> getDevices(); }; #endif // QMPMIDIMAPPERS_H |