public short[] Decode(Stream nse, Sample sample, long samplecount) { byte[] data = new byte[samplecount]; nse.Position = sample.Offset; nse.Read(data, 0, data.Length); int[] state = new int[2]; short[] samples = new short[samplecount]; long count = VgsADPCM.Decompress(state, data, samples); short[] ret = new short[count]; Array.Copy(samples, ret, count); return(ret); }
public short[] Decode(Stream nse, Sample sample) { return(Decode(nse, sample, VgsADPCM.BytesToSamples(nse.Length))); }