Built SDL2_image and _mixer static
This commit is contained in:
19
libsdl2_mixer/external/libvorbis-1.3.5/test/Makefile.am
vendored
Normal file
19
libsdl2_mixer/external/libvorbis-1.3.5/test/Makefile.am
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include @OGG_CFLAGS@
|
||||
|
||||
check_PROGRAMS = test
|
||||
|
||||
check: $(check_PROGRAMS)
|
||||
./test$(EXEEXT)
|
||||
|
||||
test_SOURCES = util.c util.h write_read.c write_read.h test.c
|
||||
test_LDADD = ../lib/libvorbisenc.la ../lib/libvorbis.la @OGG_LIBS@ @VORBIS_LIBS@
|
||||
|
||||
debug:
|
||||
$(MAKE) check CFLAGS="@DEBUG@"
|
||||
|
||||
profile:
|
||||
$(MAKE) check CFLAGS="@PROFILE@"
|
622
libsdl2_mixer/external/libvorbis-1.3.5/test/Makefile.in
vendored
Normal file
622
libsdl2_mixer/external/libvorbis-1.3.5/test/Makefile.in
vendored
Normal file
@ -0,0 +1,622 @@
|
||||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
check_PROGRAMS = test$(EXEEXT)
|
||||
subdir = test
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/add_cflags.m4 \
|
||||
$(top_srcdir)/m4/ogg.m4 $(top_srcdir)/m4/pkg.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am_test_OBJECTS = util.$(OBJEXT) write_read.$(OBJEXT) test.$(OBJEXT)
|
||||
test_OBJECTS = $(am_test_OBJECTS)
|
||||
test_DEPENDENCIES = ../lib/libvorbisenc.la ../lib/libvorbis.la
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = $(test_SOURCES)
|
||||
DIST_SOURCES = $(test_SOURCES)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEBUG = @DEBUG@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
HAVE_DOXYGEN = @HAVE_DOXYGEN@
|
||||
HTLATEX = @HTLATEX@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OGG_CFLAGS = @OGG_CFLAGS@
|
||||
OGG_LIBS = @OGG_LIBS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PDFLATEX = @PDFLATEX@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PROFILE = @PROFILE@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
VE_LIB_AGE = @VE_LIB_AGE@
|
||||
VE_LIB_CURRENT = @VE_LIB_CURRENT@
|
||||
VE_LIB_REVISION = @VE_LIB_REVISION@
|
||||
VF_LIB_AGE = @VF_LIB_AGE@
|
||||
VF_LIB_CURRENT = @VF_LIB_CURRENT@
|
||||
VF_LIB_REVISION = @VF_LIB_REVISION@
|
||||
VORBIS_LIBS = @VORBIS_LIBS@
|
||||
V_LIB_AGE = @V_LIB_AGE@
|
||||
V_LIB_CURRENT = @V_LIB_CURRENT@
|
||||
V_LIB_REVISION = @V_LIB_REVISION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
pthread_lib = @pthread_lib@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
INCLUDES = -I$(top_srcdir)/include @OGG_CFLAGS@
|
||||
test_SOURCES = util.c util.h write_read.c write_read.h test.c
|
||||
test_LDADD = ../lib/libvorbisenc.la ../lib/libvorbis.la @OGG_LIBS@ @VORBIS_LIBS@
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign test/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-checkPROGRAMS:
|
||||
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
|
||||
test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) $(EXTRA_test_DEPENDENCIES)
|
||||
@rm -f test$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_read.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: check-am install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
|
||||
clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \
|
||||
ctags ctags-am distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
check: $(check_PROGRAMS)
|
||||
./test$(EXEEXT)
|
||||
|
||||
debug:
|
||||
$(MAKE) check CFLAGS="@DEBUG@"
|
||||
|
||||
profile:
|
||||
$(MAKE) check CFLAGS="@PROFILE@"
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
100
libsdl2_mixer/external/libvorbis-1.3.5/test/test.c
vendored
Normal file
100
libsdl2_mixer/external/libvorbis-1.3.5/test/test.c
vendored
Normal file
@ -0,0 +1,100 @@
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: vorbis coded test suite using vorbisfile
|
||||
last mod: $Id: test.c 19015 2013-11-12 04:13:28Z giles $
|
||||
|
||||
********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "write_read.h"
|
||||
|
||||
#define DATA_LEN 2048
|
||||
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
|
||||
static int check_output (const float * data_in, unsigned len, float allowable);
|
||||
|
||||
int
|
||||
main(void){
|
||||
static float data_out [DATA_LEN] ;
|
||||
static float data_in [DATA_LEN] ;
|
||||
|
||||
/* Do safest and most used sample rates first. */
|
||||
int sample_rates [] = { 44100, 48000, 32000, 22050, 16000, 96000 } ;
|
||||
unsigned k ;
|
||||
int errors = 0 ;
|
||||
int ch;
|
||||
|
||||
gen_windowed_sine (data_out, ARRAY_LEN (data_out), 0.95);
|
||||
|
||||
for(ch=1;ch<=8;ch++){
|
||||
float q=-.05;
|
||||
printf("\nTesting %d channel%s\n\n",ch,ch==1?"":"s");
|
||||
while(q<1.){
|
||||
for (k = 0 ; k < ARRAY_LEN (sample_rates); k ++) {
|
||||
char filename [64] ;
|
||||
snprintf (filename, sizeof (filename), "vorbis_%dch_q%.1f_%u.ogg", ch,q*10,sample_rates [k]);
|
||||
|
||||
printf (" %-20s : ", filename);
|
||||
fflush (stdout);
|
||||
|
||||
/* Set to know value. */
|
||||
set_data_in (data_in, ARRAY_LEN (data_in), 3.141);
|
||||
|
||||
write_vorbis_data_or_die (filename, sample_rates [k], q, data_out, ARRAY_LEN (data_out),ch);
|
||||
read_vorbis_data_or_die (filename, sample_rates [k], data_in, ARRAY_LEN (data_in));
|
||||
|
||||
if (check_output (data_in, ARRAY_LEN (data_in), (.15f - .1f*q)) != 0)
|
||||
errors ++ ;
|
||||
else {
|
||||
puts ("ok");
|
||||
remove (filename);
|
||||
}
|
||||
}
|
||||
q+=.1;
|
||||
}
|
||||
}
|
||||
|
||||
if (errors)
|
||||
exit (1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
check_output (const float * data_in, unsigned len, float allowable)
|
||||
{
|
||||
float max_abs = 0.0 ;
|
||||
unsigned k ;
|
||||
|
||||
for (k = 0 ; k < len ; k++) {
|
||||
float temp = fabs (data_in [k]);
|
||||
max_abs = MAX (max_abs, temp);
|
||||
}
|
||||
|
||||
if (max_abs < 0.95-allowable) {
|
||||
printf ("Error : max_abs (%f) too small.\n", max_abs);
|
||||
return 1 ;
|
||||
} else if (max_abs > .95+allowable) {
|
||||
printf ("Error : max_abs (%f) too big.\n", max_abs);
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
|
53
libsdl2_mixer/external/libvorbis-1.3.5/test/util.c
vendored
Normal file
53
libsdl2_mixer/external/libvorbis-1.3.5/test/util.c
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: utility functions for vorbis codec test suite.
|
||||
last mod: $Id: util.c 19015 2013-11-12 04:13:28Z giles $
|
||||
|
||||
********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <vorbis/codec.h>
|
||||
#include <vorbis/vorbisenc.h>
|
||||
|
||||
#include "util.h"
|
||||
|
||||
void
|
||||
gen_windowed_sine (float *data, int len, float maximum)
|
||||
{ int k ;
|
||||
|
||||
memset (data, 0, len * sizeof (float)) ;
|
||||
|
||||
len /= 2 ;
|
||||
|
||||
for (k = 0 ; k < len ; k++)
|
||||
{ data [k] = sin (2.0 * k * M_PI * 1.0 / 32.0 + 0.4) ;
|
||||
|
||||
/* Apply Hanning Window. */
|
||||
data [k] *= maximum * (0.5 - 0.5 * cos (2.0 * M_PI * k / ((len) - 1))) ;
|
||||
}
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
void
|
||||
set_data_in (float * data, unsigned len, float value)
|
||||
{ unsigned k ;
|
||||
|
||||
for (k = 0 ; k < len ; k++)
|
||||
data [k] = value ;
|
||||
}
|
24
libsdl2_mixer/external/libvorbis-1.3.5/test/util.h
vendored
Normal file
24
libsdl2_mixer/external/libvorbis-1.3.5/test/util.h
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: utility functions for vorbis codec test suite.
|
||||
last mod: $Id: util.h 19015 2013-11-12 04:13:28Z giles $
|
||||
|
||||
********************************************************************/
|
||||
|
||||
#define ARRAY_LEN(x) (sizeof(x)/sizeof(x[0]))
|
||||
|
||||
/* Create simple test data consisting of a windowed sine wave. */
|
||||
void gen_windowed_sine (float *data, int len, float maximum) ;
|
||||
|
||||
/* Set len values of data array to given value. */
|
||||
void set_data_in (float * data, unsigned len, float value) ;
|
298
libsdl2_mixer/external/libvorbis-1.3.5/test/write_read.c
vendored
Normal file
298
libsdl2_mixer/external/libvorbis-1.3.5/test/write_read.c
vendored
Normal file
@ -0,0 +1,298 @@
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: utility functions for vorbis codec test suite.
|
||||
last mod: $Id: write_read.c 19015 2013-11-12 04:13:28Z giles $
|
||||
|
||||
********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <vorbis/codec.h>
|
||||
#include <vorbis/vorbisenc.h>
|
||||
|
||||
#include "write_read.h"
|
||||
|
||||
/* The following function is basically a hacked version of the code in
|
||||
* examples/encoder_example.c */
|
||||
void
|
||||
write_vorbis_data_or_die (const char *filename, int srate, float q, const float * data, int count, int ch)
|
||||
{
|
||||
FILE * file ;
|
||||
ogg_stream_state os;
|
||||
ogg_page og;
|
||||
ogg_packet op;
|
||||
vorbis_info vi;
|
||||
vorbis_comment vc;
|
||||
vorbis_dsp_state vd;
|
||||
vorbis_block vb;
|
||||
|
||||
int eos = 0, ret;
|
||||
|
||||
if ((file = fopen (filename, "wb")) == NULL) {
|
||||
printf("\n\nError : fopen failed : %s\n", strerror (errno)) ;
|
||||
exit (1) ;
|
||||
}
|
||||
|
||||
/********** Encode setup ************/
|
||||
|
||||
vorbis_info_init (&vi);
|
||||
|
||||
ret = vorbis_encode_init_vbr (&vi,ch,srate,q);
|
||||
if (ret) {
|
||||
printf ("vorbis_encode_init_vbr return %d\n", ret) ;
|
||||
exit (1) ;
|
||||
}
|
||||
|
||||
vorbis_comment_init (&vc);
|
||||
vorbis_comment_add_tag (&vc,"ENCODER","test/util.c");
|
||||
vorbis_analysis_init (&vd,&vi);
|
||||
vorbis_block_init (&vd,&vb);
|
||||
|
||||
ogg_stream_init (&os,12345678);
|
||||
|
||||
{
|
||||
ogg_packet header;
|
||||
ogg_packet header_comm;
|
||||
ogg_packet header_code;
|
||||
|
||||
vorbis_analysis_headerout (&vd,&vc,&header,&header_comm,&header_code);
|
||||
ogg_stream_packetin (&os,&header);
|
||||
ogg_stream_packetin (&os,&header_comm);
|
||||
ogg_stream_packetin (&os,&header_code);
|
||||
|
||||
/* Ensures the audio data will start on a new page. */
|
||||
while (!eos){
|
||||
int result = ogg_stream_flush (&os,&og);
|
||||
if (result == 0)
|
||||
break;
|
||||
fwrite (og.header,1,og.header_len,file);
|
||||
fwrite (og.body,1,og.body_len,file);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
/* expose the buffer to submit data */
|
||||
float **buffer = vorbis_analysis_buffer (&vd,count);
|
||||
int i;
|
||||
|
||||
for(i=0;i<ch;i++)
|
||||
memcpy (buffer [i], data, count * sizeof (float)) ;
|
||||
|
||||
/* tell the library how much we actually submitted */
|
||||
vorbis_analysis_wrote (&vd,count);
|
||||
vorbis_analysis_wrote (&vd,0);
|
||||
}
|
||||
|
||||
while (vorbis_analysis_blockout (&vd,&vb) == 1) {
|
||||
vorbis_analysis (&vb,NULL);
|
||||
vorbis_bitrate_addblock (&vb);
|
||||
|
||||
while (vorbis_bitrate_flushpacket (&vd,&op)) {
|
||||
ogg_stream_packetin (&os,&op);
|
||||
|
||||
while (!eos) {
|
||||
int result = ogg_stream_pageout (&os,&og);
|
||||
if (result == 0)
|
||||
break;
|
||||
fwrite (og.header,1,og.header_len,file);
|
||||
fwrite (og.body,1,og.body_len,file);
|
||||
|
||||
if (ogg_page_eos (&og))
|
||||
eos = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ogg_stream_clear (&os);
|
||||
vorbis_block_clear (&vb);
|
||||
vorbis_dsp_clear (&vd);
|
||||
vorbis_comment_clear (&vc);
|
||||
vorbis_info_clear (&vi);
|
||||
|
||||
fclose (file) ;
|
||||
}
|
||||
|
||||
/* The following function is basically a hacked version of the code in
|
||||
* examples/decoder_example.c */
|
||||
void
|
||||
read_vorbis_data_or_die (const char *filename, int srate, float * data, int count)
|
||||
{
|
||||
ogg_sync_state oy;
|
||||
ogg_stream_state os;
|
||||
ogg_page og;
|
||||
ogg_packet op;
|
||||
|
||||
vorbis_info vi;
|
||||
vorbis_comment vc;
|
||||
vorbis_dsp_state vd;
|
||||
vorbis_block vb;
|
||||
|
||||
FILE *file;
|
||||
char *buffer;
|
||||
int bytes;
|
||||
int eos = 0;
|
||||
int i;
|
||||
int read_total = 0 ;
|
||||
|
||||
if ((file = fopen (filename, "rb")) == NULL) {
|
||||
printf("\n\nError : fopen failed : %s\n", strerror (errno)) ;
|
||||
exit (1) ;
|
||||
}
|
||||
|
||||
ogg_sync_init (&oy);
|
||||
|
||||
{
|
||||
/* fragile! Assumes all of our headers will fit in the first 8kB,
|
||||
which currently they will */
|
||||
buffer = ogg_sync_buffer (&oy,8192);
|
||||
bytes = fread (buffer,1,8192,file);
|
||||
ogg_sync_wrote (&oy,bytes);
|
||||
|
||||
if(ogg_sync_pageout (&oy,&og) != 1) {
|
||||
if(bytes < 8192) {
|
||||
printf ("Out of data.\n") ;
|
||||
goto done_decode ;
|
||||
}
|
||||
|
||||
fprintf (stderr,"Input does not appear to be an Ogg bitstream.\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
ogg_stream_init (&os,ogg_page_serialno(&og));
|
||||
|
||||
vorbis_info_init (&vi);
|
||||
vorbis_comment_init (&vc);
|
||||
if (ogg_stream_pagein (&os,&og) < 0) {
|
||||
fprintf (stderr,"Error reading first page of Ogg bitstream data.\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (ogg_stream_packetout(&os,&op) != 1) {
|
||||
fprintf (stderr,"Error reading initial header packet.\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (vorbis_synthesis_headerin (&vi,&vc,&op) < 0) {
|
||||
fprintf (stderr,"This Ogg bitstream does not contain Vorbis "
|
||||
"audio data.\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
i = 0;
|
||||
while ( i < 2) {
|
||||
while (i < 2) {
|
||||
|
||||
int result = ogg_sync_pageout (&oy,&og);
|
||||
if(result == 0)
|
||||
break;
|
||||
if(result==1) {
|
||||
ogg_stream_pagein(&os,&og);
|
||||
|
||||
while (i < 2) {
|
||||
result = ogg_stream_packetout (&os,&op);
|
||||
if (result == 0) break;
|
||||
if (result < 0) {
|
||||
fprintf (stderr,"Corrupt secondary header. Exiting.\n");
|
||||
exit(1);
|
||||
}
|
||||
vorbis_synthesis_headerin (&vi,&vc,&op);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buffer = ogg_sync_buffer (&oy,4096);
|
||||
bytes = fread (buffer,1,4096,file);
|
||||
if (bytes == 0 && i < 2) {
|
||||
fprintf (stderr,"End of file before finding all Vorbis headers!\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
ogg_sync_wrote (&oy,bytes);
|
||||
}
|
||||
|
||||
if (vi.rate != srate) {
|
||||
printf ("\n\nError : File '%s' has sample rate of %ld when it should be %d.\n\n", filename, vi.rate, srate);
|
||||
exit (1) ;
|
||||
}
|
||||
|
||||
vorbis_synthesis_init (&vd,&vi);
|
||||
vorbis_block_init (&vd,&vb);
|
||||
|
||||
while(!eos) {
|
||||
while (!eos) {
|
||||
int result = ogg_sync_pageout (&oy,&og);
|
||||
if (result == 0)
|
||||
break;
|
||||
if (result < 0) {
|
||||
fprintf (stderr,"Corrupt or missing data in bitstream; "
|
||||
"continuing...\n");
|
||||
} else {
|
||||
ogg_stream_pagein (&os,&og);
|
||||
while (1) {
|
||||
result = ogg_stream_packetout (&os,&op);
|
||||
|
||||
if (result == 0)
|
||||
break;
|
||||
if (result < 0) {
|
||||
/* no reason to complain; already complained above */
|
||||
} else {
|
||||
float **pcm;
|
||||
int samples;
|
||||
|
||||
if (vorbis_synthesis (&vb,&op) == 0)
|
||||
vorbis_synthesis_blockin(&vd,&vb);
|
||||
while ((samples = vorbis_synthesis_pcmout (&vd,&pcm)) > 0 && read_total < count) {
|
||||
int bout = samples < count ? samples : count;
|
||||
bout = read_total + bout > count ? count - read_total : bout;
|
||||
|
||||
memcpy (data + read_total, pcm[0], bout * sizeof (float)) ;
|
||||
|
||||
vorbis_synthesis_read (&vd,bout);
|
||||
read_total += bout ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ogg_page_eos (&og)) eos = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!eos) {
|
||||
buffer = ogg_sync_buffer (&oy,4096);
|
||||
bytes = fread (buffer,1,4096,file);
|
||||
ogg_sync_wrote (&oy,bytes);
|
||||
if (bytes == 0) eos = 1;
|
||||
}
|
||||
}
|
||||
|
||||
ogg_stream_clear (&os);
|
||||
|
||||
vorbis_block_clear (&vb);
|
||||
vorbis_dsp_clear (&vd);
|
||||
vorbis_comment_clear (&vc);
|
||||
vorbis_info_clear (&vi);
|
||||
}
|
||||
done_decode:
|
||||
|
||||
/* OK, clean up the framer */
|
||||
ogg_sync_clear (&oy);
|
||||
|
||||
fclose (file) ;
|
||||
}
|
||||
|
28
libsdl2_mixer/external/libvorbis-1.3.5/test/write_read.h
vendored
Normal file
28
libsdl2_mixer/external/libvorbis-1.3.5/test/write_read.h
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: utility functions for vorbis codec test suite.
|
||||
last mod: $Id: write_read.h 19015 2013-11-12 04:13:28Z giles $
|
||||
|
||||
********************************************************************/
|
||||
|
||||
/* Write supplied data to an Ogg/Vorbis file with specified filename at
|
||||
* specified sample rate. Assumes a single channel of audio. */
|
||||
void write_vorbis_data_or_die (const char *filename, int srate, float q,
|
||||
const float * data, int count, int ch) ;
|
||||
|
||||
/* Read given Ogg/Vorbis file into data specified data array. This
|
||||
* function is basically the inverse of the one above. Again, assumes
|
||||
* a single channel of audio. */
|
||||
void read_vorbis_data_or_die (const char *filename, int srate,
|
||||
float * data, int count) ;
|
||||
|
Reference in New Issue
Block a user