using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x0200013B RID: 315
[Token(Token = "0x200013B")]
public class GameAudioManager : MonoBehaviour
{
	// Token: 0x06000FCE RID: 4046 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000FCE")]
	[Address(RVA = "0x36AC00", Offset = "0x369C00", VA = "0x18036AC00")]
	public void Init()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000FCF RID: 4047 RVA: 0x000249F8 File Offset: 0x00022BF8
	[Token(Token = "0x6000FCF")]
	[Address(RVA = "0x36B0F0", Offset = "0x36A0F0", VA = "0x18036B0F0")]
	private void UpdateVolumeSettings(VolumeSettings settings)
	{
		float soundEffectVolume = settings.GetSoundEffectVolume();
		this.standardSEVolume = soundEffectVolume;
		float voiceVolume = settings.GetVoiceVolume();
		AudioSource audioSource = this.sfxPlayer;
		this.vocalSEVolume = voiceVolume;
		float num = this.standardSEVolume;
		audioSource.volume = num;
	}

	// Token: 0x06000FD0 RID: 4048 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000FD0")]
	[Address(RVA = "0x36AE50", Offset = "0x369E50", VA = "0x18036AE50")]
	public void PlayCanvasSE(UICanvasSFX effect)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000FD1 RID: 4049 RVA: 0x00024A3C File Offset: 0x00022C3C
	[Token(Token = "0x6000FD1")]
	[Address(RVA = "0x36AEE0", Offset = "0x369EE0", VA = "0x18036AEE0")]
	public void PlayHandlerSE(UIHandlerSFX effect)
	{
		while (effect != UIHandlerSFX.Voice)
		{
			float num = this.standardSEVolume;
			if (effect != UIHandlerSFX.Operation)
			{
				float num2;
				if (effect == UIHandlerSFX.MagicSelection)
				{
					num2 = num * 0.7f * 0.4f;
				}
				int num3 = 0;
				while (num2 <= (float)num3)
				{
				}
				GameAudioPackage gameAudioPackage = this.uiHandlerPack;
				AudioSource audioSource = this.sfxPlayer;
				AudioClip[] clips = gameAudioPackage.clips;
				AudioClip audioClip = clips[(int)effect];
				audioSource.PlayOneShot(audioClip, num2);
				return;
			}
		}
		float num4 = this.vocalSEVolume;
		int num5 = 0;
		if (num4 > (float)num5)
		{
			GameAudioPackage gameAudioPackage2 = this.uiHandlerPack;
			AudioSource audioSource2 = this.sfxPlayer;
			AudioClip audioClip2 = gameAudioPackage2.clips[10];
			audioSource2.PlayOneShot(audioClip2, num4);
			return;
		}
	}

	// Token: 0x06000FD2 RID: 4050 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000FD2")]
	[Address(RVA = "0x36AFD0", Offset = "0x369FD0", VA = "0x18036AFD0")]
	private void PlayStandardHandlerSE(UIHandlerSFX effect)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000FD3 RID: 4051 RVA: 0x00024AE4 File Offset: 0x00022CE4
	[Token(Token = "0x6000FD3")]
	[Address(RVA = "0x36B090", Offset = "0x36A090", VA = "0x18036B090")]
	private void PlayVoiceHandlerSE()
	{
		float num = this.vocalSEVolume;
		int num2 = 0;
		if (num > (float)num2)
		{
			GameAudioPackage gameAudioPackage = this.uiHandlerPack;
			AudioSource audioSource = this.sfxPlayer;
			AudioClip audioClip = gameAudioPackage.clips[10];
			audioSource.PlayOneShot(audioClip, num);
			return;
		}
	}

	// Token: 0x06000FD4 RID: 4052 RVA: 0x00024B2C File Offset: 0x00022D2C
	[Token(Token = "0x6000FD4")]
	[Address(RVA = "0x36B050", Offset = "0x36A050", VA = "0x18036B050")]
	public void PlayUpgradeSE()
	{
		AudioSource audioSource = this.sfxPlayer;
		AudioClip audioClip = this.upgradeSound;
		audioSource.clip = audioClip;
		this.sfxPlayer.Play();
	}

	// Token: 0x06000FD5 RID: 4053 RVA: 0x00024B60 File Offset: 0x00022D60
	[Token(Token = "0x6000FD5")]
	[Address(RVA = "0x36ABE0", Offset = "0x369BE0", VA = "0x18036ABE0")]
	public void FadeOutUpgradeSE()
	{
		this.sfxPlayer.Stop();
	}

	// Token: 0x06000FD6 RID: 4054 RVA: 0x00024B80 File Offset: 0x00022D80
	[Token(Token = "0x6000FD6")]
	[Address(RVA = "0x328C40", Offset = "0x327C40", VA = "0x180328C40")]
	public GameAudioManager()
	{
	}

	// Token: 0x04001A31 RID: 6705
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x4001A31")]
	[SerializeField]
	private float standardSEVolume;

	// Token: 0x04001A32 RID: 6706
	[FieldOffset(Offset = "0x1C")]
	[Token(Token = "0x4001A32")]
	[SerializeField]
	private float vocalSEVolume;

	// Token: 0x04001A33 RID: 6707
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x4001A33")]
	[SerializeField]
	private AudioSource sfxPlayer;

	// Token: 0x04001A34 RID: 6708
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x4001A34")]
	[SerializeField]
	private GameAudioPackage uiCanvasPack;

	// Token: 0x04001A35 RID: 6709
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x4001A35")]
	[SerializeField]
	private GameAudioPackage uiHandlerPack;

	// Token: 0x04001A36 RID: 6710
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x4001A36")]
	[SerializeField]
	private AudioClip upgradeSound;
}
