Skip to content

Commit

Permalink
Update to use generalized stream extensions
Browse files Browse the repository at this point in the history
+ Updates YARG.Core
  • Loading branch information
sonicfind committed Dec 22, 2023
1 parent 61afece commit 7c2219f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Assets/Script/Audio/Bass/BassAudioManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public void LoadMogg(Stream stream, List<MoggStemMap> stemMaps, float speed)
if (stream is null)
throw new ArgumentNullException(nameof(stream));

var usesYARGEncryption = stream.ReadInt32LE() switch
var usesYARGEncryption = stream.Read<int>(Core.IO.Endianness.Little) switch
{
0xF0 => true,
0x0A => false,
Expand All @@ -283,7 +283,7 @@ public void LoadMogg(Stream stream, List<MoggStemMap> stemMaps, float speed)
throw new Exception($"Couldn't get MOGG start index! Expected at least {MIN_SIZE} bytes, got {stream.Length}");

// Get start index
int start = stream.ReadInt32LE();
int start = stream.Read<int>(Core.IO.Endianness.Little);
if (start > stream.Length)
throw new Exception($"MOGG start index is out of bounds! Expected at least {start + 1} bytes, got {stream.Length}");

Expand Down

0 comments on commit 7c2219f

Please sign in to comment.