---
name: "afReadMisc"
section: "3"
platform: "linux"
package: "audiofile"
version: "0.3.6-12"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/afReadMisc"
---

# afReadMisc(3)

access miscellaneous metadata in an audio file

## NAME

afReadMisc, afWriteMisc, afSeekMisc - access miscellaneous metadata in an audio file

## SYNOPSIS

```
#include <audiofile.h>
```

```
int afReadMisc (AFfilehandle file, int miscid, void *buffer, int nbytes);
```

```
int afWriteMisc (AFfilehandle file, int miscid, const void *buffer, int nbytes);
```

```
int afSeekMisc (AFfilehandle file, int miscid, int offbytes);
```

## DESCRIPTION

afReadMisc reads up to *nbytes* from the miscellaneous data chunk identified by *miscid* in *file*.

afWriteMisc writes up to *nbytes* to the miscellaneous data chunk identified by *miscid* in *file*.

afSeekMisc changes the current offset within the miscellaneous data chunk identified by *miscid* to the offset *offbytes*.

## RETURN VALUE

afReadMisc returns the number of bytes read from the specified miscellaneous chunk into the buffer referred to by *buffer*.

afWriteMisc returns the number of bytes written to the specified miscellaneous chunk from the buffer referred to by *buffer*.

afSeekMisc returns the new location of the logical data pointer as measured as an offset in bytes from the beginning of the miscellaneous chunk’s data area.

## ERRORS

afReadMisc, afWriteMisc, and afSeekMisc can produce the following error codes:

•

AF\_BAD\_READ

•

AF\_BAD\_WRITE

•

AF\_BAD\_MISCSEEK

•

AF\_BAD\_MISCID

•

AF\_BAD\_TRACKID

•

AF\_BAD\_FILEHANDLE

## AUTHOR

Michael Pruett \<michael@68k.org\>
