NodeStates.cs 485 B

12345678910111213141516171819
  1. using Ryujinx.Common;
  2. namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager
  3. {
  4. static class NodeStates
  5. {
  6. public static long GetWorkBufferSize(int totalMixCount)
  7. {
  8. int size = BitUtils.AlignUp(totalMixCount, AudioRendererConsts.BufferAlignment);
  9. if (size < 0)
  10. {
  11. size |= 7;
  12. }
  13. return 4 * (totalMixCount * totalMixCount) + 12 * totalMixCount + 2 * (size / 8);
  14. }
  15. }
  16. }