diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/Blob_RawFile.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/Blob_RawFile.cs index 3c3ba957a7..483c22cd5d 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/Blob_RawFile.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/Blob_RawFile.cs @@ -17,7 +17,7 @@ namespace BizHawk.Emulation.DiscSystem private string physicalPath; private long length; - public long Offset = 0; + public readonly long Offset = 0; private BufferedStream fs; public void Dispose() diff --git a/src/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/Blob_WaveFile.cs b/src/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/Blob_WaveFile.cs index a5e63397d3..a446d1214d 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/Blob_WaveFile.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscFormats/Blobs/Blob_WaveFile.cs @@ -23,43 +23,6 @@ namespace BizHawk.Emulation.DiscSystem { } - private class Blob_RawFile : IBlob - { - public string PhysicalPath - { - get => physicalPath; - set - { - physicalPath = value; - length = new FileInfo(physicalPath).Length; - } - } - - private string physicalPath; - private long length; - - public readonly long Offset = 0; - - private BufferedStream fs; - public void Dispose() - { - fs?.Dispose(); - fs = null; - } - public int Read(long byte_pos, byte[] buffer, int offset, int count) - { - //use quite a large buffer, because normally we will be reading these sequentially but in small chunks. - //this enhances performance considerably - const int buffersize = 2352 * 75 * 2; - fs ??= new BufferedStream(new FileStream(physicalPath, FileMode.Open, FileAccess.Read, FileShare.Read), buffersize); - long target = byte_pos + Offset; - if (fs.Position != target) - fs.Position = target; - return fs.Read(buffer, offset, count); - } - public long Length => length; - } - public void Load(byte[] waveData) { }