private void OnAudioImporterGUI(bool selectionContainsTrackerFile)
        {
            if (!selectionContainsTrackerFile)
            {
                EditorGUILayout.PropertyField(this.m_ForceToMono);
                ++EditorGUI.indentLevel;
                EditorGUI.BeginDisabledGroup(!this.m_ForceToMono.boolValue);
                EditorGUILayout.PropertyField(this.m_Normalize);
                EditorGUI.EndDisabledGroup();
                --EditorGUI.indentLevel;
                EditorGUILayout.PropertyField(this.m_LoadInBackground);
            }
            BuildPlayerWindow.BuildPlatform[] array = BuildPlayerWindow.GetValidPlatforms().ToArray();
            GUILayout.Space(10f);
            int index = EditorGUILayout.BeginPlatformGrouping(array, GUIContent.Temp("Default"));

            if (index == -1)
            {
                bool disablePreloadAudioDataOption = this.m_DefaultSampleSettings.settings.loadType == AudioClipLoadType.Streaming;
                this.OnSampleSettingGUI(BuildTargetGroup.Unknown, this.GetMultiValueStatus(BuildTargetGroup.Unknown), selectionContainsTrackerFile, ref this.m_DefaultSampleSettings, disablePreloadAudioDataOption);
            }
            else
            {
                BuildTargetGroup targetGroup = array[index].targetGroup;
                AudioImporterInspector.SampleSettingProperties sampleSettingOverride = this.m_SampleSettingOverrides[targetGroup];
                AudioImporterInspector.OverrideStatus          overrideStatus        = this.GetOverrideStatus(targetGroup);
                EditorGUI.BeginChangeCheck();
                EditorGUI.showMixedValue = overrideStatus == AudioImporterInspector.OverrideStatus.MixedOverrides && !sampleSettingOverride.overrideIsForced;
                bool flag1 = sampleSettingOverride.overrideIsForced && sampleSettingOverride.forcedOverrideState || !sampleSettingOverride.overrideIsForced && overrideStatus != AudioImporterInspector.OverrideStatus.NoOverrides;
                bool flag2 = EditorGUILayout.Toggle("Override for " + array[index].name, flag1, new GUILayoutOption[0]);
                EditorGUI.showMixedValue = false;
                if (EditorGUI.EndChangeCheck())
                {
                    sampleSettingOverride.forcedOverrideState = flag2;
                    sampleSettingOverride.overrideIsForced    = true;
                }
                bool disablePreloadAudioDataOption = (sampleSettingOverride.overrideIsForced && sampleSettingOverride.forcedOverrideState || this.GetOverrideStatus(targetGroup) == AudioImporterInspector.OverrideStatus.AllOverrides) && sampleSettingOverride.settings.loadType == AudioClipLoadType.Streaming;
                AudioImporterInspector.MultiValueStatus multiValueStatus = this.GetMultiValueStatus(targetGroup);
                EditorGUI.BeginDisabledGroup((!sampleSettingOverride.overrideIsForced || !sampleSettingOverride.forcedOverrideState ? (overrideStatus == AudioImporterInspector.OverrideStatus.AllOverrides ? 1 : 0) : 1) == 0);
                this.OnSampleSettingGUI(targetGroup, multiValueStatus, selectionContainsTrackerFile, ref sampleSettingOverride, disablePreloadAudioDataOption);
                EditorGUI.EndDisabledGroup();
                this.m_SampleSettingOverrides[targetGroup] = sampleSettingOverride;
            }
            EditorGUILayout.EndPlatformGrouping();
        }
        private void OnSampleSettingGUI(BuildTargetGroup platform, AudioImporterInspector.MultiValueStatus status, bool selectionContainsTrackerFile, ref AudioImporterInspector.SampleSettingProperties properties, bool disablePreloadAudioDataOption)
        {
            EditorGUI.showMixedValue = status.multiLoadType && !properties.loadTypeChanged;
            EditorGUI.BeginChangeCheck();
            AudioClipLoadType audioClipLoadType = (AudioClipLoadType)EditorGUILayout.EnumPopup("Load Type", (Enum)properties.settings.loadType, new GUILayoutOption[0]);

            if (EditorGUI.EndChangeCheck())
            {
                properties.settings.loadType = audioClipLoadType;
                properties.loadTypeChanged   = true;
            }
            EditorGUI.BeginDisabledGroup(disablePreloadAudioDataOption);
            if (disablePreloadAudioDataOption)
            {
                EditorGUILayout.Toggle("Preload Audio Data", false, new GUILayoutOption[0]);
            }
            else
            {
                EditorGUILayout.PropertyField(this.m_PreloadAudioData);
            }
            EditorGUI.EndDisabledGroup();
            if (selectionContainsTrackerFile)
            {
                return;
            }
            AudioCompressionFormat[] formatsForPlatform = this.GetFormatsForPlatform(platform);
            EditorGUI.showMixedValue = status.multiCompressionFormat && !properties.compressionFormatChanged;
            EditorGUI.BeginChangeCheck();
            AudioCompressionFormat compressionFormat = (AudioCompressionFormat)EditorGUILayout.IntPopup("Compression Format", (int)properties.settings.compressionFormat, Array.ConvertAll <AudioCompressionFormat, string>(formatsForPlatform, (Converter <AudioCompressionFormat, string>)(value => value.ToString())), Array.ConvertAll <AudioCompressionFormat, int>(formatsForPlatform, (Converter <AudioCompressionFormat, int>)(value => (int)value)), new GUILayoutOption[0]);

            if (EditorGUI.EndChangeCheck())
            {
                properties.settings.compressionFormat = compressionFormat;
                properties.compressionFormatChanged   = true;
            }
            if (this.CompressionFormatHasQuality(properties.settings.compressionFormat))
            {
                EditorGUI.showMixedValue = status.multiQuality && !properties.qualityChanged;
                EditorGUI.BeginChangeCheck();
                int num = EditorGUILayout.IntSlider("Quality", (int)Mathf.Clamp(properties.settings.quality * 100f, 1f, 100f), 1, 100, new GUILayoutOption[0]);
                if (EditorGUI.EndChangeCheck())
                {
                    properties.settings.quality = 0.01f * (float)num;
                    properties.qualityChanged   = true;
                }
            }
            EditorGUI.showMixedValue = status.multiSampleRateSetting && !properties.sampleRateSettingChanged;
            EditorGUI.BeginChangeCheck();
            AudioSampleRateSetting sampleRateSetting = (AudioSampleRateSetting)EditorGUILayout.EnumPopup("Sample Rate Setting", (Enum)properties.settings.sampleRateSetting, new GUILayoutOption[0]);

            if (EditorGUI.EndChangeCheck())
            {
                properties.settings.sampleRateSetting = sampleRateSetting;
                properties.sampleRateSettingChanged   = true;
            }
            if (properties.settings.sampleRateSetting == AudioSampleRateSetting.OverrideSampleRate)
            {
                EditorGUI.showMixedValue = status.multiSampleRateOverride && !properties.sampleRateOverrideChanged;
                EditorGUI.BeginChangeCheck();
                int num = EditorGUILayout.IntPopup("Sample Rate", (int)properties.settings.sampleRateOverride, AudioImporterInspector.Styles.kSampleRateStrings, AudioImporterInspector.Styles.kSampleRateValues, new GUILayoutOption[0]);
                if (EditorGUI.EndChangeCheck())
                {
                    properties.settings.sampleRateOverride = (uint)num;
                    properties.sampleRateOverrideChanged   = true;
                }
            }
            EditorGUI.showMixedValue = false;
        }