Beispiel #1
0
 protected PcmData(int bits, byte[] pcmData, bool isDataInLittleEndianFormat)
 {
     BytesPerSample = (byte)(bits / 8);
     //if (pcmData.Length % BytesPerSample != 0)
     //    throw new Exception("Invalid PCM format. The PCM data was an invalid size.");
     Data   = pcmData;
     Length = Data.Length / BytesPerSample;
     if (!isDataInLittleEndianFormat)
     {
         SynthHelper.SwapEndianess(Data, bits);
     }
 }