Skip to content

Commit

Permalink
Add call to set Serial options to prevent CR to CRLF conversion (#311)
Browse files Browse the repository at this point in the history
Co-authored-by: probonopd <[email protected]>
  • Loading branch information
diyelectromusic and probonopd authored Aug 25, 2022
1 parent aa5a7c7 commit dcbd04c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/serialmididevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ CSerialMIDIDevice::~CSerialMIDIDevice (void)
boolean CSerialMIDIDevice::Initialize (void)
{
assert (m_pConfig);
return m_Serial.Initialize (m_pConfig->GetMIDIBaudRate ());
boolean res = m_Serial.Initialize (m_pConfig->GetMIDIBaudRate ());
unsigned ser_options = m_Serial.GetOptions();
// Ensure CR->CRLF translation is disabled for MIDI links
ser_options &= ~(SERIAL_OPTION_ONLCR);
m_Serial.SetOptions(ser_options);
return res;
}

void CSerialMIDIDevice::Process (void)
Expand Down

0 comments on commit dcbd04c

Please sign in to comment.