public void SetDataArray(Byte[] aSampleData)
 {
     if (dataChunk == null)
     {
         // Error.
     }
     else
     {
         MemoryStream lMemoryStream = new MemoryStream(aSampleData);
         ByteArray    lByteArray    = new ByteArrayLittle(lMemoryStream);
         lByteArray.WriteBytes(new byte[dataChunk.position]);
         OverrideChunk(new RiffChunkData(RiffChunkData.ID, ( UInt32 )aSampleData.Length, lByteArray, this));
     }
 }
示例#2
0
        public static void SetDataArray(RiffWaveRiff lRiffWaveRiff, Byte[] aSampleData)
        {
            Logger.BreakDebug("SetDataArray");

            RiffWaveData dataChunk = ( RiffWaveData )lRiffWaveRiff.GetChunk(RiffWaveData.ID);

            if (dataChunk == null)
            {
                // Error.
            }
            else
            {
                MemoryStream lMemoryStream = new MemoryStream(aSampleData);
                AByteArray   lByteArray    = new ByteArrayLittle(lMemoryStream);
                lByteArray.WriteBytes(new byte[dataChunk.position]);
                lRiffWaveRiff.OverrideChunk(new RiffWaveData(RiffWaveData.ID, ( UInt32 )aSampleData.Length, lByteArray, lRiffWaveRiff));
            }
        }