class DynamicMusicPlayerSource
Constructors 1
void DynamicMusicPlayer(DynamicMusicPlayerRegistry configuration)References ScriptCallQueue.CallLater(), DayZGame.GetCallQueue(), DayZGame.GetProfileOptionInt()
Show 17 more
, ScriptInvoker.Insert(), SetTimeOfDate(), WorldDataDaytime.ANY, m_ActualTimeOfDay, m_CategorySelected, m_Created, m_DynamicMusicPlayerRegistry, m_FadeoutTimeElapsed, m_FadeoutTimeRequested, m_LastPlayedTrackBufferPerCategory, m_LocationsDynamic, DayZProfilesOptions.m_OnIntOptionChanged, m_RequestedPlaybackMode, m_TracksLocationMatchedPlayerInside, m_TracksLocationStaticCached, m_TracksLocationStaticPrioritizedCached, and TRACKS_BUFFER_HISTORY_SIZEReferenced by MissionBase.MissionBase()
Constants 7
protected const float TICK_TIME_OF_DATE_UPDATE_SECONDS = 10.0protected const float TICK_LOCATION_CACHE_UPDATE_SECONDS = 10.0protected const float TICK_LOCATION_UPDATE_SECONDS = 5.0protected const float TICK_PRIORITY_LOCATION_UPDATE_SECONDS = 2.0protected const float TICK_FADEOUT_PROCESSOR_SECONDS = 0.2Referenced by OnUpdate()
protected const int TRACKS_BUFFER_HISTORY_SIZE = 2protected const float LOCATION_DISTANCE_MAX = 500Referenced by RefreshTracksCache()
Members 25
protected float m_TickTimeOfDateElapsedprotected float m_TickLocationCacheUpdateElapsedprotected float m_TickLocationUpdateElapsedprotected float m_TickPriorityLocationUpdateElapsedprotected float m_TickFadeOutProcessingElapsedReferenced by OnUpdate()
protected int m_ActualTimeOfDayReferenced by DisplayDebugStats(), DynamicMusicPlayer(), SetSelectedTrackFromCategory()
Show 1 more
, SetTimeOfDate()protected EDynamicMusicPlayerCategory m_CategorySelectedReferenced by DetermineTrackByCategory(), DisplayDebugStats(), DynamicMusicPlayer()
Show 5 more
, IsPriotitizedCategorySelected(), OnLocationMatched(), OnProfileOptionChanged(), OnUpdate(), and SetCategory()protected DynamicMusicTrackData m_CurrentTrackReferenced by DisplayDebugStats(), FadeoutTrack(), OnNextTrackSelected()
Show 4 more
, OnTrackEnded(), OnTrackStopped(), PlayTrack(), and ResetWaitingQueue()protected ref DynamicMusicPlayerRegistry m_DynamicMusicPlayerRegistryprotected ref map<int, ref DynamicMusicLocationDynamicData> m_LocationsDynamicReferenced by DisplayStaticLocations(), DynamicMusicPlayer(), OnUpdate()
Show 2 more
, RegisterDynamicLocation(), and UnregisterDynamicLocation()private ref array<ref DynamicMusicTrackData> m_TracksLocationStaticCachedmap of dynamically registered locations during runtime
Referenced by DisplayDebugStats(), DisplayStaticLocations(), DynamicMusicPlayer()
Show 2 more
, OnUpdate(), and RefreshTracksCache()private ref array<ref DynamicMusicTrackData> m_TracksLocationStaticPrioritizedCachedstatic prio + filtered by the distance between player and center of zone
Referenced by DisplayDebugStats(), DisplayStaticLocations(), DynamicMusicPlayer()
Show 2 more
, OnUpdate(), and RefreshTracksCache()protected ref array<ref DynamicMusicTrackData> m_TracksLocationMatchedPlayerInsideReferenced by DetermineTrackByCategory(), DisplayDebugStats(), DynamicMusicPlayer()
Show 1 more
, PlayerInsideOfLocationFilter()protected AbstractWave m_SoundPlayingReferenced by DisplayDebugStats(), FadeoutTrack(), IsPlaybackActive()
Show 7 more
, OnFadeoutFinished(), OnLocationMatched(), OnTrackEnded(), OnTrackStopped(), PlayTrack(), ProcessFadeOut(), and StopTrack()private bool m_WaitingForPlaybackReferenced by DisplayDebugStats(), IsPlaybackActive(), OnLocationMatched()
Show 5 more
, OnNextTrackSelected(), OnTrackEnded(), OnTrackStopped(), PlayTrack(), and ResetWaitingQueue()private int m_RequestedPlaybackModeprivate ref map<EDynamicMusicPlayerCategory, ref SimpleCircularBuffer<int>> m_LastPlayedTrackBufferPerCategorygets the playback mode as set in sounds menu; 0 - all; 1 - menu only
Referenced by DynamicMusicPlayer(), SelectRandomTrackIndexFromCategory(), and SetSelectedTrackFromCategory()
private vector m_PlayerPositionReferenced by DisplayDebugStats(), OnUpdate(), PlayerInsideOfLocationFilter()
Show 1 more
, RefreshTracksCache()private float m_FadeoutTimeElapsedprivate float m_FadeoutTimeRequestedprivate bool m_FadeoutInProgressprivate bool m_Createdprivate ref array<Shape> m_DebugShapesLocations = new array<Shape>()DIAG_DEVELOPERReferenced by DisplayStaticLocations()
private ref array<Shape> m_DebugShapesLocationsVertices = new array<Shape>()DIAG_DEVELOPERprivate float m_DebugWaitTime = 0DIAG_DEVELOPERMethods 37
void OnUpdate(float timeslice)fadeout settings
References Math.Clamp(), DetermineTrackByCategory(), DisplayDebugStats()
Show 34 more
, DisplayStaticLocations(), new DynamicMusicPlayerCategoryPlaybackData(), DiagMenu.GetBool(), CGame.GetPlayer(), Object.GetPosition(), IsPlaybackActive(), IsPriotitizedCategorySelected(), OnFadeoutFinished(), OnLocationMatched(), PlayerInsideOfLocationFilter(), ProcessFadeOut(), RefreshTracksCache(), SetCategory(), SetTimeOfDate(), DynamicMusicPlayerCategoryPlaybackData.m_Category, m_CategorySelected, m_DynamicMusicPlayerRegistry, m_FadeoutInProgress, m_FadeoutTimeElapsed, m_FadeoutTimeRequested, m_LocationsDynamic, m_PlayerPosition, m_TickFadeOutProcessingElapsed, m_TickLocationCacheUpdateElapsed, m_TickLocationUpdateElapsed, m_TickPriorityLocationUpdateElapsed, m_TickTimeOfDateElapsed, m_TracksLocationStaticCached, m_TracksLocationStaticPrioritizedCached, TICK_FADEOUT_PROCESSOR_SECONDS, TICK_LOCATION_CACHE_UPDATE_SECONDS, TICK_LOCATION_UPDATE_SECONDS, TICK_PRIORITY_LOCATION_UPDATE_SECONDS, and TICK_TIME_OF_DATE_UPDATE_SECONDSReferenced by MissionBase.OnUpdate()
void SetCategory(DynamicMusicPlayerCategoryPlaybackData playbackData)works as default category selector
Referenced by CreditsMenu.OnHide(), CreditsMenu.OnShow(), DisplayDebugStats()
Show 5 more
, OnFadeoutFinished(), OnGameEvent(), OnLocationMatched(), OnUpdate(), and MissionMainMenu.OnMissionStart()pass to fadeout handler
Referenced by ContaminatedArea_Base.InitZoneClient()
void UnregisterDynamicLocation(notnull Entity caller)Referenced by ContaminatedArea_Base.EEDelete()
References new DynamicMusicPlayerCategoryPlaybackData(), SetCategory(), SetTimeOfDate()
Show 1 more
, DynamicMusicPlayerCategoryPlaybackData.m_CategoryReferenced by MissionBase.OnEvent()
protected bool IsPriotitizedCategorySelected()References m_CategorySelected
protected void DetermineTrackByCategory(EDynamicMusicPlayerCategory category)References ScriptCallQueue.CallLater(), DayZGame.GetCallQueue(), IsPlaybackActive()
Show 10 more
, SetSelectedTrackFromCategory(), DynamicMusicPlayerTrackHistoryLookupType.BUFFER, m_CategorySelected, m_DynamicMusicPlayerRegistry, m_RequestedPlaybackMode, DynamicMusicPlayerRegistry.m_TracksCredits, DynamicMusicPlayerRegistry.m_TracksLocationDynamic, m_TracksLocationMatchedPlayerInside, DynamicMusicPlayerRegistry.m_TracksMenu, and DynamicMusicPlayerRegistry.m_TracksTimeprotected bool IsPlaybackActive()protected void OnProfileOptionChanged(EDayZProfilesOptions option, int value)Events --------------------------------------------------------------------------------
References ResetWaitingQueue(), StopTrack(), m_CategorySelected
Show 1 more
, m_RequestedPlaybackModeprotected void OnCategorySet(EDynamicMusicPlayerCategory category, bool forced)References DetermineTrackByCategory(), DMPDebugPrint(), EnumTools.EnumToString()
Show 1 more
, string.Format()Referenced by SetCategory()
protected void OnTrackEnded()References DMPDebugPrint(), string.Format(), m_CurrentTrack
Show 3 more
, m_SoundPlaying, DynamicMusicTrackData.m_SoundSet, and m_WaitingForPlaybackprotected void OnTrackStopped()References DMPDebugPrint(), string.Format(), m_CurrentTrack
Show 3 more
, m_SoundPlaying, DynamicMusicTrackData.m_SoundSet, and m_WaitingForPlaybackprotected void OnNextTrackSelected(DynamicMusicTrackData track, float waitTime)stopped only by fadeouts
Referenced by SetSelectedTrackFromCategory()
protected void OnLocationMatched(EDynamicMusicPlayerCategory category, bool isPriorityLocation)Referenced by OnUpdate()
protected void OnFadeoutFinished(EDynamicMusicPlayerCategory category)play location track (no fadeout)
References new DynamicMusicPlayerCategoryPlaybackData(), AbstractWave.GetEvents(), IsPriotitizedCategorySelected()
Referenced by OnUpdate()
private void PlayTrack(DynamicMusicTrackData track)--------------------------------------------------------------------------------
References SoundObjectBuilder.BuildSoundObject(), AbstractWave.GetEvents(), CGame.GetSoundScene()
Show 13 more
, ScriptInvoker.Insert(), ScriptInvoker.Insert(), SoundParams.IsValid(), AbstractWave.Loop(), AbstractWave.Play(), AbstractSoundScene.Play2D(), SoundObject.SetKind(), new SoundObjectBuilder(), new SoundParams(), m_CurrentTrack, m_SoundPlaying, DynamicMusicTrackData.m_SoundSet, and m_WaitingForPlaybackprivate void StopTrack()invalid sound set is used
private void ResetWaitingQueue()References DayZGame.GetCallQueue(), ScriptCallQueue.Remove(), m_CurrentTrack
Show 1 more
, m_WaitingForPlaybackReferenced by DisplayDebugStats(), FadeoutTrack(), OnLocationMatched()
Show 1 more
, OnProfileOptionChanged()private void FadeoutTrack(float fadeoutSeconds)Referenced by SetCategory()
private void ProcessFadeOut()References AbstractWave.SetFadeOutFactor(), m_FadeoutTimeElapsed, m_FadeoutTimeRequested
Show 1 more
, m_SoundPlayingReferenced by OnUpdate()
private bool PlayerInsideOfLocationFilter(array<ref DynamicMusicTrackData> locations)References array.Clear(), array.Count(), array.Count()
Show 13 more
, DMPDebugPrint(), array.Find(), string.Format(), array.Insert(), Math2D.IsPointInPolygonXZ(), Math.IsPointInRectangle(), DynamicMusicLocationShape.BOX, DynamicMusicTrackData.locationBoundaries, m_PlayerPosition, DynamicMusicTrackData.m_Shape, m_TracksLocationMatchedPlayerInside, DynamicMusicLocationShape.POLYGON, and DynamicMusicTrackData.verticesReferenced by OnUpdate()
private bool PlayerInsideOfLocationFilter(map<int, ref DynamicMusicLocationDynamicData> locations)Referenced by OnUpdate()
private bool SetSelectedTrackFromCategory(EDynamicMusicPlayerCategory category, notnull array<ref DynamicMusicTrackData> tracklist, int historyLookupType = DynamicMusicPlayerTrackHistoryLookupType.ANY)Referenced by DetermineTrackByCategory()
private int SelectRandomTrackIndexFromCategoryPriorityFlagFirst(EDynamicMusicPlayerCategory category, notnull array<ref DynamicMusicTrackData> tracks)currently prioritize main menu track on DMP start
References array.Count(), array.GetRandomIndex(), array.GetRandomIndex()
Show 2 more
, array.Insert(), and DynamicMusicTrackData.m_HasPriorityReferenced by SetSelectedTrackFromCategory()
private int SelectRandomTrackIndexFromCategory(EDynamicMusicPlayerCategory category, int lookupType, notnull array<ref DynamicMusicTrackData> tracks)fallback in case there is no priority track
Referenced by SetSelectedTrackFromCategory()
private void SetTimeOfDate()References WorldData.GetDaytime(), CGame.GetMission(), Mission.GetWorldData()
Show 2 more
, WorldDataDaytime.DAY, and m_ActualTimeOfDayprotected float GetWaitTimeForCategory(EDynamicMusicPlayerCategory category)References GetMaxWaitTimePerCategory(), GetMinWaitTimePerCategory(), and Math.RandomFloatInclusive()
Referenced by SetSelectedTrackFromCategory()
private float GetMinWaitTimePerCategory(EDynamicMusicPlayerCategory category)References FeatureTimeAccel.GetFeatureTimeAccelEnabled(), FeatureTimeAccel.GetFeatureTimeAccelValue(), m_DynamicMusicPlayerRegistry
Show 1 more
, DynamicMusicPlayerRegistry.m_SettingsByCategoryReferenced by GetWaitTimeForCategory()
private float GetMaxWaitTimePerCategory(EDynamicMusicPlayerCategory category)References FeatureTimeAccel.GetFeatureTimeAccelEnabled(), FeatureTimeAccel.GetFeatureTimeAccelValue(), m_DynamicMusicPlayerRegistry
Show 1 more
, DynamicMusicPlayerRegistry.m_SettingsByCategoryReferenced by GetWaitTimeForCategory()
private float GetPreviousTrackFadeoutSeconds(EDynamicMusicPlayerCategory category)Referenced by SetCategory()
private void RefreshTracksCache()References Math.CenterOfRectangle(), array.Clear(), array.Clear()
Show 13 more
, vector.Distance(), array.Insert(), array.Insert(), DynamicMusicLocationShape.BOX, LOCATION_DISTANCE_MAX, DynamicMusicTrackData.locationBoundaries, m_DynamicMusicPlayerRegistry, m_PlayerPosition, DynamicMusicTrackData.m_Shape, DynamicMusicPlayerRegistry.m_TracksLocationStatic, m_TracksLocationStaticCached, DynamicMusicPlayerRegistry.m_TracksLocationStaticPrioritized, and m_TracksLocationStaticPrioritizedCachedReferenced by OnUpdate()
private void DisplayDebugStats(bool enabled)DIAG_DEVELOPERReferences DbgUI.Begin(), DbgUI.Button(), array.Count()
Show 47 more
, array.Count(), array.Count(), array.Count(), array.Count(), array.Count(), array.Count(), new DynamicMusicPlayerCategoryPlaybackData(), DbgUI.End(), EnumTools.EnumToString(), string.Format(), DayZGame.GetCallQueue(), ScriptCallQueue.GetRemainingTime(), ResetWaitingQueue(), SetCategory(), StopTrack(), DbgUI.Text(), WorldDataDaytime.ToString(), bool.ToString(), vector.ToString(), bool.ToString(), m_ActualTimeOfDay, DynamicMusicTrackData.m_Category, DynamicMusicPlayerCategoryPlaybackData.m_Category, m_CategorySelected, m_CurrentTrack, m_DebugWaitTime, m_DynamicMusicPlayerRegistry, m_PlayerPosition, m_SoundPlaying, DynamicMusicTrackData.m_SoundSet, m_TickLocationCacheUpdateElapsed, m_TickLocationUpdateElapsed, m_TickPriorityLocationUpdateElapsed, m_TickTimeOfDateElapsed, DynamicMusicTrackData.m_TimeOfDay, DynamicMusicPlayerRegistry.m_TracksCredits, DynamicMusicPlayerRegistry.m_TracksLocationDynamic, m_TracksLocationMatchedPlayerInside, m_TracksLocationStaticCached, m_TracksLocationStaticPrioritizedCached, DynamicMusicPlayerRegistry.m_TracksMenu, DynamicMusicPlayerRegistry.m_TracksTime, m_WaitingForPlayback, TICK_LOCATION_CACHE_UPDATE_SECONDS, TICK_LOCATION_UPDATE_SECONDS, TICK_PRIORITY_LOCATION_UPDATE_SECONDS, and TICK_TIME_OF_DATE_UPDATE_SECONDSReferenced by OnUpdate()
private void DisplayStaticLocations(bool enabled)DIAG_DEVELOPERReferences Math.CenterOfRectangle(), Debug.CleanupDrawShapes(), vector.Distance()
Show 15 more
, Debug.DrawBoxEx(), DrawPolygonLocation(), CGame.GetCurrentCameraPosition(), array.Insert(), DynamicMusicTrackData.locationBoundaries, m_DebugShapesLocations, m_DebugShapesLocationsVertices, m_LocationsDynamic, DynamicMusicLocationDynamicData.m_Max, DynamicMusicLocationDynamicData.m_Min, m_TracksLocationStaticCached, m_TracksLocationStaticPrioritizedCached, Colors.PURPLE, Colors.RED, and Colors.YELLOWReferenced by OnUpdate()
private void DrawPolygonLocation(notnull DynamicMusicTrackData track)DIAG_DEVELOPERforce the height of box for debug
References array.Count(), Debug.DrawLine(), array.Insert()
Show 2 more
, m_DebugShapesLocationsVertices, and DynamicMusicTrackData.verticesReferenced by DisplayStaticLocations()
private void DMPDebugPrint(string message)ENABLE_LOGGINGReferences Debug.Log()
Referenced by FadeoutTrack(), OnCategorySet(), OnLocationMatched()
Show 4 more
, OnNextTrackSelected(), OnTrackEnded(), OnTrackStopped(), and PlayerInsideOfLocationFilter()DEPRECATED
References Debug.CleanupDrawShapes()
void SetCategory(EDynamicMusicPlayerCategory category, bool forced)References new DynamicMusicPlayerCategoryPlaybackData(), DynamicMusicPlayerCategoryPlaybackData.m_Category, and DynamicMusicPlayerCategoryPlaybackData.m_Forced
Referenced by CreditsMenu.OnHide(), CreditsMenu.OnShow(), DisplayDebugStats()