(DwvAudio): calculate BitsPerSample.

This commit is contained in:
morkt 2018-01-02 06:32:49 +04:00
parent 7046987fed
commit 8932735018

View File

@ -54,7 +54,7 @@ namespace GameRes.Formats.SysD
SamplesPerSecond = header.ToUInt32 (0xC),
AverageBytesPerSecond = header.ToUInt32 (0x10),
BlockAlign = header.ToUInt16 (0x14),
BitsPerSample = 0x10,
format.BitsPerSample = (ushort)(format.AverageBytesPerSecond * 8 / format.SamplesPerSecond / format.Channels);
};
uint pcm_size = header.ToUInt32 (0x18);
var pcm = new StreamRegion (file.AsStream, file.Position, pcm_size);