Skip to content

Commit

Permalink
Open EAL files without locking the file for other readers
Browse files Browse the repository at this point in the history
  • Loading branch information
ojrac committed Jul 9, 2023
1 parent fba3750 commit 8e318b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion LanternExtractor/EQ/Sound/EnvAudio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ public bool Load(string ealFilePath)
return false;
}

_ealFile = new EalFile(_ealFilePath);
// Allow other threads to open the same file for reading
_ealFile = new EalFile(new FileStream(
_ealFilePath, FileMode.Open, FileAccess.Read, FileShare.Read));

if (!_ealFile.Initialize())
{
Expand Down

0 comments on commit 8e318b6

Please sign in to comment.