FLAC/Ogg-FLAC decoder library
- Size
- 514K (526,388 bytes)
- Added
- 2026-11-20 17:28
- Downloads
- 1
- Long Description
- drflac.library 1.0 ================== drflac.library is a port of dr_flac 0.13.4 by David Reid (https://github.com/mackron/dr_libs), the compact single file FLAC decoder, as a classic AmigaOS shared library. It decodes: - native FLAC and Ogg-encapsulated FLAC - 4 to 32 bits per sample, 1 to 8 channels, any sample rate - output as 32 bit, 16 bit or float PCM - fast seeking (seek table, binary search or brute force) - metadata: Vorbis comments (tags), pictures (cover art), cue sheets, seek tables The library offers the complete dr_flac API under the original names, so code written for dr_flac.h usually compiles unchanged against <proto/drflac.h>. It is reentrant: any number of tasks may decode at the same time, one decoder per task. Callers do not need a large stack - if less than needed is free, the library switches to a private stack for the duration of the call. For programs that should not depend on a shared library, the archive also contains dr_flac as a static link library (libdrflac.a) for all five CPUs. dr_flac version: development state 0.13.4 (commit dfe8377 of 1.9.2026). It contains all fixes made after the 0.13.3 release (overflows in picture parsing, bounds checks, seek fixes). Installation ------------ Copy the library for your CPU to LIBS: CPU copy 68000 / 68010 Libs/68000/drflac.library 68020 Libs/68020/drflac.library 68030 Libs/68030/drflac.library 68040 with FPU Libs/68040/drflac.library 68060 with FPU Libs/68060/drflac.library 68LC040 / 68EC060 (no FPU) Libs/68030/drflac.library 68080 (Vampire) Libs/68020/drflac.library for example Copy drflac/Libs/68030/drflac.library LIBS: "Version drflac.library FULL" shows which build is installed. A build that does not match the CPU/FPU fails to open instead of crashing. Only the 68060 build avoids the 64 bit form of MULS.L, which a 68060 does not implement: any other build would trap into 68060.library on files that need 64 bit prediction. Decoding itself is pure integer arithmetic. Floating point is only used for float output and for binary search seeking. The 68000-68030 builds do this via mathieeesingbas, mathieeedoubbas and mathieeedoubtrans.library (part of every Workbench 2.04+), which use an FPU automatically if one is present. The 68040/68060 builds use the FPU directly. Tools ----- C/flactest LIB=Libs/68020/drflac.library FILE=file.flac [QUIET] Checks a file with every open and read function against the MD5 sum in the FLAC file, also 16 bit and float output and seeking, and reports the speed. German output; runs on any CPU. Speed ----- Measured on a 68080 (Vampire V4, Kickstart 3.2), percent of real time, 16 bit output: Build 16 bit 44.1 kHz 24 bit 96 kHz 16 bit 48 kHz stereo stereo 5.1 68000 957 % 438 % 573 % 68020 1704 % 785 % 829 % 68030 1698 % 789 % 829 % 68040/FPU 1660 % 785 % 826 % 68060/FPU 1666 % 566 % 847 % The 68080 is none of the target CPUs; the numbers only show the order of magnitude. Real 68000-68060 CPUs have not been measured. For programmers --------------- SDK/include/proto/drflac.h include this one SDK/include/libraries/drflac.h types and constants (from dr_flac.h) SDK/include/clib/, inline/ prototypes, GCC inline calls SDK/include/fd/, SDK/sfd/ interface description SDK/include/dr_flac.h header for the static libdrflac.a SDK/lib/680x0/libdrflac.a dr_flac as static link library SDK/examples/ sources of flactest #include <proto/exec.h> #include <proto/drflac.h> struct Library *DrFlacBase = OpenLibrary(DRFLACNAME, 1); drflac *
- SHA-256
ea1536eefd8aac1143e97e211b86427f7ef360e1b9103d0f5d1636883ec13992