pl-nk v0.4.5
Plonk|Plink|Plank are a set of cross-platform C/C++ frameworks for audio software development
Typedefs | Functions
Plank AudioFileReader class
Plank classes

An audio file reader. More...

Typedefs

typedef struct
PlankAudioFileReader * 
PlankAudioFileReaderRef
 An opaque reference to the Plank AudioFileReader object.

Functions

PlankAudioFileReaderRef pl_AudioFileReader_CreateAndInit ()
 Create and initialise a Plank AudioFileReader object and return an oqaque reference to it.
PlankAudioFileReaderRef pl_AudioFileReader_Create ()
 Create a Plank AudioFileReader object and return an oqaque reference to it.
PlankResult pl_AudioFileReader_Init (PlankAudioFileReaderRef p)
 Initialise a Plank AudioFileReader object.
PlankResult pl_AudioFileReader_DeInit (PlankAudioFileReaderRef p)
 Deinitialise a Plank AudioFileReader object.
PlankResult pl_AudioFileReader_Destroy (PlankAudioFileReaderRef p)
 Destroy a Plank AudioFileReader object.
PlankFileRef pl_AudioFileReader_GetFile (PlankAudioFileReaderRef p)
 Gets the underlying Plank File object.
PlankResult pl_AudioFileReader_Open (PlankAudioFileReaderRef p, const char *filepath)
PlankResult pl_AudioFileReader_OpenWithFile (PlankAudioFileReaderRef p, PlankFileRef file, const PlankAudioFileMetaDataIOFlags metaDataIOFlags)
 Open from a file object.
PlankResult pl_AudioFileReader_Close (PlankAudioFileReaderRef p)
PlankResult pl_AudioFileReader_GetFormat (PlankAudioFileReaderRef p, int *format)
PlankResult pl_AudioFileReader_GetEncoding (PlankAudioFileReaderRef p, int *encoding)
PlankResult pl_AudioFileReader_GetBitsPerSample (PlankAudioFileReaderRef p, int *bitsPerSample)
 The result of this will be invalid if the file is a compressed format.
PlankResult pl_AudioFileReader_GetBytesPerFrame (PlankAudioFileReaderRef p, int *bytesPerFrame)
 The result of this will be invalid if the file is a compressed format.
PlankResult pl_AudioFileReader_GetNumChannels (PlankAudioFileReaderRef p, int *numChannels)
PlankResult pl_AudioFileReader_GetSampleRate (PlankAudioFileReaderRef p, double *sampleRate)
PlankResult pl_AudioFileReader_GetNumFrames (PlankAudioFileReaderRef p, PlankLL *numFrames)
PlankResult pl_AudioFileReader_SetFramePosition (PlankAudioFileReaderRef p, const PlankLL frameIndex)
PlankResult pl_AudioFileReader_ResetFramePosition (PlankAudioFileReaderRef p)
PlankResult pl_AudioFileReader_GetFramePosition (PlankAudioFileReaderRef p, PlankLL *frameIndex)
PlankResult pl_AudioFileReader_ReadFrames (PlankAudioFileReaderRef p, const PlankB convertByteOrder, const int numFrames, void *data, int *framesRead)

Detailed Description

An audio file reader.


Typedef Documentation

typedef struct PlankAudioFileReader* PlankAudioFileReaderRef

An opaque reference to the Plank AudioFileReader object.


Function Documentation

PlankResult pl_AudioFileReader_Close ( PlankAudioFileReaderRef  p)
Parameters:
pThe Plank AudioFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankAudioFileReaderRef pl_AudioFileReader_Create ( )

Create a Plank AudioFileReader object and return an oqaque reference to it.

Returns:
A Plank AudioFileReader object as an opaque reference or PLANK_NULL.
PlankAudioFileReaderRef pl_AudioFileReader_CreateAndInit ( )

Create and initialise a Plank AudioFileReader object and return an oqaque reference to it.

Returns:
A Plank AudioFileReader object as an opaque reference or PLANK_NULL.
PlankResult pl_AudioFileReader_DeInit ( PlankAudioFileReaderRef  p)

Deinitialise a Plank AudioFileReader object.

Parameters:
pThe Plank AudioFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_AudioFileReader_Destroy ( PlankAudioFileReaderRef  p)

Destroy a Plank AudioFileReader object.

Parameters:
pThe Plank AudioFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_AudioFileReader_GetBitsPerSample ( PlankAudioFileReaderRef  p,
int *  bitsPerSample 
)

The result of this will be invalid if the file is a compressed format.

Parameters:
pThe Plank AudioFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_AudioFileReader_GetBytesPerFrame ( PlankAudioFileReaderRef  p,
int *  bytesPerFrame 
)

The result of this will be invalid if the file is a compressed format.

Parameters:
pThe Plank AudioFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_AudioFileReader_GetEncoding ( PlankAudioFileReaderRef  p,
int *  encoding 
)
Parameters:
pThe Plank AudioFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankFileRef pl_AudioFileReader_GetFile ( PlankAudioFileReaderRef  p)

Gets the underlying Plank File object.

This is the raw file object the is performing the fundamental file access operations.

Parameters:
pThe Plank AudioFileReader object.
Returns:
The Plank File object.
PlankResult pl_AudioFileReader_GetFormat ( PlankAudioFileReaderRef  p,
int *  format 
)
Parameters:
pThe Plank AudioFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_AudioFileReader_GetFramePosition ( PlankAudioFileReaderRef  p,
PlankLL *  frameIndex 
)
Parameters:
pThe Plank AudioFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_AudioFileReader_GetNumChannels ( PlankAudioFileReaderRef  p,
int *  numChannels 
)
Parameters:
pThe Plank AudioFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_AudioFileReader_GetNumFrames ( PlankAudioFileReaderRef  p,
PlankLL *  numFrames 
)
Parameters:
pThe Plank AudioFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_AudioFileReader_GetSampleRate ( PlankAudioFileReaderRef  p,
double *  sampleRate 
)
Parameters:
pThe Plank AudioFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_AudioFileReader_Init ( PlankAudioFileReaderRef  p)

Initialise a Plank AudioFileReader object.

Parameters:
pThe Plank AudioFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_AudioFileReader_Open ( PlankAudioFileReaderRef  p,
const char *  filepath 
)
Parameters:
pThe Plank AudioFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_AudioFileReader_OpenWithFile ( PlankAudioFileReaderRef  p,
PlankFileRef  file,
const PlankAudioFileMetaDataIOFlags  metaDataIOFlags 
)

Open from a file object.

The AudioFileReader takes ownership of the file and zeros the incomming file object.

PlankResult pl_AudioFileReader_ReadFrames ( PlankAudioFileReaderRef  p,
const PlankB  convertByteOrder,
const int  numFrames,
void *  data,
int *  framesRead 
)
Parameters:
pThe Plank AudioFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_AudioFileReader_ResetFramePosition ( PlankAudioFileReaderRef  p)
Parameters:
pThe Plank AudioFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_AudioFileReader_SetFramePosition ( PlankAudioFileReaderRef  p,
const PlankLL  frameIndex 
)
Parameters:
pThe Plank AudioFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
 All Classes Functions Typedefs Enumerations Enumerator Properties