Example programs
Every program in examples/
builds by default (ICLFORGE_BUILD_EXAMPLES=ON) and registers as a ctest entry named
example.<name>, so "the examples still work" is checked by the same command as everything else
(read_adm, encode_adm, and encode_iab additionally need
-DICLFORGE_BUILD_ADM=ON; decode_ac4 and ac4_content_signature need ICLFORGE_BUILD_AC4, the C programs
ICLFORGE_BUILD_CAPI, and the two TrueHD ones ICLFORGE_BUILD_TRUEHD as well, all on by default). These programs are
also the source the library pages excerpt from — each page's "Full program" link lands on one of
them.
Encoding
Decoding & analysis
| Example |
What it shows |
Discussed in |
decode_stream |
Scan an unknown elementary stream, then decode it with the right decoder. |
Decoding |
decode_robustness |
Skip a damaged mid-stream frame and keep decoding. |
Decoding |
decode_ac4 |
Decode an AC-4 stream that arrives in pieces, by block, with a television's output settings, then read its presentations and metadata. ctest hands it a committed stream. |
AC-4 decoding |
stream_edit |
Where each access unit starts, a metadata rewrite that leaves the audio bit-identical, and a cut that rejoins byte for byte. |
Decoding |
level_metering |
Decode and meter: per-channel peak/RMS plus the speaker-ring energy vector. |
Muxing & sinks |
qc_report |
Decode, measure BS.1770-4/Tech 3342, and check named QC delivery gates. |
Metadata |
Spatial & Atmos
Containers
File I/O, ADM & IAB
| Example |
What it shows |
Discussed in |
wav_roundtrip |
Real WAV in → encode → decode → WAV out, crossing the WAV↔A/52 channel order both ways. |
File I/O |
read_adm |
Open an ADM BW64 file and print the parsed graph — needs -DICLFORGE_BUILD_ADM=ON. |
ADM / BW64 reading |
encode_adm |
The whole read direction end to end: parse_bw64 → adm::build → AtmosEncoder, an ADM BWF master out to a DD+ JOC elementary stream. The one example needing iclforge::ac3 and the ADM modules together — needs -DICLFORGE_BUILD_ADM=ON. |
ADM → Atmos bridging |
read_iab |
Parse a bare IAB stream and inspect its frame and element graph. |
IAB reading |
encode_iab |
Map an IAB master through adm::build_iab and encode it as DD+ JOC — needs -DICLFORGE_BUILD_ADM=ON. |
ADM → Atmos bridging |
C API
| Example |
What it shows |
Discussed in |
capi_encode_decode |
Encode/decode AC-3 through iclforge_c/iclforge.h — plain C, not C++, so the build itself proves the header is C-usable. |
C API |
capi_encode_eac3 |
Encode a 5.1.2 E-AC-3 access unit (a bed plus one dependent substream) through the C API and decode it back. |
C API |
capi_decode_truehd |
Decode a TrueHD or MLP stream to raw 24-bit PCM through the C API. |
C API |
capi_encode_truehd |
Encode a stereo tone as TrueHD through the C API and decode it back; the codec is lossless, so every sample must return. |
C API |
Python
Not part of ICLFORGE_BUILD_EXAMPLES/ctest above — a separate, Python-only program backing
Python bindings, run directly (python examples/python/encode_decode_roundtrip.py)
rather than built.