Skip to content

Commit

Permalink
Merge pull request ddnet#7231 from Robyt3/Engine-Sound-Refactoring
Browse files Browse the repository at this point in the history
Replace most global variables in engine sound with member variables, various other refactoring of engine sound
  • Loading branch information
def- authored Sep 21, 2023
2 parents c975c39 + b9951dd commit 8009e86
Show file tree
Hide file tree
Showing 5 changed files with 325 additions and 363 deletions.
4 changes: 3 additions & 1 deletion src/engine/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2637,7 +2637,9 @@ void CClient::Update()
if(m_DemoPlayer.IsPlaying() && IVideo::Current())
{
IVideo::Current()->NextVideoFrame();
IVideo::Current()->NextAudioFrameTimeline(Sound()->GetSoundMixFunc());
IVideo::Current()->NextAudioFrameTimeline([this](short *pFinalOut, unsigned Frames) {
Sound()->Mix(pFinalOut, Frames);
});
}
else if(m_ButtonRender)
Disconnect();
Expand Down
Loading

0 comments on commit 8009e86

Please sign in to comment.