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

A generic IFF/RIFF file reader helper. More...

Typedefs

typedef struct PlankIffFileReader * PlankIffFileReaderRef
 An opaque reference to the Plank IffFileReader object.

Functions

PlankIffFileReaderRef pl_IffFileReader_CreateAndInit ()
 Create and initialise a Plank IffFileReader object and return an oqaque reference to it.
PlankIffFileReaderRef pl_IffFileReader_Create ()
 Create a Plank IffFileReader object and return an oqaque reference to it.
PlankResult pl_IffFileReader_Init (PlankIffFileReaderRef p)
 Initialise a Plank IffFileReader object.
PlankResult pl_IffFileReader_DeInit (PlankIffFileReaderRef p)
 Deinitialise a Plank IffFileReader object.
PlankResult pl_IffFileReader_Destroy (PlankIffFileReaderRef p)
 Destroy a Plank IffFileReader object.
PlankFileRef pl_IffFileReader_GetFile (PlankIffFileReaderRef p)
 Gets the underlying Plank File object.
PlankResult pl_IffFileReader_Open (PlankIffFileReaderRef p, const char *filepath)
PlankResult pl_IffFileReader_OpenWithFile (PlankIffFileReaderRef p, PlankFileRef file)
 Open from a file object.
PlankResult pl_IffFileReader_Close (PlankIffFileReaderRef p)
PlankResult pl_IffFileReader_GetMainID (PlankIffFileReaderRef p, PlankIffID *mainID)
PlankResult pl_IffFileReader_GetFormatID (PlankIffFileReaderRef p, PlankIffID *formatID)
PlankResult pl_IffFileReader_GetMainLength (PlankIffFileReaderRef p, PlankLL *mainLength)
PlankResult pl_IffFileReader_GetMainEnd (PlankIffFileReaderRef p, PlankLL *mainEnd)
PlankResult pl_IffFileReader_IsBigEndian (PlankIffFileReaderRef p, PlankB *isBigEndian)
PlankResult pl_IffFileReader_SetEndian (PlankIffFileReaderRef p, const PlankB isBigEndian)
PlankResult pl_IffFileReader_SeekChunk (PlankIffFileReaderRef p, const PlankLL startPosition, const char *chunkID, PlankLL *chunkLength, PlankLL *chunkDataPos)
 Seek to the data of a particular chunk.
PlankResult pl_IffFileReader_ParseChunkHeader (PlankIffFileReaderRef p, char *chunkIDstr, PlankIffID *chunkID, PlankLL *chunkLength, PlankLL *chunkEnd, PlankLL *chunkPos)

Detailed Description

A generic IFF/RIFF file reader helper.


Typedef Documentation

typedef struct PlankIffFileReader* PlankIffFileReaderRef

An opaque reference to the Plank IffFileReader object.


Function Documentation

PlankResult pl_IffFileReader_Close ( PlankIffFileReaderRef  p)
Parameters:
pThe Plank IffFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankIffFileReaderRef pl_IffFileReader_Create ( )

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

Returns:
A Plank IffFileReader object as an opaque reference or PLANK_NULL.
PlankIffFileReaderRef pl_IffFileReader_CreateAndInit ( )

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

Returns:
A Plank IffFileReader object as an opaque reference or PLANK_NULL.
PlankResult pl_IffFileReader_DeInit ( PlankIffFileReaderRef  p)

Deinitialise a Plank IffFileReader object.

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

Destroy a Plank IffFileReader object.

Parameters:
pThe Plank IffFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankFileRef pl_IffFileReader_GetFile ( PlankIffFileReaderRef  p)

Gets the underlying Plank File object.

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

Parameters:
pThe Plank IffFileReader object.
Returns:
The Plank File object.
PlankResult pl_IffFileReader_GetFormatID ( PlankIffFileReaderRef  p,
PlankIffID *  formatID 
)
Parameters:
pThe Plank IffFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_IffFileReader_GetMainEnd ( PlankIffFileReaderRef  p,
PlankLL *  mainEnd 
)
Parameters:
pThe Plank IffFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_IffFileReader_GetMainID ( PlankIffFileReaderRef  p,
PlankIffID *  mainID 
)
Parameters:
pThe Plank IffFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_IffFileReader_GetMainLength ( PlankIffFileReaderRef  p,
PlankLL *  mainLength 
)
Parameters:
pThe Plank IffFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_IffFileReader_Init ( PlankIffFileReaderRef  p)

Initialise a Plank IffFileReader object.

Parameters:
pThe Plank IffFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_IffFileReader_IsBigEndian ( PlankIffFileReaderRef  p,
PlankB *  isBigEndian 
)
Parameters:
pThe Plank IffFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_IffFileReader_Open ( PlankIffFileReaderRef  p,
const char *  filepath 
)
Parameters:
pThe Plank IffFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_IffFileReader_OpenWithFile ( PlankIffFileReaderRef  p,
PlankFileRef  file 
)

Open from a file object.

Takes ownership and zeros the input file. The file must be little endian to start with.

PlankResult pl_IffFileReader_ParseChunkHeader ( PlankIffFileReaderRef  p,
char *  chunkIDstr,
PlankIffID *  chunkID,
PlankLL *  chunkLength,
PlankLL *  chunkEnd,
PlankLL *  chunkPos 
)
Parameters:
pThe Plank IffFileReader object.
chunkIDstrThe chunk ID as astring can be returned here. This should point to a string capable of holding at least 37 characters. Use 0 to ignore.
chunkIDThe chunk ID can be returned here. Use 0 to ignore.
chunkLengthThe chunk length is returned here. Use 0 to ignore.
chunkEndThe chunk end is returned here. Use 0 to ignore.
chunkPosThe chunk data position is returned here. Use 0 to ignore.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_IffFileReader_SeekChunk ( PlankIffFileReaderRef  p,
const PlankLL  startPosition,
const char *  chunkID,
PlankLL *  chunkLength,
PlankLL *  chunkDataPos 
)

Seek to the data of a particular chunk.

Parameters:
pThe Plank IffFileReader object.
startPositionWhere to start searching within the file, in bytes. There are two special values:
  • 0 : Specifies the start of the file (although this will be offset to the first chunk).
  • -1 : Specifies the current file position.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
PlankResult pl_IffFileReader_SetEndian ( PlankIffFileReaderRef  p,
const PlankB  isBigEndian 
)
Parameters:
pThe Plank IffFileReader object.
Returns:
A result code which will be PlankResult_OK if the operation was completely successful.
 All Classes Functions Typedefs Enumerations Enumerator Properties