Changeset 1156 for OniSplit/Sound/WavImporter.cs
- Timestamp:
- May 8, 2021, 3:44:24 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OniSplit/Sound/WavImporter.cs
r1154 r1156 46 46 private void WriteSNDD(string name, WavFile wav) 47 47 { 48 float duration = wav.SoundData.Length * 8.0f / wav.BitsPerSample; 49 duration /= wav.SampleRate; 50 duration /= wav.ChannelCount; 51 duration *= 60.0f; 48 float duration = wav.SampleCount * 60.0f / wav.SampleRate; 52 49 53 50 var sndd = CreateInstance(TemplateTag.SNDD, name); … … 74 71 writer.Write(wav.SoundData.Length); 75 72 writer.Write(WriteRawPart(wav.SoundData)); 73 writer.Skip(8); 76 74 } 77 75 } … … 97 95 writer.Write(wav.SoundData.Length); 98 96 writer.Write(WriteRawPart(wav.SoundData)); 97 writer.Skip(24); 99 98 } 100 99 }
Note:
See TracChangeset
for help on using the changeset viewer.