afGetChannels(3dm) afGetChannels(3dm)
afGetChannels, afGetVirtualChannels - get the number of interleaved track
/ virtual channels from an AFfilehandle structure for an audio track
#include <dmedia/audiofile.h>
int afGetChannels(AFfilehandle file, int track)
int afGetVirtualChannels(AFfilehandle file, int track)
file is an AFfilehandle structure, previously created by a call to
afOpenFile(3dm).
track is an integer which identifies the audio track in the file.
Since all currently supported file formats allow at most one
audio track per file, the constant value AF_DEFAULT_TRACK should
always be used for this argument.
afGetChannels() and afGetVirtualChannels() return a nonnegative integer
value if successful, or -1 on failure.
afGetChannels() returns the number of interleaved channels in the
specified audio track in the file represented by the AFfilehandle
argument.
For example, the audio track in a stereo AIFF-C file contains 2
interleaved channels. The audio track in a mono AIFF-C file contains 1
channel.
afGetVirtualChannels() returns the number of virtual interleaved channels
in the specified audio track represented by the AFfilehandle argument, as
set by the most recent call to afSetVirtualChannels(3dm). The default
value is the number of channels in the track's underlying file. See
afIntro(3dm) for an explanation of virtual format.
afGetChannels() may return any number of channels, even for AIFF/AIFF-C
files. Be sure to check the number of channels of any file opened for
reading and make sure your program can handle that number. See
afSetVirtualChannels(3dm) for a technique for dealing with files with
unexpected numbers of channels in a simple and clean way.
afOpenFile(3dm), afReadFrames(3dm), afInitChannels(3dm),
afSetVirtualChannels(3dm)
afGetChannels(3dm) afGetChannels(3dm)
afGetChannels, afGetVirtualChannels - get the number of interleaved track
/ virtual channels from an AFfilehandle structure for an audio track
#include <dmedia/audiofile.h>
int afGetChannels(AFfilehandle file, int track)
int afGetVirtualChannels(AFfilehandle file, int track)
file is an AFfilehandle structure, previously created by a call to
afOpenFile(3dm).
track is an integer which identifies the audio track in the file.
Since all currently supported file formats allow at most one
audio track per file, the constant value AF_DEFAULT_TRACK should
always be used for this argument.
afGetChannels() and afGetVirtualChannels() return a nonnegative integer
value if successful, or -1 on failure.
afGetChannels() returns the number of interleaved channels in the
specified audio track in the file represented by the AFfilehandle
argument.
For example, the audio track in a stereo AIFF-C file contains 2
interleaved channels. The audio track in a mono AIFF-C file contains 1
channel.
afGetVirtualChannels() returns the number of virtual interleaved channels
in the specified audio track represented by the AFfilehandle argument, as
set by the most recent call to afSetVirtualChannels(3dm). The default
value is the number of channels in the track's underlying file. See
afIntro(3dm) for an explanation of virtual format.
afGetChannels() may return any number of channels, even for AIFF/AIFF-C
files. Be sure to check the number of channels of any file opened for
reading and make sure your program can handle that number. See
afSetVirtualChannels(3dm) for a technique for dealing with files with
unexpected numbers of channels in a simple and clean way.
afOpenFile(3dm), afReadFrames(3dm), afInitChannels(3dm),
afSetVirtualChannels(3dm)
PPPPaaaaggggeeee 1111 [ Back ]
|