public class CommentsChunk extends Chunk
A comment consists of a time stamp, marker id, and a text count followed by text.
typedef struct { unsigned long timeStamp; MarkerID marker; unsigned short count; char text[]; } Comment;
timeStamp
indicates when the comment was created. Units are the number of seconds
since January 1, 1904. (This time convention is the one used by the Macintosh. For procedures
that manipulate the time stamp, see The Operating System Utilities chapter in Inside Macintosh,
vol II). For a routine that will convert this to an Apple II GS/OS format time, please see
Apple II File Type Note for filetype 0xD8, aux type 0x0000.
A comment can be linked to a marker. This allows applications to store long descriptions of markers as a comment. If the comment is referring to a marker, then marker is the ID of that marker. Otherwise, marker is zero, indicating that this comment is not linked to a marker.
count
is the length of the text that makes up the comment. This is a 16 bit quantity,
allowing much longer comments than would be available with a pstring.
text
contains the comment itself. This text must be padded with a byte at the end to
insure that it is an even number of bytes in length. This pad byte, if present, is not
included in count.
AnnotationChunk
chunkData, chunkHeader
Constructor and Description |
---|
CommentsChunk(ChunkHeader chunkHeader,
ByteBuffer chunkData,
AiffAudioHeader aiffAudioHeader) |
public CommentsChunk(ChunkHeader chunkHeader, ByteBuffer chunkData, AiffAudioHeader aiffAudioHeader)
chunkHeader
- The header for this chunkchunkData
- The buffer from which the AIFF data are being readaiffAudioHeader
- audio headerpublic boolean readChunk() throws IOException
readChunk
in class Chunk
false
if the chunk is structurally
invalid, otherwise true
IOException
Copyright © 2005–2020 jthink.net. All rights reserved.