Fix MP3 Header Read While Game Streams Song

This commit is contained in:
copecone committed 2026-10-13 11:30:42 +09:00
1 parent 6ef1538c3f
commit 7b2951e649
1 file changed
+3 -1
+3 -1
View File
@@ -31,7 +31,9 @@ internal static class MP3HeaderFrame
/// </summary> /// </summary>
public static int SilentFrames(string path) public static int SilentFrames(string path)
{ {
using var file = File.OpenRead(path); // The game keeps the song open while it streams it (MP3Sharp.MP3Stream: new FileStream(path, FileMode.Open),
// read/write access with read sharing), so the file is opened with read/write/delete sharing.
using var file = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
return SilentFrames(file); return SilentFrames(file);
} }