| 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)); |