ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/OniSplit/Sound/SoundData.cs
(Generate patch)

Comparing OniSplit/Sound/SoundData.cs (file contents):
Revision 1114 by iritscen, Wed Jan 22 14:08:57 2020 UTC vs.
Revision 1130 by geyser, Thu May 28 21:28:44 2020 UTC

# Line 6 | Line 6 | namespace Oni.Sound
6   {
7      internal class SoundData
8      {
9 +        public bool IsIMA4;
10          public int SampleRate;
11          public int ChannelCount;
12          public byte[] Data;
# Line 27 | Line 28 | namespace Oni.Sound
28                      sound.ChannelCount = (reader.ReadInt32() >> 1) + 1;
29                      sound.SampleRate = 22050;
30                      reader.Skip(4);
31 +                    sound.IsIMA4 = true;
32                  }
33                  else
34                  {
35 <                    reader.Skip(6);
35 >                    reader.Skip(6); // ADPCM format identifiers (change to support PCM?)
36                      sound.ChannelCount = reader.ReadInt16();
37                      sound.SampleRate = reader.ReadInt32();
38                      reader.Skip(44);
39 +                    sound.IsIMA4 = false;
40                  }
41  
42                  dataSize = reader.ReadInt32();

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)