12 #if defined WIN32 || defined _WIN32
13 #define SLEEP(x) Sleep(x)
14 #elif defined __GNUC__
17 #define SLEEP(x) std::this_thread::sleep_for(std::chrono::milliseconds(x))
23 : m_nOutPort(nMIDIOutPortID), m_nTimerRes(nMIDITimerResMS)
44 if(
false == m_Parser.
Parse(strMusicNotes))
64 m_Parser.
Parse(strMusicNotes);
66 return m_Renderer.
SaveToFile(szOutputFilePath);
71 return m_Renderer.
SaveToFile(szOutputFilePath);
void AddListener(CParserListener *pListener)
Subscribes a Listener object for all events
bool PlayAsync(const MString &strMusicNotes)
bool BeginPlayAsync(int nMIDIOutPortID=MIDI_MAPPER, unsigned int nTimerResolutionMS=20)
bool Parse(const TCHAR *szTokens)
bool Play(const MString &strMusicNotes)
bool SaveToFile(const char *szOutputFilePath)
Player(unsigned int nMIDIOutPortID=MIDI_MAPPER, unsigned int nMIDITimerResMS=20)
Helper class for simple string manipulations
bool SaveAsMidiFile(const MString &strMusicNotes, const char *szOutputFilePath)
bool SaveToMidiFile(const char *szOutputFilePath)