AFSEEKFRAME(3)

NAME
afSeekFrame, afTellFrame - update or access the current sample frame position for a track in an audio file

SYNOPSIS

#include <audiofile.h>

AFframecount afSeekFrame (AFfilehandle file, int track,
    AFframecount frameoffset);

AFframecount afTellFrame (AFfilehandle file, int track);

DESCRIPTION

afSeekFrame moves the logical file pointer for a specified audio track to a desired sample frame location.

afTellFrame retrieves current value of a file read or write pointer.

PARAMETERS

file is a valid audio file handle created by afOpenFile(3).

track is an integer which refers to an audio track within a file. The constant AF_DEFAULT_TRACK should always be used for this parameter for all currently supported audio file formats.

frameoffset is a sample frame offset. Valid sample frame offsets must be greater than or equal to zero and strictly less than the number of sample frames contained within the specified audio track. If frameoffset is -1, afSeekFrame will not modify the current file offset and will instead return the current frame.

RETURN VALUE

On success, afSeekFrame and afTellFrame will return the current file pointer location as measured in sample frames from the start of the audio track.

ERRORS

The following error could be generated by afSeekFrame or afTellFrame:

    • AF_BAD_LSEEK

AUTHOR

Michael Pruett <michael@68k.org>