Change Spelling to "MIDIThru" (#131)

pull/135/head
probonopd 3 years ago committed by GitHub
parent 21753d5a6e
commit 2b59d0f576
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 26
      src/config.cpp
  2. 8
      src/config.h
  3. 6
      src/mididevice.cpp
  4. 2
      src/minidexed.ini

@ -48,22 +48,22 @@ void CConfig::Load (void)
m_nMIDIBaudRate = m_Properties.GetNumber ("MIDIBaudRate", 31250);
const char *pMIDIThrough = m_Properties.GetString ("MIDIThrough");
if (pMIDIThrough)
const char *pMIDIThru = m_Properties.GetString ("MIDIThru");
if (pMIDIThru)
{
std::string Arg (pMIDIThrough);
std::string Arg (pMIDIThru);
size_t nPos = Arg.find (',');
if (nPos != std::string::npos)
{
m_MIDIThroughIn = Arg.substr (0, nPos);
m_MIDIThroughOut = Arg.substr (nPos+1);
m_MIDIThruIn = Arg.substr (0, nPos);
m_MIDIThruOut = Arg.substr (nPos+1);
if ( m_MIDIThroughIn.empty ()
|| m_MIDIThroughOut.empty ())
if ( m_MIDIThruIn.empty ()
|| m_MIDIThruOut.empty ())
{
m_MIDIThroughIn.clear ();
m_MIDIThroughOut.clear ();
m_MIDIThruIn.clear ();
m_MIDIThruOut.clear ();
}
}
}
@ -116,14 +116,14 @@ unsigned CConfig::GetMIDIBaudRate (void) const
return m_nMIDIBaudRate;
}
const char *CConfig::GetMIDIThroughIn (void) const
const char *CConfig::GetMIDIThruIn (void) const
{
return m_MIDIThroughIn.c_str ();
return m_MIDIThruIn.c_str ();
}
const char *CConfig::GetMIDIThroughOut (void) const
const char *CConfig::GetMIDIThruOut (void) const
{
return m_MIDIThroughOut.c_str ();
return m_MIDIThruOut.c_str ();
}
bool CConfig::GetLCDEnabled (void) const

@ -71,8 +71,8 @@ public:
// MIDI
unsigned GetMIDIBaudRate (void) const;
const char *GetMIDIThroughIn (void) const; // "" if not specified
const char *GetMIDIThroughOut (void) const; // "" if not specified
const char *GetMIDIThruIn (void) const; // "" if not specified
const char *GetMIDIThruOut (void) const; // "" if not specified
// HD44780 LCD
// GPIO pin numbers are chip numbers, not header positions
@ -106,8 +106,8 @@ private:
bool m_bChannelsSwapped;
unsigned m_nMIDIBaudRate;
std::string m_MIDIThroughIn;
std::string m_MIDIThroughOut;
std::string m_MIDIThruIn;
std::string m_MIDIThruOut;
bool m_bLCDEnabled;
unsigned m_nLCDPinEnable;

@ -109,12 +109,12 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign
}
}
// handle MIDI through
if (m_DeviceName.compare (m_pConfig->GetMIDIThroughIn ()) == 0)
// Handle MIDI Thru
if (m_DeviceName.compare (m_pConfig->GetMIDIThruIn ()) == 0)
{
TDeviceMap::const_iterator Iterator;
Iterator = s_DeviceMap.find (m_pConfig->GetMIDIThroughOut ());
Iterator = s_DeviceMap.find (m_pConfig->GetMIDIThruOut ());
if (Iterator != s_DeviceMap.end ())
{
Iterator->second->Send (pMessage, nLength, nCable);

@ -13,7 +13,7 @@ ChannelsSwapped=0
# MIDI
MIDIBaudRate=31250
#MIDIThrough=umidi1,ttyS1
#MIDIThru=umidi1,ttyS1
# HD44780 LCD
LCDEnabled=1

Loading…
Cancel
Save