public AudioViewerData(string mode, AudioInfo audioInfo) { _mode = (AudioViewerMode)Enum.Parse(typeof(AudioViewerMode), mode); ForceToMono = audioInfo.ForceToMono; LoadInBackground = audioInfo.LoadInBackground; Ambisonic = audioInfo.Ambisonic; StandAloneAudioClipLoadType = audioInfo.StandAloneAudioClipLoadType; AndroidAudioClipLoadType = audioInfo.AndroidAudioClipLoadType; iOSAudioClipLoadType = audioInfo.iOSAudioClipLoadType; StandAloneAudioCompressionFormat = audioInfo.StandAloneAudioCompressionFormat; AndroidAudioCompressionFormat = audioInfo.AndroidAudioCompressionFormat; iOSAudioCompressionFormat = audioInfo.iOSAudioCompressionFormat; OriginSize = audioInfo.OriginSize; CompressedSize = audioInfo.CompressedSize; All = "All"; }
public override ColumnType[] GetDataTable(string audioViewerMode) { AudioViewerMode audioViewerModeEnum = (AudioViewerMode)Enum.Parse(typeof(AudioViewerMode), audioViewerMode); switch (audioViewerModeEnum) { case AudioViewerMode.Size: return(new ColumnType[] { new ColumnType("All", "All", 0.2f, TextAnchor.MiddleCenter, ""), new ColumnType("Count", "Count", 0.2f, TextAnchor.MiddleCenter, ""), new ColumnType("TotalOriginSize", "OriginSize", 0.3f, TextAnchor.MiddleCenter, "<fmt_bytes>"), new ColumnType("TotalCompressedSize", "CompressedSize", 0.3f, TextAnchor.MiddleCenter, "<fmt_bytes>") }); case AudioViewerMode.MONO: return(new ColumnType[] { new ColumnType("ForceToMono", "Force to Mono", ViewerConst.LeftWidth, TextAnchor.MiddleCenter, ""), new ColumnType("Count", "Count", (1.0f - ViewerConst.LeftWidth) / 2.0f, TextAnchor.MiddleCenter, ""), new ColumnType("Memory", "Memory", (1.0f - ViewerConst.LeftWidth) / 2.0f, TextAnchor.MiddleCenter, "<fmt_bytes>") }); case AudioViewerMode.LoadInBackground: return(new ColumnType[] { new ColumnType("LoadInBackground", "Load in Background", ViewerConst.LeftWidth, TextAnchor.MiddleCenter, ""), new ColumnType("Count", "Count", (1.0f - ViewerConst.LeftWidth) / 2.0f, TextAnchor.MiddleCenter, ""), new ColumnType("Memory", "Memory", (1.0f - ViewerConst.LeftWidth) / 2.0f, TextAnchor.MiddleCenter, "<fmt_bytes>") }); case AudioViewerMode.Ambisonic: return(new ColumnType[] { new ColumnType("Ambisonic", "Ambisonic", ViewerConst.LeftWidth, TextAnchor.MiddleCenter, ""), new ColumnType("Count", "Count", (1.0f - ViewerConst.LeftWidth) / 2.0f, TextAnchor.MiddleCenter, ""), new ColumnType("Memory", "Memory", (1.0f - ViewerConst.LeftWidth) / 2.0f, TextAnchor.MiddleCenter, "<fmt_bytes>") }); case AudioViewerMode.AndroidLoadType: return(new ColumnType[] { new ColumnType("AndroidAudioClipLoadType", "AndroidLoadType", ViewerConst.LeftWidth, TextAnchor.MiddleCenter, ""), new ColumnType("Count", "Count", (1.0f - ViewerConst.LeftWidth) / 2.0f, TextAnchor.MiddleCenter, ""), new ColumnType("Memory", "Memory", (1.0f - ViewerConst.LeftWidth) / 2.0f, TextAnchor.MiddleCenter, "<fmt_bytes>") }); case AudioViewerMode.iOSLoadType: return(new ColumnType[] { new ColumnType("iOSAudioClipLoadType", "iOSLoadType", ViewerConst.LeftWidth, TextAnchor.MiddleCenter, ""), new ColumnType("Count", "Count", (1.0f - ViewerConst.LeftWidth) / 2.0f, TextAnchor.MiddleCenter, ""), new ColumnType("Memory", "Memory", (1.0f - ViewerConst.LeftWidth) / 2.0f, TextAnchor.MiddleCenter, "<fmt_bytes>") }); case AudioViewerMode.AndroidCompressionFormat: return(new ColumnType[] { new ColumnType("AndroidAudioCompressionFormat", "AndroidCompressionFormat", ViewerConst.LeftWidth, TextAnchor.MiddleCenter, ""), new ColumnType("Count", "Count", (1.0f - ViewerConst.LeftWidth) / 2.0f, TextAnchor.MiddleCenter, ""), new ColumnType("Memory", "Memory", (1.0f - ViewerConst.LeftWidth) / 2.0f, TextAnchor.MiddleCenter, "<fmt_bytes>") }); case AudioViewerMode.iOSCompressionFormat: return(new ColumnType[] { new ColumnType("iOSAudioCompressionFormat", "iOSCompressionFormat", ViewerConst.LeftWidth, TextAnchor.MiddleCenter, ""), new ColumnType("Count", "Count", (1.0f - ViewerConst.LeftWidth) / 2.0f, TextAnchor.MiddleCenter, ""), new ColumnType("Memory", "Memory", (1.0f - ViewerConst.LeftWidth) / 2.0f, TextAnchor.MiddleCenter, "<fmt_bytes>") }); default: throw new NotImplementedException(); } }