AminetAminet
Search:
85764 packages online
• About
• Recent
• Browse
• Search
• Upload
• Setup
• Services

util/libs/opusfile.lha

Mirror:Random
Showing: m68k-amigaos icongeneric icon
No screenshot available
Short:Ogg Opus decoder shared library
Author:Xiph.Org Foundation (libopus/libogg/opusfile), Mattias Muench (Port)
Uploader:opusfile amigaworld de (Matthias Muench)
Type:util/libs
Version:1.0
Architecture:m68k-amigaos >= 3.0.0
Date:2026-11-02
Requires:AmigaOS 3.0+ (exec/dos V39), 68000 or better, no FPU
Distribution:Aminet
Download:util/libs/opusfile.lha - View contents
Readme:util/libs/opusfile.readme
Downloads:6

opusfile.library 1.0
====================

Plays Ogg Opus (.opus) files on classic AmigaOS. libopus 1.6.1 (decoder,
fixed point), libogg 1.3.6 and opusfile (master 2026-03-28) are linked
into one shared library that exports

  * the opusfile API: open files, memory blocks or your own streams
    (web radio), read 16-bit PCM, seek, tags, chained streams,
    ReplayGain-style gain, album art tag parsing
  * the raw libopus decoder API, single stream and multistream
    (5.1 / 7.1), for applications that do their own container parsing

74 functions. Output is always 48 kHz, 16-bit signed, big endian.

  * no FPU needed (integer-only codec)
  * no ixemul, no other libraries, no C library in the application
    required - only exec.library and dos.library
  * reentrant, any number of tasks may decode at the same time
  * brings its own decoding stack: the caller's 4 KB default stack is fine
  * one build per CPU: 68000, 68020, 68030, 68040, 68060
  * the 68020/030/040 builds use the 32x32->64 bit muls.l and have the
    FFT butterflies in assembly; their output is bit-identical to a
    64-bit PC build of libopus


Installation
------------

Copy the library for your CPU to LIBS:

  CPU                              copy
  68000 / 68010                    Libs/68000/opusfile.library
  68020 / 68030                    Libs/68020/opusfile.library
  68040                            Libs/68040/opusfile.library
  68060                            Libs/68060/opusfile.library
  68080 (Vampire)                  Libs/68040/opusfile.library

for example

  Copy opusfile/Libs/68040/opusfile.library LIBS:

Do not use the 68040 build on a 68060: the 060 does not implement the
64-bit muls.l and would trap into 68060.library on every multiply.


Tools (68020+)
--------------

  C/opus2raw file.opus [out.raw]
      Shows stream information and tags; with a second argument decodes
      to raw 16-bit big-endian stereo PCM, 48 kHz.

  C/opbench file.opus [out.raw]
      Decodes the file from memory and reports the speed as a real-time
      factor.


Speed
-----

Measured on a 68080 (Vampire A1200, Kickstart 3.2), 68040 build:

  CELT stereo 128 kbit/s       1.60x real time
  CELT mono 64 kbit/s          2.75x
  SILK (speech) 12 kbit/s      5.58x
  Hybrid stereo 40 kbit/s      2.02x
  5.1 surround 256 kbit/s      0.53x

Real 68020-68060 CPUs have not been measured. At their clock rates they
will not decode 48 kHz stereo music in real time; speech and low-rate
mono streams are more realistic there.


For programmers
---------------

SDK/ contains the include files (proto, clib, GCC inline, fd, lvo), the
SFD and the original opusfile.h/opus.h headers with
their documentation.

  #include <proto/exec.h>
  #include <proto/opusfile.h>

  struct Library *OpusFileBase = OpenLibrary("opusfile.library", 1);
  OggOpusFile *of = op_open_file("music.opus", &err);
  while ((n = op_read_stereo(of, pcm, 11520)) > 0) { ... }
  op_free(of);
  CloseLibrary(OpusFileBase);

Differences from the original API:

  * 64-bit values (op_pcm_total, op_pcm_seek, ...) are exported as _ptr
    functions; <libraries/opusfile_compat.h> maps the original names, so
    source code does not change
  * opus_decoder_ctl()/opus_multistream_decoder_ctl() are exported as
    ...ctlA(); the compat header maps the usual OPUS_SET_xxx() calls
  * op_fopen() reads through dos.library and returns an opaque stream
  * not available: op_fdopen, op_freopen, the URL/HTTP functions (do the
    networking yourself and use op_open_callbacks()), the float API, the
    encoder
  * callbacks (OpusFileCallbacks, decode callback) use the C calling
    convention with arguments on the stack; small-data programs must
    declare them __saveds, register-argument programs __stdargs

README.md has the details: callbacks and stacks, tasks vs. processes,
resource use, how the library was built and tested.

SDK/examples contains the sources of opus2raw and opbench.


Tested
------

  * A1200 with Vampire 68080, Kickstart 3.2 (47.13): 68020, 68040 and
    68060 builds load and expunge cleanly; six stream types incl. 5.1;
    tags; called with a 4 KB stack; two decoders in parallel; no memory
    leaks
  * Vampire V4 Standalone, 68080, Kickstart 3.2: 68040 build
  * decoder output compared bit by bit against PC builds of libopus

Not yet tested on real 68000-68060 hardware, with the 68000/68030 builds,
or on Kickstart 3.0/3.1.
Reports welcome.


History
-------

1.0 (11.10.2026)  first release


License
-------

3-clause BSD, see COPYING (libopus, libogg, opusfile (c) Xiph.Org
Foundation and contributors; Amiga glue (c) 2026 Matthias Muench).


Contents of util/libs/opusfile.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/
-rw-r--r--     0/0        1325    5264  25.2% -lh5- c334 Oct 11 22:15 opusfile/COPYING
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/Libs/
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/Libs/68000/
-rwxr-xr-x     0/0      128324  208632  61.5% -lh5- 80a4 Oct 11 22:15 opusfile/Libs/68000/opusfile.library
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/Libs/68020/
-rwxr-xr-x     0/0      123157  189264  65.1% -lh5- 2f9a Oct 11 22:15 opusfile/Libs/68020/opusfile.library
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/Libs/68030/
-rwxr-xr-x     0/0      123157  189264  65.1% -lh5- 2f9a Oct 11 22:15 opusfile/Libs/68030/opusfile.library
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/Libs/68040/
-rwxr-xr-x     0/0      122447  188292  65.0% -lh5- 0def Oct 11 22:15 opusfile/Libs/68040/opusfile.library
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/Libs/68060/
-rwxr-xr-x     0/0      124562  194004  64.2% -lh5- 8052 Oct 11 22:15 opusfile/Libs/68060/opusfile.library
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/SDK/
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/SDK/examples/
-rw-r--r--     0/0        1222    2632  46.4% -lh5- a2b7 Oct 11 22:15 opusfile/SDK/examples/opbench.c
-rw-r--r--     0/0         995    2181  45.6% -lh5- 902e Oct 11 22:15 opusfile/SDK/examples/opus2raw.c
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/SDK/include/
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/SDK/include/clib/
-rw-r--r--     0/0        1449    6222  23.3% -lh5- a3dd Oct 11 22:15 opusfile/SDK/include/clib/opusfile_protos.h
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/SDK/include/fd/
-rw-r--r--     0/0        1000    3421  29.2% -lh5- 3f60 Oct 11 22:15 opusfile/SDK/include/fd/opusfile_lib.fd
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/SDK/include/inline/
-rw-r--r--     0/0        2402   15335  15.7% -lh5- fca5 Oct 11 22:15 opusfile/SDK/include/inline/opusfile.h
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/SDK/include/libraries/
-rw-r--r--     0/0         878    2507  35.0% -lh5- c55e Oct 11 22:15 opusfile/SDK/include/libraries/opusfile_compat.h
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/SDK/include/lvo/
-rw-r--r--     0/0         770    2962  26.0% -lh5- 65c5 Oct 11 22:15 opusfile/SDK/include/lvo/opusfile_lib.i
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/SDK/include/ogg/
-rw-r--r--     0/0         183     381  48.0% -lh5- c3d5 Oct 11 22:15 opusfile/SDK/include/ogg/config_types.h
-rw-r--r--     0/0        1875    8373  22.4% -lh5- 864f Oct 11 22:15 opusfile/SDK/include/ogg/ogg.h
-rw-r--r--     0/0        1054    4781  22.0% -lh5- 1e5b Oct 11 22:15 opusfile/SDK/include/ogg/os_types.h
-rw-r--r--     0/0       13281   59505  22.3% -lh5- 1f9b Oct 11 22:15 opusfile/SDK/include/opus.h
-rw-r--r--     0/0        9865   38558  25.6% -lh5- 9cf7 Oct 11 22:15 opusfile/SDK/include/opus_defines.h
-rw-r--r--     0/0        6948   38267  18.2% -lh5- eb6f Oct 11 22:15 opusfile/SDK/include/opus_multistream.h
-rw-r--r--     0/0        1589    5157  30.8% -lh5- 7792 Oct 11 22:15 opusfile/SDK/include/opus_types.h
-rw-r--r--     0/0       27433  115406  23.8% -lh5- d9f8 Oct 11 22:15 opusfile/SDK/include/opusfile.h
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/SDK/include/proto/
-rw-r--r--     0/0         364     806  45.2% -lh5- 2cc2 Oct 11 22:15 opusfile/SDK/include/proto/opusfile.h
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Oct 11 22:15 opusfile/SDK/sfd/
-rw-r--r--     0/0        1425    6592  21.6% -lh5- 25cb Oct 11 22:15 opusfile/SDK/sfd/opusfile_lib.sfd
[Amiga]                  12341   20504  60.2% -lh5- 1d3f Oct 11 23:15 opusfile/C/opbench
[Amiga]                   8007   13568  59.0% -lh5- 40a8 Oct 11 23:15 opusfile/C/opus2raw
[Amiga]                   2337    4989  46.8% -lh5- 64f8 Nov  1 11:59 opusfile/opusfile.readme
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        44 files  718390 1326867  54.1%            Nov  2 01:13
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>