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

Comparing OniSplit/Sound/AifExporter.cs (file contents):
Revision 1131 by geyser, Sat May 30 12:08:12 2020 UTC vs.
Revision 1156 by geyser, Sat May 8 01:44:24 2021 UTC

# Line 30 | Line 30 | namespace Oni.Sound
30          protected override void ExportInstance(InstanceDescriptor descriptor)
31          {
32              var sound = SoundData.Read(descriptor, do_pc_demo_test);
33 +            if (!(sound.IsIMA4))
34 +                throw new NotSupportedException("Transcoding from MS ADPCM (PC) to IMA4 ADPCM (Mac) not supported!");
35  
36              using (var stream = File.Create(Path.Combine(OutputDirPath, descriptor.FullName + ".aif")))
37              using (var writer = new BinaryWriter(stream))
38              {
37                if (!(sound.IsIMA4))
38                {
39                    throw new NotSupportedException("Transcoding from MS ADPCM (PC) to IMA4 ADPCM (Mac) not supported!");
40                }
39                  writer.Write(Utils.ByteSwap(fcc_FORM));
40                  writer.Write(Utils.ByteSwap(50 + sound.Data.Length));
41                  writer.Write(Utils.ByteSwap(fcc_AIFC));

Diff Legend

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