mcpp index

compat.dr_libs

dr_libs (2026.03.03: dr_wav 0.14.5, dr_flac 0.13.3, dr_mp3 0.7.3) — single-file WAV/AIFF, FLAC and MP3 decoders and a WAV encoder in C, no dependencies

mcpp add compat.dr_libs@2026.03.03

用法

來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。

// compat.dr_libs — dr_wav, dr_flac and dr_mp3, each through its own decoder.
//
// WHAT THIS ASSERTS AND WHY
//
// The package is one generated TU that defines the three *_IMPLEMENTATION
// macros; a build that dropped one would not link. Every check asks a decoder
// a question whose answer is fixed by the data, not by the decoder:
//
//   the versions         drwav/drflac/drmp3_version_string, the linked code's
//                        own strings: 0.14.5, 0.13.3, 0.7.3 (the pinned commit)
//   WAV round trip       PCM16 stereo written with drwav_init_memory_write,
//                        read back sample-exact, as s16 and as f32 (s / 32768),
//                        and the same samples through a Sony Wave64 container
//   IEEE float WAV       f32 written and read back bit-exact
//   mu-law WAV           the decoder's table equals drwav_mulaw_to_s16
//   FLAC                 2048 stereo frames (fixed-predictor/LPC subframes,
//                        Rice residuals, stereo decorrelation, 4 frames)
//                        decoded sample-exact against the integer signal the
//                        fixture was encoded from, whose MD5 is the one in its
//                        STREAMINFO; the vendor string from VORBIS_COMMENT;
//                        a seek into the third frame
//   MP3                  a 440 Hz sine, 22050 Hz mono, 32 kb/s with a LAME
// …

tests/examples/dr_libs/tests/dr_libs.cpp · 專案 tests/examples/dr_libs

建置

targets
dr_libs (lib)
language
c++23
C standard
c11
import std
no
include dirs
*

原始檔 (1)

  • mcpp_generated/dr_libs_impl.c

產生的檔案

  • mcpp_generated/dr_libs_impl.c

版本

版本平台 鏡像sha256
2026.03.03 最新 LinuxWindowsmacOS CN GLOBAL b56be5930399…