Skip to content

Commit

Permalink
Added Tremor Ogg decoder, removed libvorbis from Makefile. OGG audio …
Browse files Browse the repository at this point in the history
…working perfectly.

Tremor is extremly similar to libogg but only uses integers (and doesn't provide an encoder). The playing problem with libvorbis was probably a float-precision related issue.

No need for make build-all.
  • Loading branch information
Reuh committed Dec 29, 2015
1 parent c053997 commit e39fcc6
Show file tree
Hide file tree
Showing 97 changed files with 16,571 additions and 15 deletions.
8 changes: 4 additions & 4 deletions Makefile
Expand Up @@ -29,9 +29,9 @@ include $(DEVKITARM)/3ds_rules
#---------------------------------------------------------------------------------
TARGET := ctruLua
BUILD := build
SOURCES := source libs/lua-5.3.2/src
SOURCES := source libs/lua-5.3.2/src libs/tremor
DATA := data
INCLUDES := include libs/lua-5.3.2/src libs/lzlib
INCLUDES := include libs/lua-5.3.2/src libs/lzlib libs/tremor
#ROMFS := romfs

APP_TITLE := ctruLua
Expand All @@ -55,7 +55,7 @@ CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
ASFLAGS := -g $(ARCH)
LDFLAGS = -specs=3dsx.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)

LIBS := -lsfil -ljpeg -lsftd -lfreetype -lpng -lz -lsf2d -lctru -lvorbisfile -lvorbis -logg -lm
LIBS := -lsfil -ljpeg -lsftd -lfreetype -lpng -lz -lsf2d -lctru -logg -lm

#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
Expand Down Expand Up @@ -142,7 +142,7 @@ $(BUILD):
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile

build-portlibs:
@make -C libs/3ds_portlibs zlib freetype libjpeg-turbo libpng libogg libvorbis
@make -C libs/3ds_portlibs zlib freetype libjpeg-turbo libpng libogg

build-sf2dlib:
@make -C libs/sf2dlib/libsf2d build
Expand Down
19 changes: 19 additions & 0 deletions libs/tremor/CHANGELOG
@@ -0,0 +1,19 @@
*** 20020517: 1.0.2 ***

Playback bugfix to floor1; mode mistakenly used for sizing instead
of blockflag

*** 20020515: 1.0.1 ***

Added complete API documentation to source tarball. No code
changes.

*** 20020412: 1.0.1 ***

Fixed a clipping bug that affected ARM processors; negative
overflows were being properly clipped, but then clobbered to
positive by the positive overflow chec (asm_arm.h:CLIP_TO_15)

*** 20020403: 1.0.0 ***

Initial version
28 changes: 28 additions & 0 deletions libs/tremor/COPYING
@@ -0,0 +1,28 @@
Copyright (c) 2002, Xiph.org Foundation

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50 changes: 50 additions & 0 deletions libs/tremor/Makefile.am
@@ -0,0 +1,50 @@
AUTOMAKE_OPTIONS = foreign

INCLUDES = -I./ @OGG_CFLAGS@

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = vorbisidec.pc

lib_LTLIBRARIES = libvorbisidec.la

libvorbisidec_la_SOURCES = mdct.c block.c window.c \
synthesis.c info.c \
floor1.c floor0.c vorbisfile.c \
res012.c mapping0.c registry.c codebook.c \
sharedbook.c \
codebook.h misc.h mdct_lookup.h\
os.h mdct.h block.h ivorbisfile.h lsp_lookup.h\
registry.h window.h window_lookup.h\
codec_internal.h backends.h \
asm_arm.h ivorbiscodec.h
libvorbisidec_la_LDFLAGS = -version-info @V_LIB_CURRENT@:@V_LIB_REVISION@:@V_LIB_AGE@
libvorbisidec_la_LIBADD = @OGG_LIBS@

EXTRA_PROGRAMS = ivorbisfile_example iseeking_example
CLEANFILES = $(EXTRA_PROGRAMS) $(lib_LTLIBRARIES)

ivorbisfile_example_SOURCES = ivorbisfile_example.c
ivorbisfile_example_LDFLAGS = -static
ivorbisfile_example_LDADD = libvorbisidec.la @OGG_LIBS@

iseeking_example_SOURCES = iseeking_example.c
iseeking_example_LDFLAGS = -static
iseeking_example_LDADD = libvorbisidec.la @OGG_LIBS@

includedir = $(prefix)/include/tremor

include_HEADERS = ivorbiscodec.h ivorbisfile.h config_types.h

EXTRA_DIST = vorbisidec.pc.in \
$(srcdir)/doc/*.html $(srcdir)/win32/VS*/libtremor/*.vcproj

example:
-ln -fs . vorbis
$(MAKE) ivorbisfile_example
$(MAKE) iseeking_example

debug:
$(MAKE) all CFLAGS="@DEBUG@"

profile:
$(MAKE) all CFLAGS="@PROFILE@"
46 changes: 46 additions & 0 deletions libs/tremor/README
@@ -0,0 +1,46 @@
This README covers the Ogg Vorbis 'Tremor' integer playback codec
source as of date 2002 09 02, version 1.0.0.

******

The C source in this package will build on any ANSI C compiler and
function completely and properly on any platform. The included build
system assumes GNU build system and make tools (m4, automake,
autoconf, libtool and gmake). GCC is not required, although GCC is
the most tested compiler. To build using GNU tools, type in the
source directory:

./autogen.sh
make

Currently, the source implements playback in pure C on all platforms
except ARM, where a [currently] small amount of assembly (see
asm_arm.h) is used to implement 64 bit math operations and fast LSP
computation. If building on ARM without the benefit of GNU build
system tools, be sure that '_ARM_ASSEM_' is #defined by the build
system if this assembly is desired, else the resulting library will
use whatever 64 bit math builtins the compiler implements.

No math library is required by this source. No floating point
operations are used at any point in either setup or decode. This
decoder library will properly decode any past, current or future
Vorbis I file or stream.

********

The build system produces a static and [when supported by the OS]
dynamic library named 'libvorbisidec'. This library exposes an API
nearly identical to the BSD reference library's 'libvorbisfile',
including all the features familiar to users of vorbisfile. This API
is similar enough that the proper header file to include is named
'ivorbisfile.h' [included in the source build directory]. Lower level
libvorbis-style headers and structures are in 'ivorbiscodec.h'
[included in the source build directory]. A simple example program,
ivorbisfile_example.c, can be built with 'make example'.

********

Detailed Tremor API Documentation begins at doc/index.html

Monty
xiph.org
62 changes: 62 additions & 0 deletions libs/tremor/Version_script.in
@@ -0,0 +1,62 @@
#
# Export file for libvorbisidec
#
# Only the symbols listed in the global section will be callable from
# applications linking to libvorbisidec.
#

@PACKAGE@.so.1
{
global:
ov_clear;
ov_open;
ov_open_callbacks;
ov_test;
ov_test_callbacks;
ov_test_open;
ov_bitrate;
ov_bitrate_instant;
ov_streams;
ov_seekable;
ov_serialnumber;
ov_raw_total;
ov_pcm_total;
ov_time_total;
ov_raw_seek;
ov_pcm_seek;
ov_pcm_seek_page;
ov_time_seek;
ov_time_seek_page;
ov_raw_tell;
ov_pcm_tell;
ov_time_tell;
ov_info;
ov_comment;
ov_read;

vorbis_info_init;
vorbis_info_clear;
vorbis_info_blocksize;
vorbis_comment_init;
vorbis_comment_add;
vorbis_comment_add_tag;
vorbis_comment_query;
vorbis_comment_query_count;
vorbis_comment_clear;
vorbis_block_init;
vorbis_block_clear;
vorbis_dsp_clear;
vorbis_synthesis_idheader;
vorbis_synthesis_headerin;
vorbis_synthesis_init;
vorbis_synthesis_restart;
vorbis_synthesis;
vorbis_synthesis_trackonly;
vorbis_synthesis_blockin;
vorbis_synthesis_pcmout;
vorbis_synthesis_read;
vorbis_packet_blocksize;

local:
*;
};

0 comments on commit e39fcc6

Please sign in to comment.