*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> audiofile/AFreadmisc (3d)              
Title
Content
Arch
Section
 

e(3dm)

Contents


afReadMisc(3dm)						       afReadMisc(3dm)


NAME    [Toc]    [Back]

     afReadMisc, afWriteMisc, afSeekMisc - read	from / write to	/ move logical
     read/write	pointer	for data in a miscellaneous chunk in an	audio file

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/audiofile.h>

     int afReadMisc(const AFfilehandle file, int miscid,
				  void *buf, int nbytes)

     int afWriteMisc(const AFfilehandle	file, int miscid,
				  void *buf, int nbytes)

     int afSeekMisc(const AFfilehandle file, int chunkid,
				  int offbytes)

PARAMETER    [Toc]    [Back]

     file     expects the AFfilehandle structure for the audio file from or to
	      which you	want to	read or	write data.  This structure is
	      returned by afOpenFile(3dm) call.

     miscid   expects an integer which identifies the miscellaneous data chunk
	      you want to read from or write to.

     buf      expects a	pointer	to a buffer which will receive a copy of the
	      miscellaneous data from the file,	or which contains the data you
	      want to transfer into the	file.

     nbytes   is the number of bytes of	data you want to read from the file
	      into buf or from buf into	the file (beginning at the current
	      position of file's logical read pointer for the data in miscid).

     offbytes specifies	a nonnegative offset into the data area	for chunkid
	      (the offset should be less than total size of the	data area).

RETURN VALUE    [Toc]    [Back]

     afReadMisc() returns the number of	bytes actually read from the
     miscellaneous chunk into buf.  afReadMisc() will not let you read beyond
     the end of	the chunk's data area.	The return value is greater than or
     equal to 0	except in cases	of error.  It is an error to call afReadMisc()
     on	a miscellaneous	chunk of size zero.

     afWriteMisc() returns the number of bytes actually	written	to the
     miscellaneous chunk.  afWriteMisc() will not let you write	beyond the end
     of	the chunk's data area.	The return value is always greater than	or
     equal to 0	except in case of error, when -1 is returned.

     afSeekMisc() returns the new location of the logical read/write pointer
     for the miscellaneous chunk, measured as an offset	in bytes from the
     beginning of the chunk's data area.  This value is	always greater than or
     equal to 0, and less than or equal	to the total number of data bytes, as
     reported by afGetMiscSize(3dm).



									Page 1






afReadMisc(3dm)						       afReadMisc(3dm)


DESCRIPTION    [Toc]    [Back]

     afReadMisc() copies data from the specified miscellaneous of an audio
     file to buf.  The file structure maintains	internally a logical read
     pointer for each miscellaneous chunk in the file.	This allows you	to
     read and write miscellaneous data (e.g., MIDI system exclusive data) from
     a file in small pieces in separate	calls.

     You call afGetMiscIDs(3dm)	to obtain the list of miscellaneous chunk ID's
     for file.	You call afGetMiscType(3dm) to figure out what types of
     miscellaneous chunks you have (see	the afGetMiscType(3dm) man page	for
     more information),	and you	call afGetMiscSize(3dm)	to determine the total
     number of bytes in	each chunk.

     When a file is opened by afOpenFile(3dm) or afOpenFD(3dm),	the logical
     read pointer for each miscellaneous data chunk is initialized to the
     first data	byte in	the chunk.  On return from afReadMisc(), the chunk's
     read pointer is automatically updated so that it points to	the data byte
     following the last	one copied into	buf.

     afWriteMisc() transfers data from buf the specified miscellaneous chunk
     of	an audio file. The file	structure maintains an internal	logical	write
     pointer for each miscellaneous chunk, so that you can write part of the
     data for a	chunk with one call to afWriteMisc(), and write	more data
     later with	a second call.

     You call afInitMiscIDs(3dm) to set	the list of miscellaneous chunk	ID's
     for file when it is opened.  You call afInitMiscType(3dm) to initialize
     the types of miscellaneous	chunks in the file (see	the man	page for
     afInitMiscTypeafOpenFile(3dm), the write
     pointer for each miscellaneous chunk is initialized to the	first data
     byte in the chunk.	 The data area for each	chunk is initially filled with
     0's. On return from afWriteMisc(),	the logical write pointer for miscid
     is	automatically updated so that it points	to the data byte following the
     last one copied from buf to the file. It is up to the application to fill
     the data area of each chunk with consistent information (e.g., if you
     don't use all the bytes you allocated for a MIDI chunk, fill the
     remaining bytes with no-op	messages).

     afSeekMisc	allows you to reposition the logical read/write	pointer	for a
     specified miscellaneous chunk inside an audio file.  For example, you can
     move the read pointer for a MIDI data chunk in an AIFF/AIFF-C file	to any
     location within the MIDI data before calling afReadMisc.  It is illegal
     to	move the logical read/write pointer to a position before the first
     data byte of the specified	chunk, or after	the last data byte.

SEE ALSO    [Toc]    [Back]

      
      
     afOpenFile(3dm), afInitMiscType(3dm), afInitMiscSize(3dm),
     afGetMiscIDs(3dm)
afReadMisc(3dm)						       afReadMisc(3dm)


NAME    [Toc]    [Back]

     afReadMisc, afWriteMisc, afSeekMisc - read	from / write to	/ move logical
     read/write	pointer	for data in a miscellaneous chunk in an	audio file

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/audiofile.h>

     int afReadMisc(const AFfilehandle file, int miscid,
				  void *buf, int nbytes)

     int afWriteMisc(const AFfilehandle	file, int miscid,
				  void *buf, int nbytes)

     int afSeekMisc(const AFfilehandle file, int chunkid,
				  int offbytes)

PARAMETER    [Toc]    [Back]

     file     expects the AFfilehandle structure for the audio file from or to
	      which you	want to	read or	write data.  This structure is
	      returned by afOpenFile(3dm) call.

     miscid   expects an integer which identifies the miscellaneous data chunk
	      you want to read from or write to.

     buf      expects a	pointer	to a buffer which will receive a copy of the
	      miscellaneous data from the file,	or which contains the data you
	      want to transfer into the	file.

     nbytes   is the number of bytes of	data you want to read from the file
	      into buf or from buf into	the file (beginning at the current
	      position of file's logical read pointer for the data in miscid).

     offbytes specifies	a nonnegative offset into the data area	for chunkid
	      (the offset should be less than total size of the	data area).

RETURN VALUE    [Toc]    [Back]

     afReadMisc() returns the number of	bytes actually read from the
     miscellaneous chunk into buf.  afReadMisc() will not let you read beyond
     the end of	the chunk's data area.	The return value is greater than or
     equal to 0	except in cases	of error.  It is an error to call afReadMisc()
     on	a miscellaneous	chunk of size zero.

     afWriteMisc() returns the number of bytes actually	written	to the
     miscellaneous chunk.  afWriteMisc() will not let you write	beyond the end
     of	the chunk's data area.	The return value is always greater than	or
     equal to 0	except in case of error, when -1 is returned.

     afSeekMisc() returns the new location of the logical read/write pointer
     for the miscellaneous chunk, measured as an offset	in bytes from the
     beginning of the chunk's data area.  This value is	always greater than or
     equal to 0, and less than or equal	to the total number of data bytes, as
     reported by afGetMiscSize(3dm).



									Page 1






afReadMisc(3dm)						       afReadMisc(3dm)


DESCRIPTION    [Toc]    [Back]

     afReadMisc() copies data from the specified miscellaneous of an audio
     file to buf.  The file structure maintains	internally a logical read
     pointer for each miscellaneous chunk in the file.	This allows you	to
     read and write miscellaneous data (e.g., MIDI system exclusive data) from
     a file in small pieces in separate	calls.

     You call afGetMiscIDs(3dm)	to obtain the list of miscellaneous chunk ID's
     for file.	You call afGetMiscType(3dm) to figure out what types of
     miscellaneous chunks you have (see	the afGetMiscType(3dm) man page	for
     more information),	and you	call afGetMiscSize(3dm)	to determine the total
     number of bytes in	each chunk.

     When a file is opened by afOpenFile(3dm) or afOpenFD(3dm),	the logical
     read pointer for each miscellaneous data chunk is initialized to the
     first data	byte in	the chunk.  On return from afReadMisc(), the chunk's
     read pointer is automatically updated so that it points to	the data byte
     following the last	one copied into	buf.

     afWriteMisc() transfers data from buf the specified miscellaneous chunk
     of	an audio file. The file	structure maintains an internal	logical	write
     pointer for each miscellaneous chunk, so that you can write part of the
     data for a	chunk with one call to afWriteMisc(), and write	more data
     later with	a second call.

     You call afInitMiscIDs(3dm) to set	the list of miscellaneous chunk	ID's
     for file when it is opened.  You call afInitMiscType(3dm) to initialize
     the types of miscellaneous	chunks in the file (see	the man	page for
     afInitMiscTypeafOpenFile(3dm), the write
     pointer for each miscellaneous chunk is initialized to the	first data
     byte in the chunk.	 The data area for each	chunk is initially filled with
     0's. On return from afWriteMisc(),	the logical write pointer for miscid
     is	automatically updated so that it points	to the data byte following the
     last one copied from buf to the file. It is up to the application to fill
     the data area of each chunk with consistent information (e.g., if you
     don't use all the bytes you allocated for a MIDI chunk, fill the
     remaining bytes with no-op	messages).

     afSeekMisc	allows you to reposition the logical read/write	pointer	for a
     specified miscellaneous chunk inside an audio file.  For example, you can
     move the read pointer for a MIDI data chunk in an AIFF/AIFF-C file	to any
     location within the MIDI data before calling afReadMisc.  It is illegal
     to	move the logical read/write pointer to a position before the first
     data byte of the specified	chunk, or after	the last data byte.

SEE ALSO    [Toc]    [Back]

      
      
     afOpenFile(3dm), afInitMiscType(3dm), afInitMiscSize(3dm),
     afGetMiscIDs(3dm)


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
lseek IRIX move read/write file pointer
lseek HP-UX move read/write file pointer; seek
AFseekframe IRIX move logical file read pointer for a specified audio track to a desired sample frame location / retrieve curre
lseek Tru64 Move read-write file offset
tell IRIX return the read/write file pointer
afSaveFilePosition IRIX save and retrieve logical audio sample read pointer
tis_write_unlock Tru64 Unlocks the specified read-write lock that was acquired for write access
tis_read_unlock Tru64 Unlocks a read-write lock that was acquired for read access
tis_write_lock Tru64 Acquires the specified read-write lock for write access
pthread_rwlock_wrlock Tru64 Acquires a read-write lock for write access
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service