|
Gin
|
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. | |
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:
| 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.
| f | The RIFF file to parse |
| onChunk | Callback 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::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.
| m | A MemoryBlock containing RIFF data |
| onChunk | Callback 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 |