public void Start() { if (m_pendingState == PendingStateChange.None) { m_pendingState = PendingStateChange.Play; if (state == State.Loaded) { StartInternal(); } } }
public void Stop() { if (m_pendingState != PendingStateChange.Stop) { m_pendingState = PendingStateChange.Stop; if (state == State.Playing) { StopInternal(); } else if (state == State.Loaded) { UnloadInternal(); } } }
internal AudioWorldMusicRequest(AudioReferenceWithParameters music, AudioReferenceWithParameters ambiance, [CanBeNull] AudioContext context, bool playAutomatically) : this() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) this.music = music; this.ambiance = ambiance; this.context = context; m_pendingState = (playAutomatically ? PendingStateChange.Play : PendingStateChange.None); Guid eventGuid = music.get_eventGuid(); Guid eventGuid2 = ambiance.get_eventGuid(); if (!AssetManager.get_isReady()) { Log.Error("Tried to load a world music but the AudioManager isn't ready.", 85, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Audio\\AudioWorldMusicRequest.cs"); Fail(AssetManagerError.op_Implicit(60)); return; } string bankName; if (eventGuid != Guid.Empty) { if (!AudioManager.TryGetDefaultBankName(eventGuid, out bankName)) { Log.Warning($"Could not get default bank name for requested world music with guid {eventGuid}.", 95, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Audio\\AudioWorldMusicRequest.cs"); Fail(AssetManagerError.op_Implicit(10)); return; } } else { bankName = string.Empty; } string bankName2; if (eventGuid2 != Guid.Empty) { if (!AudioManager.TryGetDefaultBankName(eventGuid2, out bankName2)) { Log.Warning($"Could not get default bank name for requested world ambiance with guid {eventGuid}.", 110, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Audio\\AudioWorldMusicRequest.cs"); Fail(AssetManagerError.op_Implicit(10)); return; } } else { bankName2 = string.Empty; } if (bankName.Length > 0) { m_musicBankLoadRequest = AudioManager.LoadBankAsync(bankName); } if (bankName2.Length > 0 && !bankName.Equals(bankName2)) { m_ambianceBankLoadRequest = AudioManager.LoadBankAsync(bankName2); } state = State.Loading; s_instances.Add(this); UpdateInternal(); }