mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Changed MidiMessage::getTextFromTextMetaEvent() to handle utf-8 as well as ascii.
This commit is contained in:
parent
5913db4697
commit
1a83fbf3a4
1 changed files with 3 additions and 1 deletions
|
|
@ -682,7 +682,9 @@ bool MidiMessage::isTextMetaEvent() const noexcept
|
|||
|
||||
String MidiMessage::getTextFromTextMetaEvent() const
|
||||
{
|
||||
return String (reinterpret_cast <const char*> (getMetaEventData()), (size_t) getMetaEventLength());
|
||||
const char* const textData = reinterpret_cast <const char*> (getMetaEventData());
|
||||
return String (CharPointer_UTF8 (textData),
|
||||
CharPointer_UTF8 (textData + getMetaEventLength()));
|
||||
}
|
||||
|
||||
bool MidiMessage::isTrackNameEvent() const noexcept { return (data[1] == 3) && (*data == 0xff); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue