Audio legacy cleanup - Move global functions to be handled by AudioSystemComponent (#3283)
* Removes legacy audio listener updates from ViewSys These functions were empty and logging a warning, removed. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com> * Move more audio functions to AudioSystemComponent For global actions like Mute/Unmute, Reload, StopAll, Load/Unload Level, we move those functions to be handled by the AudioSystemComponent in LmbrCentral. This lets us remove some includes of IAudioSystem.h from Editor and Legacy/CrySystem. There were several locations where audio banks were being loaded and unloaded for a level. Now they all call into the AudioSystemComponent and we don't have multiple copies of the same code. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
This commit is contained in:
@@ -892,24 +892,6 @@ bool CSystem::UpdatePreTickBus(int updateFlags, int nPauseMode)
|
||||
return false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//update sound system Part 1 if in Editor / in Game Mode Viewsystem updates the Listeners
|
||||
if (!m_env.IsEditorGameMode())
|
||||
{
|
||||
if ((updateFlags & ESYSUPDATE_EDITOR) != 0 && !bNoUpdate && nPauseMode != 1)
|
||||
{
|
||||
// updating the Listener Position in a first separate step.
|
||||
// Updating all views here is a bit of a workaround, since we need
|
||||
// to ensure that sound listeners owned by inactive views are also
|
||||
// marked as inactive. Ideally that should happen when exiting game mode.
|
||||
if (GetIViewSystem())
|
||||
{
|
||||
FRAME_PROFILER("SysUpdate:UpdateSoundListeners", this, PROFILE_SYSTEM);
|
||||
GetIViewSystem()->UpdateSoundListeners();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Use UI timer for CryMovie, because it should not be affected by pausing game time
|
||||
const float fMovieFrameTime = m_Time.GetFrameTime(ITimer::ETIMER_UI);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user