AudioProcessorMemoryManager.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System.Runtime.CompilerServices;
  2. using CpuAddress = System.UInt64;
  3. using DspAddress = System.UInt64;
  4. namespace Ryujinx.Audio.Renderer.Utils
  5. {
  6. /// <summary>
  7. /// The <see cref="Dsp.AudioProcessor"/> memory management
  8. /// </summary>
  9. /// <remarks>This is stub for the most part but is kept to permit LLE if wanted.</remarks>
  10. static class AudioProcessorMemoryManager
  11. {
  12. /// <summary>
  13. /// Map the given <see cref="CpuAddress"/> to the <see cref="Dsp.AudioProcessor"/> address space.
  14. /// </summary>
  15. /// <param name="processHandle">The process owning the CPU memory.</param>
  16. /// <param name="cpuAddress">The <see cref="CpuAddress"/> to map.</param>
  17. /// <param name="size">The size of the CPU memory region to map.</param>
  18. /// <returns>The address on the <see cref="Dsp.AudioProcessor"/> address space.</returns>
  19. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  20. public static DspAddress Map(uint processHandle, CpuAddress cpuAddress, ulong size)
  21. {
  22. return cpuAddress;
  23. }
  24. /// <summary>
  25. /// Unmap the given <see cref="CpuAddress"/> from the <see cref="Dsp.AudioProcessor"/> address space.
  26. /// </summary>
  27. /// <param name="processHandle">The process owning the CPU memory.</param>
  28. /// <param name="cpuAddress">The <see cref="CpuAddress"/> to unmap.</param>
  29. /// <param name="size">The size of the CPU memory region to unmap.</param>
  30. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  31. public static void Unmap(uint processHandle, CpuAddress cpuAddress, ulong size)
  32. {
  33. }
  34. /// <summary>
  35. /// Invalidate the <see cref="Dsp.AudioProcessor"/> data cache at the given address.
  36. /// </summary>
  37. /// <param name="address">The base DSP address to invalidate</param>
  38. /// <param name="size">The size of the DSP memory region to invalidate.</param>
  39. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  40. public static void InvalidateDspCache(DspAddress address, ulong size)
  41. {
  42. }
  43. /// <summary>
  44. /// Invalidate the CPU data cache at the given address.
  45. /// </summary>
  46. /// <param name="address">The base <see cref="CpuAddress"/> to invalidate</param>
  47. /// <param name="size">The size of the CPU memory region to invalidate.</param>
  48. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  49. public static void InvalidateDataCache(CpuAddress address, ulong size)
  50. {
  51. }
  52. }
  53. }