My Project
MidiMsg.h
1 #pragma once
2 
3 namespace ParaEngine
4 {
6  class CMidiMsg
7  {
8  public:
9  CMidiMsg();
10  ~CMidiMsg(){
11  SafeRelease();
12  }
13 
14  static CMidiMsg& GetSingleton();
15  int PlayMidiMsg(DWORD dwMsg);
16 
17  void SafeRelease();
18 
19  bool CheckLoad();
20  // @param filename: if empty, it will stop last one.
21  static void PlayMidiFile(const std::string& filename, int nLoopCount = 0);
22 
27  DWORD GetVolume() const;
28  void SetVolume(DWORD val);
32  void SetVolumeFloat(float val);
33 
35  bool IsLoaded() const;
36  private:
37 #ifdef PARAENGINE_CLIENT
38  HMIDIOUT m_deviceMidiOut;
39 #endif
40  bool m_bIsValid;
41  bool m_bIsLoaded;
42 
43  DWORD m_dwVolume;
44  };
45 }
different physics engine has different winding order.
Definition: EventBinding.h:32
simple midi audio
Definition: MidiMsg.h:6
bool IsLoaded() const
only load when first note is played.
Definition: MidiMsg.cpp:79
DWORD GetVolume() const
New volume setting.
Definition: MidiMsg.cpp:50
void SetVolumeFloat(float val)
set both left/right volume
Definition: MidiMsg.cpp:70