1 /* 2 * This file is part of EasyRPG Player. 3 * 4 * EasyRPG Player is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 3 of the License, or 7 * (at your option) any later version. 8 * 9 * EasyRPG Player is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with EasyRPG Player. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef EP_MIDIOUT_WIN32_H 19 #define EP_MIDIOUT_WIN32_H 20 21 #ifdef _WIN32 22 23 // Headers 24 #include <string> 25 #include <windows.h> 26 #include <mmsystem.h> 27 #include "audio_midi.h" 28 29 /** 30 * Plays MIDI through the Windows API 31 */ 32 class Win32MidiOutDevice : public MidiDecoder { 33 public: 34 Win32MidiOutDevice(); 35 ~Win32MidiOutDevice(); 36 37 void SendMidiMessage(uint32_t message) override; 38 void SendSysExMessage(const uint8_t* data, size_t size) override; 39 void SendMidiReset() override; 40 std::string GetName() override; 41 bool IsInitialized() const; 42 43 private: 44 HMIDIOUT midi_out; 45 }; 46 #endif 47 48 #endif 49