File: afGetFrameCount.3

package info (click to toggle)
audiofile 0.3.4-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,192 kB
  • sloc: cpp: 31,691; sh: 11,006; ansic: 3,773; makefile: 271
file content (74 lines) | stat: -rw-r--r-- 3,082 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
'\" t
.\"     Title: afGetFrameCount
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\"      Date: 04/30/2012
.\"    Manual: \ \&
.\"    Source: Audio File Library 0.3.4
.\"  Language: English
.\"
.TH "AFGETFRAMECOUNT" "3" "04/30/2012" "Audio File Library 0\&.3\&.4" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
afGetFrameCount, afGetTrackBytes, afGetDataOffset \- get the total sample frame count, length of audio track in bytes, offset of the audio track for a track in an audio file
.SH "SYNOPSIS"
.sp
.nf
#include <audiofile\&.h>
.fi
.sp
.nf
AFframecount afGetFrameCount (AFfilehandle file, int track);
.fi
.sp
.nf
AFfileoffset afGetTrackBytes (AFfilehandle file, int track);
.fi
.sp
.nf
AFfileoffset afGetDataOffset (AFfilehandle file, int track);
.fi
.SH "PARAMETERS"
.sp
\fIfile\fR is an audio file handle created by a previous call to \fBafOpenFile\fR(3)\&.
.sp
\fItrack\fR is an integer which specifies an audio track within \fIfile\fR\&. All supported file formats contain exactly one audio track per file, so the constant AF_DEFAULT_TRACK should always be used\&.
.SH "DESCRIPTION"
.sp
afGetFrameCount returns the total number of sample frames contained within the specified track of the specified file\&.
.sp
Each sample frame of audio consists of a fixed number of samples (equal to the number of audio channels in the track\&. For monaural data, a sample frame consists of one audio sample\&. For stereophonic data, a sample frame consists of a stereo pair\&.
.sp
afGetTrackBytes returns the total number of bytes of raw audio data (i\&.e\&., prior to decompression or conversion) in the track\&.
.sp
afGetDataOffset returns the offset in bytes of the start of the audio data contained within the specified track of the specified file\&.
.SH "RETURN VALUE"
.sp
afGetFrameCount returns the total number of sample frames in \fItrack\fR\&.
.sp
afGetTrackBytes returns the total number of bytes of audio data in \fItrack\fR\&.
.sp
afGetDataOffset returns the offset in bytes to the beginning of the audio data in \fItrack\fR\&.
.sp
Each of these routines returns \-1 in case of error\&.
.SH "AUTHOR"
.sp
Michael Pruett <michael@68k\&.org>