IPerformanceHeader.cs 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. //
  2. // Copyright (c) 2019-2020 Ryujinx
  3. //
  4. // This program is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU Lesser General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU Lesser General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU Lesser General Public License
  15. // along with this program. If not, see <https://www.gnu.org/licenses/>.
  16. //
  17. namespace Ryujinx.Audio.Renderer.Server.Performance
  18. {
  19. /// <summary>
  20. /// The header of a performance frame.
  21. /// </summary>
  22. public interface IPerformanceHeader
  23. {
  24. /// <summary>
  25. /// Get the entry count offset in this structure.
  26. /// </summary>
  27. /// <returns>The entry count offset in this structure.</returns>
  28. int GetEntryCountOffset();
  29. /// <summary>
  30. /// Set the DSP running behind flag.
  31. /// </summary>
  32. /// <param name="isRunningBehind">The flag.</param>
  33. void SetDspRunningBehind(bool isRunningBehind);
  34. /// <summary>
  35. /// Set the count of voices that were dropped.
  36. /// </summary>
  37. /// <param name="voiceCount">The count of voices that were dropped.</param>
  38. void SetVoiceDropCount(uint voiceCount);
  39. /// <summary>
  40. /// Set the start ticks of the <see cref="Dsp.AudioProcessor"/>. (before sending commands)
  41. /// </summary>
  42. /// <param name="startTicks">The start ticks of the <see cref="Dsp.AudioProcessor"/>. (before sending commands)</param>
  43. void SetStartRenderingTicks(ulong startTicks);
  44. /// <summary>
  45. /// Set the header magic.
  46. /// </summary>
  47. /// <param name="magic">The header magic.</param>
  48. void SetMagic(uint magic);
  49. /// <summary>
  50. /// Set the offset of the next performance header.
  51. /// </summary>
  52. /// <param name="nextOffset">The offset of the next performance header.</param>
  53. void SetNextOffset(int nextOffset);
  54. /// <summary>
  55. /// Set the total time taken by all the commands profiled.
  56. /// </summary>
  57. /// <param name="totalProcessingTime">The total time taken by all the commands profiled.</param>
  58. void SetTotalProcessingTime(int totalProcessingTime);
  59. /// <summary>
  60. /// Set the index of this performance frame.
  61. /// </summary>
  62. /// <param name="index">The index of this performance frame.</param>
  63. void SetIndex(uint index);
  64. /// <summary>
  65. /// Get the total count of entries in this frame.
  66. /// </summary>
  67. /// <returns>The total count of entries in this frame.</returns>
  68. int GetEntryCount();
  69. /// <summary>
  70. /// Get the total count of detailed entries in this frame.
  71. /// </summary>
  72. /// <returns>The total count of detailed entries in this frame.</returns>
  73. int GetEntryDetailCount();
  74. /// <summary>
  75. /// Set the total count of entries in this frame.
  76. /// </summary>
  77. /// <param name="entryCount">The total count of entries in this frame.</param>
  78. void SetEntryCount(int entryCount);
  79. /// <summary>
  80. /// Set the total count of detailed entries in this frame.
  81. /// </summary>
  82. /// <param name="entryDetailCount">The total count of detailed entries in this frame.</param>
  83. void SetEntryDetailCount(int entryDetailCount);
  84. }
  85. }