2021-02-25 19:11:56 -05:00
|
|
|
using Ryujinx.Audio.Integration;
|
|
|
|
|
|
|
|
namespace Ryujinx.Audio.Common
|
2020-08-17 21:49:37 -04:00
|
|
|
{
|
|
|
|
/// <summary>
|
2021-02-25 19:11:56 -05:00
|
|
|
/// Represent an audio buffer that will be used by an <see cref="IHardwareDeviceSession"/>.
|
2020-08-17 21:49:37 -04:00
|
|
|
/// </summary>
|
2021-02-25 19:11:56 -05:00
|
|
|
public class AudioBuffer
|
2020-08-17 21:49:37 -04:00
|
|
|
{
|
|
|
|
/// <summary>
|
2021-02-25 19:11:56 -05:00
|
|
|
/// Unique tag of this buffer.
|
2020-08-17 21:49:37 -04:00
|
|
|
/// </summary>
|
2021-02-25 19:11:56 -05:00
|
|
|
/// <remarks>Unique per session</remarks>
|
|
|
|
public ulong BufferTag;
|
2020-08-17 21:49:37 -04:00
|
|
|
|
|
|
|
/// <summary>
|
2021-02-25 19:11:56 -05:00
|
|
|
/// Pointer to the user samples.
|
2020-08-17 21:49:37 -04:00
|
|
|
/// </summary>
|
2021-02-25 19:11:56 -05:00
|
|
|
public ulong DataPointer;
|
2020-08-17 21:49:37 -04:00
|
|
|
|
|
|
|
/// <summary>
|
2021-02-25 19:11:56 -05:00
|
|
|
/// Size of the user samples region.
|
2020-08-17 21:49:37 -04:00
|
|
|
/// </summary>
|
2021-02-25 19:11:56 -05:00
|
|
|
public ulong DataSize;
|
2020-08-17 21:49:37 -04:00
|
|
|
|
|
|
|
/// <summary>
|
2021-02-25 19:11:56 -05:00
|
|
|
/// The timestamp at which the buffer was played.
|
2020-08-17 21:49:37 -04:00
|
|
|
/// </summary>
|
2021-02-25 19:11:56 -05:00
|
|
|
/// <remarks>Not used but useful for debugging</remarks>
|
|
|
|
public ulong PlayedTimestamp;
|
2020-08-17 21:49:37 -04:00
|
|
|
|
|
|
|
/// <summary>
|
2021-02-25 19:11:56 -05:00
|
|
|
/// The user samples.
|
2020-08-17 21:49:37 -04:00
|
|
|
/// </summary>
|
2021-02-25 19:11:56 -05:00
|
|
|
public byte[] Data;
|
2020-08-17 21:49:37 -04:00
|
|
|
}
|
|
|
|
}
|