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

util/libs/tremor.lha

Mirror:Random
Showing: m68k-amigaos iconppc-amigaos iconppc-morphos iconi386-aros iconi386-amithlon iconppc-warpup iconppc-powerup icongeneric iconother icon
No screenshot available
Short:Ogg Vorbis decoder shared library
Author:Xiph.Org Foundation (Tremor/libogg), Matthias Muench (Port)
Uploader:tremor 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 V39), 68000 or better, no FPU
Distribution:Aminet
Download:util/libs/tremor.lha - View contents
Readme:util/libs/tremor.readme
Downloads:4

tremor.library 1.0
==================

Plays Ogg Vorbis (.ogg) files on classic AmigaOS. Tremor (libvorbisidec,
the integer decoder from Xiph.Org) and libogg 1.3.6 are linked into one
shared library that exports the vorbisfile API: open your own streams
through callbacks, read 16-bit PCM, seek, comments, chained streams.

25 functions. Output is 16-bit signed, big endian, with the sample rate
and channel count of the stream.

  * no FPU needed (integer-only codec)
  * no ixemul, no other libraries, no C library in the application
    required - only exec.library
  * reentrant, any number of tasks may decode at the same time, each with
    its own OggVorbis_File
  * one build per CPU: 68000, 68020, 68030, 68040, 68060
  * the 68020/030/040 builds use the 32x32->64 bit muls.l, the 68060 build
    uses partial products instead; the output of all four is bit-identical
    to a PC build of the same sources
  * the 68000 build uses Tremor's low accuracy mode, which keeps all
    products within 32 bit; its error is about -43 dB


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

Copy the library for your CPU to LIBS:

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

for example

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

Do not use the 68020-68040 builds on a 68060: the 060 does not implement
the 64-bit muls.l and would trap into 68060.library on every multiply.
On a 68080 it is the other way round: it has that muls.l in hardware, and
the 68040 build is about twice as fast as the 68060 build.


Tool
----

  C/oggdec file.ogg out.aiff
      Shows stream information and decodes the file to an AIFF file. Runs
      on every CPU.

In a chained stream that changes channel count or sample rate, the AIFF
header only fits the first part. The PCM data is correct.


Speed
-----

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

  44.1 kHz stereo, quality 5   about 2.5x real time

For older CPUs there are only estimates from the cycle counts of a CPU
emulator, without caches and memory timing:

                               44.1 kHz stereo    22 kHz mono
  68000, 7 MHz                 1/60               1/16
  68020, 14 MHz                1/10               1/2.6
  68030, 50 MHz                1/2.9              1.3x

So below the 68040 this is a library for converting files rather than for
playing music, except for low-rate mono streams on a fast 68030.


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

SDK/ contains the include files (proto, clib, GCC inline, fd, lvo), the
SFD, the autodoc, the Vorbis and Ogg headers and the source of oggdec.
Compile with -ISDK/include.

  #include <proto/exec.h>
  #include <tremor/ivorbisfile.h>

  struct Library *TremorBase = OpenLibrary(TREMOR_NAME, TREMOR_VERSION);
  ov_callbacks cb = { my_read, my_seek, my_close, my_tell };
  if (ov_open_callbacks(fh, &vf, NULL, 0, cb) == 0) {
      while ((n = ov_read(&vf, buffer, sizeof(buffer), &section)) != 0)
          ...
      ov_clear(&vf);
  }
  CloseLibrary(TremorBase);

Differences from the original API:

  * 64-bit values and ov_callbacks by value do not fit in a register. The
    library exports OvPcmTotal(), OvTimeSeek(), OvOpenCallbacks() etc.
    with pointers; inline functions in <tremor/ov_wrappers.h> provide the
    original names and signatures, so source code does not change
  * ov_open(), ov_fopen() and ov_test() use the FILE * of your C library,
    so they exist only as inline functions: #define TREMOR_STDIO before
    the include
  * not exported: the low-level API (vorbis_synthesis_*, ogg_stream_*)

What the caller has to take care of:

  * the library runs on the caller's stack: have at least 8 KB, the 4 KB
    default of a Shell is too little
  * callbacks use the C calling convention with arguments on the stack;
    small-data programs must declare them __saveds
  * the ov_read() buffer must be on an even address
  * int must be 32 bit: do not compile with -mshort
  * always call ov_clear(): the memory of a stream stays allocated in the
    pool of the library otherwise

README.md (in German) has the details and how the library was built and
tested. Its paths refer to the source tree, not to this archive.


Tested
------

  * Vampire V4 Standalone, 68080, Kickstart 3.2 (47.13): all five builds
    decode eight test files (8 to 48 kHz, mono and stereo, quality -1 to
    9, a chained stream) plus nine seeks each; PCM and all return values
    are bit-identical to a PC build of the same sources; oggdec
  * A1200 with Vampire, 68080, Kickstart 3.2: the 68040 build loads
  * the same test under vamos with 68000, 68020 and 68040 emulation
  * 1500 damaged files against a PC build with AddressSanitizer

Not yet tested on real 68000-68060 hardware, on UAE or on Kickstart
3.0/3.1, with several tasks decoding at the same time, or with very old
files that use floor 0.
Reports welcome.


History
-------

1.0 (05.10.2026)  first release


License
-------

BSD, see COPYING.tremor and COPYING.libogg (Tremor, libogg (c) Xiph.Org
Foundation; AmigaOS port (c) 2026 Matthias Muench).


Contents of util/libs/tremor.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/C/
-rwxr-xr-x     0/0       10095   17624  57.3% -lh5- 8f93 Nov  1 10:44 tremor/C/oggdec
-rw-r--r--     0/0         762    1466  52.0% -lh5- fb65 Nov  1 10:44 tremor/COPYING.libogg
-rw-r--r--     0/0         762    1466  52.0% -lh5- fb65 Nov  1 10:44 tremor/COPYING.tremor
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/Libs/
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/Libs/68000/
-rwxr-xr-x     0/0       52587   93180  56.4% -lh5- 8bb1 Nov  1 10:44 tremor/Libs/68000/tremor.library
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/Libs/68020/
-rwxr-xr-x     0/0       87770  115200  76.2% -lh5- 43d6 Nov  1 10:44 tremor/Libs/68020/tremor.library
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/Libs/68030/
-rwxr-xr-x     0/0       87770  115200  76.2% -lh5- b6a7 Nov  1 10:44 tremor/Libs/68030/tremor.library
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/Libs/68040/
-rwxr-xr-x     0/0       87654  114984  76.2% -lh5- c9ad Nov  1 10:44 tremor/Libs/68040/tremor.library
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/Libs/68060/
-rwxr-xr-x     0/0       90911  132860  68.4% -lh5- 03c6 Nov  1 10:44 tremor/Libs/68060/tremor.library
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/SDK/
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/SDK/doc/
-rw-r--r--     0/0        4416   15547  28.4% -lh5- 6385 Nov  1 10:44 tremor/SDK/doc/tremor.doc
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/SDK/examples/
-rw-r--r--     0/0        1732    4161  41.6% -lh5- 455a Nov  1 10:44 tremor/SDK/examples/oggdec.c
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/SDK/include/
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/SDK/include/clib/
-rw-r--r--     0/0         648    2094  30.9% -lh5- 3929 Nov  1 10:44 tremor/SDK/include/clib/tremor_protos.h
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/SDK/include/fd/
-rw-r--r--     0/0         375     948  39.6% -lh5- d1bd Nov  1 10:44 tremor/SDK/include/fd/tremor_lib.fd
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/SDK/include/inline/
-rw-r--r--     0/0         947    4783  19.8% -lh5- 99ef Nov  1 10:44 tremor/SDK/include/inline/tremor.h
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/SDK/include/libraries/
-rw-r--r--     0/0         417     692  60.3% -lh5- 1415 Nov  1 10:44 tremor/SDK/include/libraries/tremor.h
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/SDK/include/lvo/
-rw-r--r--     0/0         346     932  37.1% -lh5- 48d2 Nov  1 10:44 tremor/SDK/include/lvo/tremor_lib.i
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/SDK/include/ogg/
-rw-r--r--     0/0        1875    8373  22.4% -lh5- 864f Nov  1 10:44 tremor/SDK/include/ogg/ogg.h
-rw-r--r--     0/0         764    2034  37.6% -lh5- f862 Nov  1 10:44 tremor/SDK/include/ogg/os_types.h
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/SDK/include/proto/
-rw-r--r--     0/0         357     655  54.5% -lh5- c84a Nov  1 10:44 tremor/SDK/include/proto/tremor.h
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/SDK/include/tremor/
-rw-r--r--     0/0        2259    6699  33.7% -lh5- 9fe2 Nov  1 10:44 tremor/SDK/include/tremor/ivorbiscodec.h
-rw-r--r--     0/0        1845    5326  34.6% -lh5- 6d12 Nov  1 10:44 tremor/SDK/include/tremor/ivorbisfile.h
-rw-r--r--     0/0        1185    4160  28.5% -lh5- 42b7 Nov  1 10:44 tremor/SDK/include/tremor/ov_wrappers.h
drwxr-xr-x     0/0           0       0 ****** -lhd- 0000 Nov  1 10:44 tremor/SDK/sfd/
-rw-r--r--     0/0         556    2021  27.5% -lh5- 9078 Nov  1 10:44 tremor/SDK/sfd/tremor_lib.sfd
-rw-r--r--     0/0        2636    5718  46.1% -lh5- ffcd Nov  1 10:44 tremor/tremor.readme
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        44 files  438669  656123  66.9%            Nov  2 01:13
Page generated in 0.03 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>