Gin
Loading...
Searching...
No Matches
Public Member Functions | List of all members
RIFFParser Class Reference

Parses RIFF (Resource Interchange File Format) files. More...

#include <gin_riffparser.h>

Public Member Functions

 RIFFParser (const juce::File &f, std::function< void(uint32_t, const uint8_t *, uint32_t)>)
 Parses a RIFF file and calls the callback for each chunk.
 
 RIFFParser (const juce::MemoryBlock &m, std::function< void(uint32_t, const uint8_t *, uint32_t)>)
 Parses RIFF data from memory and calls the callback for each chunk.
 

Detailed Description

Parses RIFF (Resource Interchange File Format) files.

RIFF is a generic file container format used by many audio and video formats including WAV, AVI, and WebP. This parser iterates through all chunks in a RIFF file and calls a callback for each one.

Common RIFF-based formats:

See also
getWavetableSize

Constructor & Destructor Documentation

◆ RIFFParser() [1/2]

RIFFParser::RIFFParser ( const juce::File &  f,
std::function< void(uint32_t, const uint8_t *, uint32_t)>   
)

Parses a RIFF file and calls the callback for each chunk.

Parameters
fThe RIFF file to parse
onChunkCallback function receiving (fourCC, data, size) for each chunk where fourCC is the chunk identifier, data points to chunk contents, and size is the chunk size in bytes

◆ RIFFParser() [2/2]

RIFFParser::RIFFParser ( const juce::MemoryBlock &  m,
std::function< void(uint32_t, const uint8_t *, uint32_t)>   
)

Parses RIFF data from memory and calls the callback for each chunk.

Parameters
mA MemoryBlock containing RIFF data
onChunkCallback function receiving (fourCC, data, size) for each chunk where fourCC is the chunk identifier, data points to chunk contents, and size is the chunk size in bytes

The documentation for this class was generated from the following file: