public float GetElementAsFloat(int index) { if (index >= _typeTags.Count) { return(0); } var tag = _typeTags[index]; var offs = _offsets[index]; if (tag == 'f') { return(OscDataTypes.ReadFloat(_sharedBuffer, offs)); } if (tag == 'i') { return(OscDataTypes.ReadInt(_sharedBuffer, offs)); } return(0); }
public float GetElementAsFloat(int index) { if (index >= _typeTags.Count) { return(0); } var tag = _typeTags[index]; var offs = _offsets[index]; switch (tag) { case 'f': return(OscDataTypes.ReadFloat(_sharedBuffer, offs)); case 'i': return(OscDataTypes.ReadInt(_sharedBuffer, offs)); default: return(0); } }
public string GetElementAsString(int index) { if (index >= _typeTags.Count) { return(""); } var tag = _typeTags[index]; var offs = _offsets[index]; if (tag == 's') { return(OscDataTypes.ReadString(_sharedBuffer, offs)); } if (tag == 'i') { return(OscDataTypes.ReadInt(_sharedBuffer, offs).ToString()); } if (tag == 'f') { return(OscDataTypes.ReadFloat(_sharedBuffer, offs).ToString()); } return(""); }
public string GetElementAsString(int index) { if (index >= _typeTags.Count) { return(""); } var tag = _typeTags[index]; var offs = _offsets[index]; switch (tag) { case 's': return(OscDataTypes.ReadString(_sharedBuffer, offs)); case 'i': return(OscDataTypes.ReadInt(_sharedBuffer, offs).ToString()); case 'f': return(OscDataTypes.ReadFloat(_sharedBuffer, offs).ToString()); default: return(""); } }