2024-12-04 00:04:31 +08:00
|
|
|
|
namespace VirtualNes.Core
|
2024-08-29 17:20:01 +08:00
|
|
|
|
{
|
|
|
|
|
public struct SNDSTAT : IStateBufferObject
|
|
|
|
|
{
|
|
|
|
|
public byte[] snddata;
|
|
|
|
|
|
|
|
|
|
public static SNDSTAT GetDefault()
|
|
|
|
|
{
|
|
|
|
|
return new SNDSTAT() { snddata = new byte[0x800] };
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-20 20:18:41 +08:00
|
|
|
|
public readonly uint GetSize()
|
2024-08-29 17:20:01 +08:00
|
|
|
|
{
|
|
|
|
|
return (uint)snddata.Length;
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-20 20:18:41 +08:00
|
|
|
|
public readonly void SaveState(StateBuffer buffer)
|
2024-08-29 17:20:01 +08:00
|
|
|
|
{
|
|
|
|
|
buffer.Write(snddata);
|
|
|
|
|
}
|
2024-09-13 17:39:48 +08:00
|
|
|
|
|
|
|
|
|
public void LoadState(StateReader buffer)
|
|
|
|
|
{
|
|
|
|
|
snddata = buffer.Read_bytes(0x800);
|
|
|
|
|
}
|
2024-08-29 17:20:01 +08:00
|
|
|
|
}
|
|
|
|
|
}
|