mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-10-01 12:30:00 +02:00
amadeus: Fix wrong SendCommands logic (#3969)
* amadeus: Fix wrong SendCommands logic Might help with audio desync, might cause audio stutters, will see! * Address gdkchan's comment
This commit is contained in:
parent
21a081b185
commit
c25e8427aa
2 changed files with 18 additions and 6 deletions
|
@ -116,6 +116,11 @@ namespace Ryujinx.Audio.Renderer.Dsp
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool HasRemainingCommands(int sessionId)
|
||||||
|
{
|
||||||
|
return _sessionCommandList[sessionId] != null;
|
||||||
|
}
|
||||||
|
|
||||||
public void Signal()
|
public void Signal()
|
||||||
{
|
{
|
||||||
_mailbox.SendMessage(MailboxMessage.RenderStart);
|
_mailbox.SendMessage(MailboxMessage.RenderStart);
|
||||||
|
|
|
@ -670,14 +670,21 @@ namespace Ryujinx.Audio.Renderer.Server
|
||||||
{
|
{
|
||||||
_terminationEvent.Reset();
|
_terminationEvent.Reset();
|
||||||
|
|
||||||
GenerateCommandList(out CommandList commands);
|
if (!_manager.Processor.HasRemainingCommands(_sessionId))
|
||||||
|
{
|
||||||
|
GenerateCommandList(out CommandList commands);
|
||||||
|
|
||||||
_manager.Processor.Send(_sessionId,
|
_manager.Processor.Send(_sessionId,
|
||||||
commands,
|
commands,
|
||||||
GetMaxAllocatedTimeForDsp(),
|
GetMaxAllocatedTimeForDsp(),
|
||||||
_appletResourceId);
|
_appletResourceId);
|
||||||
|
|
||||||
_systemEvent.Signal();
|
_systemEvent.Signal();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_isDspRunningBehind = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue