afInitFileFormat(3)

afInitFileFormat3

Initialize file format of an audio file setup

Usage

#include <audiofile.h>
void afInitFileFormat(AFfilesetup setup, int fileFormat);

Parameters

setup is a valid file setup created by afNewFileSetup(3).

fileFormat is an integer constant specifying a file format.

Overview

Given an AFfilesetup structure created with afNewFileSetup(3), afInitFileFormat initializes the file format to that specified by fileFormat.

The following file formats are currently supported:

AF_FILE_RAWDATA

raw audio data

AF_FILE_AIFF

Audio Interchange File Format

AF_FILE_AIFFC

Audio Interchange File Format AIFF-C

AF_FILE_NEXTSND

NeXT .snd/Sun .au

AF_FILE_WAVE

Microsoft RIFF WAVE

AF_FILE_BICSF

Berkeley/IRCAM/CARL Sound File

AF_FILE_AVR

Audio Visual Research

AF_FILE_IFF_8SVX

Amiga IFF/8SVX

AF_FILE_SAMPLEVISION

Sample Vision

AF_FILE_VOC

Creative Voice File

AF_FILE_NIST_SPHERE

NIST SPHERE

AF_FILE_CAF

Core Audio Format

Errors

afInitFileFormat can produce the following errors:

AF_BAD_FILESETUP

setup represents an invalid file setup.

AF_BAD_FILEFMT

fileFormat represents an unknown file format.

AF_BAD_NOT_IMPLEMENTED

fileFormat represents a file format which is not currently implemented.

Releases

Unchanged in 7 releases since Debian 8 (Jessie).

  1. 8–Arch

Author

Michael Pruett <[email protected]>

From audiofile 0.3.6-12 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.