public VorbisPacket(ByteArray aByteArray, VorbisHeader aVorbisHeader, Byte[] aFirstSegmentArray) { oggPageHeader = new OggPageHeader(aByteArray); sizeSegmentList = oggPageHeader.GetSegmentSizeList(); vorbisSegmentArray = new VorbisSegment[sizeSegmentList.Count]; for (int i = 0; i < sizeSegmentList.Count; i++) { Byte[] lPacket = aByteArray.ReadBytes(sizeSegmentList[i]); Byte[] lPacketAll = new Byte[sizeSegmentList[i] + aFirstSegmentArray.Length]; for (int j = 0; j < aFirstSegmentArray.Length; j++) { lPacketAll[j] = aFirstSegmentArray[j]; } for (int j = 0; j < sizeSegmentList[i]; j++) { lPacketAll[aFirstSegmentArray.Length + j] = lPacket[j]; } MemoryStream lMemoryStream = new MemoryStream(lPacketAll); ByteArrayLittle lByteArray = new ByteArrayLittle(lMemoryStream); vorbisSegmentArray[i] = new VorbisSegment(lByteArray, aVorbisHeader); aFirstSegmentArray = new Byte[0]; } nextSegmentArray = aByteArray.ReadBytes(oggPageHeader.GetNextSegmentSize()); }
public VorbisFile(Stream aStream) { vorbisHeader = new VorbisHeader(); byteArray = new ByteArrayLittle(aStream); vorbisPacketList = new List <VorbisPacket>(); }
public VorbisSegment(ByteArray aByteArray, VorbisHeader aVorbisHeader) { vorbisHeader = aVorbisHeader; residueArray = new double[2][]; byteArray = aByteArray; }