midisync.cpp
// Returns the number of the channel specified by the string 'tag'

Returns the number of the channel specified by the string 'tag'
Returns the number of the channel specified by the string ' tag '
bool MIDISong::GetChannelIndex(const char *tag, uint32_t &index) const
{
  uint32_t i = 0;
  for (vector<MIDITrack*>::const_iterator iter = m_tracks.begin(); iter != m_tracks.end(); ++iter)
  {
    string s1 = ToLower(tag);
    string s2 = ToLower((*iter)->GetTrackName());
    if (s1.compare(s2) != string::npos)
    {
      index = i;
      return true;
    }
    ++i;
  }
  return false;
}
bool MIDISong :: GetChannelIndex ( const char * tag , uint32_t & index ) const { uint32_t i = 0 ; for ( vector < MIDITrack * > :: const_iterator iter = m_tracks . begin ( ) ; iter != m_tracks . end ( ) ; ++ iter ) { string s1 = ToLower ( tag ) ; string s2 = ToLower ( ( * iter ) -> GetTrackName ( ) ) ; if ( s1 . compare ( s2 ) != string :: npos ) { index = i ; return true ; } ++ i ; } return false ; }
Returns the number of the channel specified by the string 'tag'
Returns the number of the channel specified by the string ' tag '