public static string GetColumnString(AudioProfilerInfoWrapper info, AudioProfilerInfoHelper.ColumnIndices index) { bool flag = (info.info.flags & 1) != 0; bool flag2 = (info.info.flags & 64) != 0; switch (index) { case AudioProfilerInfoHelper.ColumnIndices.ObjectName: return(info.objectName); case AudioProfilerInfoHelper.ColumnIndices.AssetName: return(info.assetName); case AudioProfilerInfoHelper.ColumnIndices.Volume: return(AudioProfilerInfoHelper.FormatDb(info.info.volume)); case AudioProfilerInfoHelper.ColumnIndices.Audibility: return((!flag2) ? AudioProfilerInfoHelper.FormatDb(info.info.audibility) : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.PlayCount: return((!flag2) ? info.info.playCount.ToString() : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.Is3D: return((!flag2) ? ((!flag) ? "NO" : (((info.info.flags & 2) == 0) ? "YES" : "Spatial")) : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.IsPaused: return((!flag2) ? (((info.info.flags & 4) == 0) ? "NO" : "YES") : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.IsMuted: return((!flag2) ? (((info.info.flags & 8) == 0) ? "NO" : "YES") : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.IsVirtual: return((!flag2) ? (((info.info.flags & 16) == 0) ? "NO" : "YES") : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.IsOneShot: return((!flag2) ? (((info.info.flags & 32) == 0) ? "NO" : "YES") : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.IsLooped: return((!flag2) ? (((info.info.flags & 512) == 0) ? "NO" : "YES") : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.DistanceToListener: return((!flag2) ? (flag ? ((info.info.distanceToListener < 1000f) ? string.Format("{0:0.00} m", info.info.distanceToListener) : string.Format("{0:0.00} km", info.info.distanceToListener * 0.001f)) : "N/A") : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.MinDist: return((!flag2) ? (flag ? ((info.info.minDist < 1000f) ? string.Format("{0:0.00} m", info.info.minDist) : string.Format("{0:0.00} km", info.info.minDist * 0.001f)) : "N/A") : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.MaxDist: return((!flag2) ? (flag ? ((info.info.maxDist < 1000f) ? string.Format("{0:0.00} m", info.info.maxDist) : string.Format("{0:0.00} km", info.info.maxDist * 0.001f)) : "N/A") : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.Time: return((!flag2) ? string.Format("{0:0.00} s", info.info.time) : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.Duration: return((!flag2) ? string.Format("{0:0.00} s", info.info.duration) : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.Frequency: return((!flag2) ? ((info.info.frequency < 1000f) ? string.Format("{0:0.00} Hz", info.info.frequency) : string.Format("{0:0.00} kHz", info.info.frequency * 0.001f)) : string.Format("{0:0.00} x", info.info.frequency)); case AudioProfilerInfoHelper.ColumnIndices.IsStream: return((!flag2) ? (((info.info.flags & 128) == 0) ? "NO" : "YES") : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.IsCompressed: return((!flag2) ? (((info.info.flags & 256) == 0) ? "NO" : "YES") : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.IsNonBlocking: return((!flag2) ? (((info.info.flags & 8192) == 0) ? "NO" : "YES") : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.IsOpenUser: return((!flag2) ? (((info.info.flags & 4096) == 0) ? "NO" : "YES") : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.IsOpenMemory: return((!flag2) ? (((info.info.flags & 1024) == 0) ? "NO" : "YES") : string.Empty); case AudioProfilerInfoHelper.ColumnIndices.IsOpenMemoryPoint: return((!flag2) ? (((info.info.flags & 2048) == 0) ? "NO" : "YES") : string.Empty); default: return("Unknown"); } }
public static string GetColumnString(AudioProfilerInfoWrapper info, AudioProfilerInfoHelper.ColumnIndices index) { bool flag1 = (info.info.flags & 1) != 0; bool flag2 = (info.info.flags & 64) != 0; switch (index) { case AudioProfilerInfoHelper.ColumnIndices.ObjectName: return(info.objectName); case AudioProfilerInfoHelper.ColumnIndices.AssetName: return(info.assetName); case AudioProfilerInfoHelper.ColumnIndices.Volume: return(AudioProfilerInfoHelper.FormatDb(info.info.volume)); case AudioProfilerInfoHelper.ColumnIndices.Audibility: if (flag2) { return(string.Empty); } return(AudioProfilerInfoHelper.FormatDb(info.info.audibility)); case AudioProfilerInfoHelper.ColumnIndices.PlayCount: if (flag2) { return(string.Empty); } return(info.info.playCount.ToString()); case AudioProfilerInfoHelper.ColumnIndices.Is3D: if (flag2) { return(string.Empty); } if (!flag1) { return("NO"); } return((info.info.flags & 2) != 0 ? "Spatial" : "YES"); case AudioProfilerInfoHelper.ColumnIndices.IsPaused: if (flag2) { return(string.Empty); } return((info.info.flags & 4) != 0 ? "YES" : "NO"); case AudioProfilerInfoHelper.ColumnIndices.IsMuted: if (flag2) { return(string.Empty); } return((info.info.flags & 8) != 0 ? "YES" : "NO"); case AudioProfilerInfoHelper.ColumnIndices.IsVirtual: if (flag2) { return(string.Empty); } return((info.info.flags & 16) != 0 ? "YES" : "NO"); case AudioProfilerInfoHelper.ColumnIndices.IsOneShot: if (flag2) { return(string.Empty); } return((info.info.flags & 32) != 0 ? "YES" : "NO"); case AudioProfilerInfoHelper.ColumnIndices.IsLooped: if (flag2) { return(string.Empty); } return((info.info.flags & 512) != 0 ? "YES" : "NO"); case AudioProfilerInfoHelper.ColumnIndices.DistanceToListener: if (flag2) { return(string.Empty); } if (!flag1) { return("N/A"); } if ((double)info.info.distanceToListener >= 1000.0) { return(string.Format("{0:0.00} km", (object)(float)((double)info.info.distanceToListener * (1.0 / 1000.0)))); } return(string.Format("{0:0.00} m", (object)info.info.distanceToListener)); case AudioProfilerInfoHelper.ColumnIndices.MinDist: if (flag2) { return(string.Empty); } if (!flag1) { return("N/A"); } if ((double)info.info.minDist >= 1000.0) { return(string.Format("{0:0.00} km", (object)(float)((double)info.info.minDist * (1.0 / 1000.0)))); } return(string.Format("{0:0.00} m", (object)info.info.minDist)); case AudioProfilerInfoHelper.ColumnIndices.MaxDist: if (flag2) { return(string.Empty); } if (!flag1) { return("N/A"); } if ((double)info.info.maxDist >= 1000.0) { return(string.Format("{0:0.00} km", (object)(float)((double)info.info.maxDist * (1.0 / 1000.0)))); } return(string.Format("{0:0.00} m", (object)info.info.maxDist)); case AudioProfilerInfoHelper.ColumnIndices.Time: if (flag2) { return(string.Empty); } return(string.Format("{0:0.00} s", (object)info.info.time)); case AudioProfilerInfoHelper.ColumnIndices.Duration: if (flag2) { return(string.Empty); } return(string.Format("{0:0.00} s", (object)info.info.duration)); case AudioProfilerInfoHelper.ColumnIndices.Frequency: if (flag2) { return(string.Format("{0:0.00} x", (object)info.info.frequency)); } if ((double)info.info.frequency >= 1000.0) { return(string.Format("{0:0.00} kHz", (object)(float)((double)info.info.frequency * (1.0 / 1000.0)))); } return(string.Format("{0:0.00} Hz", (object)info.info.frequency)); case AudioProfilerInfoHelper.ColumnIndices.IsStream: if (flag2) { return(string.Empty); } return((info.info.flags & 128) != 0 ? "YES" : "NO"); case AudioProfilerInfoHelper.ColumnIndices.IsCompressed: if (flag2) { return(string.Empty); } return((info.info.flags & 256) != 0 ? "YES" : "NO"); case AudioProfilerInfoHelper.ColumnIndices.IsNonBlocking: if (flag2) { return(string.Empty); } return((info.info.flags & 8192) != 0 ? "YES" : "NO"); case AudioProfilerInfoHelper.ColumnIndices.IsOpenUser: if (flag2) { return(string.Empty); } return((info.info.flags & 4096) != 0 ? "YES" : "NO"); case AudioProfilerInfoHelper.ColumnIndices.IsOpenMemory: if (flag2) { return(string.Empty); } return((info.info.flags & 1024) != 0 ? "YES" : "NO"); case AudioProfilerInfoHelper.ColumnIndices.IsOpenMemoryPoint: if (flag2) { return(string.Empty); } return((info.info.flags & 2048) != 0 ? "YES" : "NO"); default: return("Unknown"); } }