/// <summary>
 /// Convert pcm16 audio to dsp adpcm with a seek block, and update channel info.
 /// </summary>
 /// <param name="pcm16">Pcm 16 audio.</param>
 /// <returns></returns>
 public static byte[][] Pcm16ToDspAdpcmSTM(Int16[][] pcm16, b_stm s)
 {
     byte[][] data = new byte[pcm16.Length][];
     s.info.channels = new List <b_stm.ChannelInfo>();
     for (int i = 0; i < data.Length; i++)
     {
         s.info.channels.Add(new b_stm.ChannelInfo());
         data[i] = DspAdpcmEncoder.EncodeSamples(pcm16[i], out s.info.channels[i].dspAdpcmInfo, s.info.streamSoundInfo.loopStart);
     }
     return(data);
 }
 /// <summary>
 /// Pcm16 to dsp adpcm for wav, and update the b_wav channel info.
 /// </summary>
 /// <param name="pcm16">The pcm16 audio data.</param>
 /// <param name="b">The b_wav.</param>
 /// <returns></returns>
 public static byte[][] Pcm16ToDspApdcmWAV(Int16[][] pcm16, ref b_wav b)
 {
     byte[][] data = new byte[pcm16.Length][];
     b.info.channelInfo = new List <b_wav.InfoBlock.ChannelInfo>();
     for (int i = 0; i < data.Length; i++)
     {
         b.info.channelInfo.Add(new b_wav.InfoBlock.ChannelInfo());
         data[i] = DspAdpcmEncoder.EncodeSamples(pcm16[i], out b.info.channelInfo[i].dspAdpcmInfo, b.info.loopStart);
     }
     return(data);
 }