diff options
Diffstat (limited to '3rdparty/libflac/src/plugin_common')
-rw-r--r-- | 3rdparty/libflac/src/plugin_common/Makefile.am | 48 | ||||
-rw-r--r-- | 3rdparty/libflac/src/plugin_common/Makefile.in | 539 | ||||
-rw-r--r-- | 3rdparty/libflac/src/plugin_common/Makefile.lite | 36 | ||||
-rw-r--r-- | 3rdparty/libflac/src/plugin_common/README | 2 | ||||
-rw-r--r-- | 3rdparty/libflac/src/plugin_common/all.h | 26 | ||||
-rw-r--r-- | 3rdparty/libflac/src/plugin_common/charset.c | 157 | ||||
-rw-r--r-- | 3rdparty/libflac/src/plugin_common/charset.h | 39 | ||||
-rw-r--r-- | 3rdparty/libflac/src/plugin_common/defs.h | 24 | ||||
-rw-r--r-- | 3rdparty/libflac/src/plugin_common/dither.c | 262 | ||||
-rw-r--r-- | 3rdparty/libflac/src/plugin_common/dither.h | 29 | ||||
-rw-r--r-- | 3rdparty/libflac/src/plugin_common/plugin_common_static.dsp | 128 | ||||
-rw-r--r-- | 3rdparty/libflac/src/plugin_common/plugin_common_static.vcproj | 209 | ||||
-rw-r--r-- | 3rdparty/libflac/src/plugin_common/replaygain.c | 64 | ||||
-rw-r--r-- | 3rdparty/libflac/src/plugin_common/replaygain.h | 32 | ||||
-rw-r--r-- | 3rdparty/libflac/src/plugin_common/tags.c | 358 | ||||
-rw-r--r-- | 3rdparty/libflac/src/plugin_common/tags.h | 74 |
16 files changed, 0 insertions, 2027 deletions
diff --git a/3rdparty/libflac/src/plugin_common/Makefile.am b/3rdparty/libflac/src/plugin_common/Makefile.am deleted file mode 100644 index e2915a7c672..00000000000 --- a/3rdparty/libflac/src/plugin_common/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -# plugin_common - Routines common to several plugins -# Copyright (C) 2002,2003,2004,2005,2006,2007 Josh Coalson -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -AUTOMAKE_OPTIONS = foreign - -INCLUDES = -I$(top_srcdir)/include - -noinst_LTLIBRARIES = libplugin_common.la - -noinst_HEADERS = \ - all.h \ - charset.h \ - defs.h \ - dither.h \ - replaygain.h \ - tags.h - -libplugin_common_la_SOURCES = \ - charset.c \ - dither.c \ - replaygain.c \ - tags.c - -EXTRA_DIST = \ - Makefile.lite \ - README \ - plugin_common_static.dsp \ - plugin_common_static.vcproj - -debug: - $(MAKE) all CFLAGS="@DEBUG@" - -profile: - $(MAKE) all CFLAGS="@PROFILE@" diff --git a/3rdparty/libflac/src/plugin_common/Makefile.in b/3rdparty/libflac/src/plugin_common/Makefile.in deleted file mode 100644 index 663a3096275..00000000000 --- a/3rdparty/libflac/src/plugin_common/Makefile.in +++ /dev/null @@ -1,539 +0,0 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. -# @configure_input@ - -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# 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@ - -# plugin_common - Routines common to several plugins -# Copyright (C) 2002,2003,2004,2005,2006,2007 Josh Coalson -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. - -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -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 = : -host_triplet = @host@ -ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCAS = @CCAS@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEBUG_FALSE = @DEBUG_FALSE@ -DEBUG_TRUE = @DEBUG_TRUE@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DOCBOOK_TO_MAN = @DOCBOOK_TO_MAN@ -DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -FLAC__TEST_LEVEL = @FLAC__TEST_LEVEL@ -FLAC__TEST_WITH_VALGRIND = @FLAC__TEST_WITH_VALGRIND@ -FLaC__CPU_IA32_FALSE = @FLaC__CPU_IA32_FALSE@ -FLaC__CPU_IA32_TRUE = @FLaC__CPU_IA32_TRUE@ -FLaC__CPU_PPC_FALSE = @FLaC__CPU_PPC_FALSE@ -FLaC__CPU_PPC_TRUE = @FLaC__CPU_PPC_TRUE@ -FLaC__CPU_SPARC_FALSE = @FLaC__CPU_SPARC_FALSE@ -FLaC__CPU_SPARC_TRUE = @FLaC__CPU_SPARC_TRUE@ -FLaC__HAS_AS_FALSE = @FLaC__HAS_AS_FALSE@ -FLaC__HAS_AS_TRUE = @FLaC__HAS_AS_TRUE@ -FLaC__HAS_AS__TEMPORARILY_DISABLED_FALSE = @FLaC__HAS_AS__TEMPORARILY_DISABLED_FALSE@ -FLaC__HAS_AS__TEMPORARILY_DISABLED_TRUE = @FLaC__HAS_AS__TEMPORARILY_DISABLED_TRUE@ -FLaC__HAS_DOCBOOK_TO_MAN_FALSE = @FLaC__HAS_DOCBOOK_TO_MAN_FALSE@ -FLaC__HAS_DOCBOOK_TO_MAN_TRUE = @FLaC__HAS_DOCBOOK_TO_MAN_TRUE@ -FLaC__HAS_DOXYGEN_FALSE = @FLaC__HAS_DOXYGEN_FALSE@ -FLaC__HAS_DOXYGEN_TRUE = @FLaC__HAS_DOXYGEN_TRUE@ -FLaC__HAS_GAS_FALSE = @FLaC__HAS_GAS_FALSE@ -FLaC__HAS_GAS_TRUE = @FLaC__HAS_GAS_TRUE@ -FLaC__HAS_GAS__TEMPORARILY_DISABLED_FALSE = @FLaC__HAS_GAS__TEMPORARILY_DISABLED_FALSE@ -FLaC__HAS_GAS__TEMPORARILY_DISABLED_TRUE = @FLaC__HAS_GAS__TEMPORARILY_DISABLED_TRUE@ -FLaC__HAS_NASM_FALSE = @FLaC__HAS_NASM_FALSE@ -FLaC__HAS_NASM_TRUE = @FLaC__HAS_NASM_TRUE@ -FLaC__HAS_OGG_FALSE = @FLaC__HAS_OGG_FALSE@ -FLaC__HAS_OGG_TRUE = @FLaC__HAS_OGG_TRUE@ -FLaC__HAS_XMMS_FALSE = @FLaC__HAS_XMMS_FALSE@ -FLaC__HAS_XMMS_TRUE = @FLaC__HAS_XMMS_TRUE@ -FLaC__INSTALL_XMMS_PLUGIN_LOCALLY_FALSE = @FLaC__INSTALL_XMMS_PLUGIN_LOCALLY_FALSE@ -FLaC__INSTALL_XMMS_PLUGIN_LOCALLY_TRUE = @FLaC__INSTALL_XMMS_PLUGIN_LOCALLY_TRUE@ -FLaC__NO_ASM_FALSE = @FLaC__NO_ASM_FALSE@ -FLaC__NO_ASM_TRUE = @FLaC__NO_ASM_TRUE@ -FLaC__SSE_OS_FALSE = @FLaC__SSE_OS_FALSE@ -FLaC__SSE_OS_TRUE = @FLaC__SSE_OS_TRUE@ -FLaC__SYS_DARWIN_FALSE = @FLaC__SYS_DARWIN_FALSE@ -FLaC__SYS_DARWIN_TRUE = @FLaC__SYS_DARWIN_TRUE@ -FLaC__SYS_LINUX_FALSE = @FLaC__SYS_LINUX_FALSE@ -FLaC__SYS_LINUX_TRUE = @FLaC__SYS_LINUX_TRUE@ -FLaC__USE_3DNOW_FALSE = @FLaC__USE_3DNOW_FALSE@ -FLaC__USE_3DNOW_TRUE = @FLaC__USE_3DNOW_TRUE@ -FLaC__USE_ALTIVEC_FALSE = @FLaC__USE_ALTIVEC_FALSE@ -FLaC__USE_ALTIVEC_TRUE = @FLaC__USE_ALTIVEC_TRUE@ -FLaC__WITH_CPPLIBS_FALSE = @FLaC__WITH_CPPLIBS_FALSE@ -FLaC__WITH_CPPLIBS_TRUE = @FLaC__WITH_CPPLIBS_TRUE@ -GAS = @GAS@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBICONV = @LIBICONV@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBICONV = @LTLIBICONV@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -MINGW_WINSOCK_LIBS = @MINGW_WINSOCK_LIBS@ -NASM = @NASM@ -OBJEXT = @OBJEXT@ -OBJ_FORMAT = @OBJ_FORMAT@ -OGG_CFLAGS = @OGG_CFLAGS@ -OGG_LIBS = @OGG_LIBS@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -XMMS_CFLAGS = @XMMS_CFLAGS@ -XMMS_CONFIG = @XMMS_CONFIG@ -XMMS_DATA_DIR = @XMMS_DATA_DIR@ -XMMS_EFFECT_PLUGIN_DIR = @XMMS_EFFECT_PLUGIN_DIR@ -XMMS_GENERAL_PLUGIN_DIR = @XMMS_GENERAL_PLUGIN_DIR@ -XMMS_INPUT_PLUGIN_DIR = @XMMS_INPUT_PLUGIN_DIR@ -XMMS_LIBS = @XMMS_LIBS@ -XMMS_OUTPUT_PLUGIN_DIR = @XMMS_OUTPUT_PLUGIN_DIR@ -XMMS_PLUGIN_DIR = @XMMS_PLUGIN_DIR@ -XMMS_VERSION = @XMMS_VERSION@ -XMMS_VISUALIZATION_PLUGIN_DIR = @XMMS_VISUALIZATION_PLUGIN_DIR@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ - -AUTOMAKE_OPTIONS = foreign - -INCLUDES = -I$(top_srcdir)/include - -noinst_LTLIBRARIES = libplugin_common.la - -noinst_HEADERS = \ - all.h \ - charset.h \ - defs.h \ - dither.h \ - replaygain.h \ - tags.h - - -libplugin_common_la_SOURCES = \ - charset.c \ - dither.c \ - replaygain.c \ - tags.c - - -EXTRA_DIST = \ - Makefile.lite \ - README \ - plugin_common_static.dsp \ - plugin_common_static.vcproj - -subdir = src/plugin_common -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) - -libplugin_common_la_LDFLAGS = -libplugin_common_la_LIBADD = -am_libplugin_common_la_OBJECTS = charset.lo dither.lo replaygain.lo \ - tags.lo -libplugin_common_la_OBJECTS = $(am_libplugin_common_la_OBJECTS) - -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/charset.Plo ./$(DEPDIR)/dither.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/replaygain.Plo ./$(DEPDIR)/tags.Plo -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ - $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -DIST_SOURCES = $(libplugin_common_la_SOURCES) -HEADERS = $(noinst_HEADERS) - -DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.in \ - Makefile.am -SOURCES = $(libplugin_common_la_SOURCES) - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/plugin_common/Makefile -Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" = "$$p" && dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libplugin_common.la: $(libplugin_common_la_OBJECTS) $(libplugin_common_la_DEPENDENCIES) - $(LINK) $(libplugin_common_la_LDFLAGS) $(libplugin_common_la_OBJECTS) $(libplugin_common_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) core *.core - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/charset.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/replaygain.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tags.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< - -.c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` - -.c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: - -ETAGS = etags -ETAGSFLAGS = - -CTAGS = ctags -CTAGSFLAGS = - -tags: TAGS - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique - -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = ../.. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$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 -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) - -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: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f $(CONFIG_CLEAN_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-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -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: uninstall-info-am - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am info info-am install \ - install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - 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 uninstall uninstall-am uninstall-info-am - - -debug: - $(MAKE) all CFLAGS="@DEBUG@" - -profile: - $(MAKE) all 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: diff --git a/3rdparty/libflac/src/plugin_common/Makefile.lite b/3rdparty/libflac/src/plugin_common/Makefile.lite deleted file mode 100644 index 987bae8d05d..00000000000 --- a/3rdparty/libflac/src/plugin_common/Makefile.lite +++ /dev/null @@ -1,36 +0,0 @@ -# plugin_common - Routines common to several plugins -# Copyright (C) 2002,2003,2004,2005,2006,2007 Josh Coalson -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -# -# GNU makefile -# - -topdir = ../.. - -LIB_NAME = libplugin_common -INCLUDES = -I$(topdir)/include -I$(HOME)/local/include -DEFINES = - -SRCS_C = \ - charset.c \ - dither.c \ - replaygain.c \ - tags.c - -include $(topdir)/build/lib.mk - -# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/3rdparty/libflac/src/plugin_common/README b/3rdparty/libflac/src/plugin_common/README deleted file mode 100644 index 5a3352614d3..00000000000 --- a/3rdparty/libflac/src/plugin_common/README +++ /dev/null @@ -1,2 +0,0 @@ -This directory contains a convenience library of routines that are -common to the plugins. diff --git a/3rdparty/libflac/src/plugin_common/all.h b/3rdparty/libflac/src/plugin_common/all.h deleted file mode 100644 index e987dd088f5..00000000000 --- a/3rdparty/libflac/src/plugin_common/all.h +++ /dev/null @@ -1,26 +0,0 @@ -/* plugin_common - Routines common to several plugins - * Copyright (C) 2002,2003,2004,2005,2006,2007 Josh Coalson - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef FLAC__PLUGIN_COMMON__ALL_H -#define FLAC__PLUGIN_COMMON__ALL_H - -#include "charset.h" -#include "dither.h" -#include "tags.h" - -#endif diff --git a/3rdparty/libflac/src/plugin_common/charset.c b/3rdparty/libflac/src/plugin_common/charset.c deleted file mode 100644 index cc826690876..00000000000 --- a/3rdparty/libflac/src/plugin_common/charset.c +++ /dev/null @@ -1,157 +0,0 @@ -/* plugin_common - Routines common to several plugins - * Copyright (C) 2002,2003,2004,2005,2006,2007 Josh Coalson - * - * Only slightly modified charset.c from: - * EasyTAG - Tag editor for MP3 and OGG files - * Copyright (C) 1999-2001 Håvard Kvålen <havardk@xmms.org> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#if HAVE_CONFIG_H -# include <config.h> -#endif - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> - -#ifdef HAVE_ICONV -#include <iconv.h> -#endif - -#ifdef HAVE_LANGINFO_CODESET -#include <langinfo.h> -#endif - -#include "charset.h" - - -/************* - * Functions * - *************/ - -char* FLAC_plugin__charset_get_current (void) -{ - char *charset = getenv("CHARSET"); - -#ifdef HAVE_LANGINFO_CODESET - if (!charset) - charset = nl_langinfo(CODESET); -#endif - if (!charset) - charset = "ISO-8859-1"; - - return charset; -} - - -#ifdef HAVE_ICONV -char* FLAC_plugin__charset_convert_string (const char *string, char *from, char *to) -{ - size_t outleft, outsize, length; - iconv_t cd; - char *out, *outptr; - const char *input = string; - - if (!string) - return NULL; - - length = strlen(string); - - if ((cd = iconv_open(to, from)) == (iconv_t)-1) - { -#ifdef DEBUG - fprintf(stderr, "convert_string(): Conversion not supported. Charsets: %s -> %s", from, to); -#endif - return strdup(string); - } - - /* Due to a GLIBC bug, round outbuf_size up to a multiple of 4 */ - /* + 1 for nul in case len == 1 */ - outsize = ((length + 3) & ~3) + 1; - if(outsize < length) /* overflow check */ - return NULL; - out = (char*)malloc(outsize); - outleft = outsize - 1; - outptr = out; - -retry: - if (iconv(cd, (char**)&input, &length, &outptr, &outleft) == (size_t)(-1)) - { - int used; - switch (errno) - { - case E2BIG: - used = outptr - out; - if((outsize - 1) * 2 + 1 <= outsize) { /* overflow check */ - free(out); - return NULL; - } - outsize = (outsize - 1) * 2 + 1; - out = realloc(out, outsize); - outptr = out + used; - outleft = outsize - 1 - used; - goto retry; - case EINVAL: - break; - case EILSEQ: - /* Invalid sequence, try to get the rest of the string */ - input++; - length = strlen(input); - goto retry; - default: -#ifdef DEBUG - fprintf(stderr, "convert_string(): Conversion failed. Inputstring: %s; Error: %s", string, strerror(errno)); -#endif - break; - } - } - *outptr = '\0'; - - iconv_close(cd); - return out; -} -#else -char* FLAC_plugin__charset_convert_string (const char *string, char *from, char *to) -{ - (void)from, (void)to; - if (!string) - return NULL; - return strdup(string); -} -#endif - -#ifdef HAVE_ICONV -int FLAC_plugin__charset_test_conversion (char *from, char *to) -{ - iconv_t cd; - - if ((cd=iconv_open(to,from)) == (iconv_t)-1) - { - /* Conversion not supported */ - return 0; - } - iconv_close(cd); - return 1; -} -#else -int FLAC_plugin__charset_test_conversion (char *from, char *to) -{ - (void)from, (void)to; - return 1; -} -#endif diff --git a/3rdparty/libflac/src/plugin_common/charset.h b/3rdparty/libflac/src/plugin_common/charset.h deleted file mode 100644 index 7ea283818fc..00000000000 --- a/3rdparty/libflac/src/plugin_common/charset.h +++ /dev/null @@ -1,39 +0,0 @@ -/* plugin_common - Routines common to several plugins - * Copyright (C) 2002,2003,2004,2005,2006,2007 Josh Coalson - * - * Only slightly modified charset.h from: - * charset.h - 2001/12/04 - * EasyTAG - Tag editor for MP3 and OGG files - * Copyright (C) 1999-2001 H蛆ard Kvè™±en <havardk@xmms.org> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - - -#ifndef FLAC__PLUGIN_COMMON__CHARSET_H -#define FLAC__PLUGIN_COMMON__CHARSET_H - - -/************** - * Prototypes * - **************/ - -char *FLAC_plugin__charset_get_current(void); -char *FLAC_plugin__charset_convert_string(const char *string, char *from, char *to); - -/* returns 1 for success, 0 for failure or no iconv */ -int FLAC_plugin__charset_test_conversion(char *from, char *to); - -#endif diff --git a/3rdparty/libflac/src/plugin_common/defs.h b/3rdparty/libflac/src/plugin_common/defs.h deleted file mode 100644 index 0cc9b4b06b5..00000000000 --- a/3rdparty/libflac/src/plugin_common/defs.h +++ /dev/null @@ -1,24 +0,0 @@ -/* plugin_common - Routines common to several plugins - * Copyright (C) 2002,2003,2004,2005,2006,2007 Josh Coalson - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef FLAC__PLUGIN_COMMON__DEFS_H -#define FLAC__PLUGIN_COMMON__DEFS_H - -#define FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS 2 - -#endif diff --git a/3rdparty/libflac/src/plugin_common/dither.c b/3rdparty/libflac/src/plugin_common/dither.c deleted file mode 100644 index 538a28029e0..00000000000 --- a/3rdparty/libflac/src/plugin_common/dither.c +++ /dev/null @@ -1,262 +0,0 @@ -/* plugin_common - Routines common to several plugins - * Copyright (C) 2002,2003,2004,2005,2006,2007 Josh Coalson - * - * dithering routine derived from (other GPLed source): - * mad - MPEG audio decoder - * Copyright (C) 2000-2001 Robert Leslie - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#if HAVE_CONFIG_H -# include <config.h> -#endif - -#include "dither.h" -#include "FLAC/assert.h" - -#ifdef max -#undef max -#endif -#define max(a,b) ((a)>(b)?(a):(b)) - -#ifndef FLaC__INLINE -#define FLaC__INLINE -#endif - - -/* 32-bit pseudo-random number generator - * - * @@@ According to Miroslav, this one is poor quality, the one from the - * @@@ original replaygain code is much better - */ -static FLaC__INLINE FLAC__uint32 prng(FLAC__uint32 state) -{ - return (state * 0x0019660dL + 0x3c6ef35fL) & 0xffffffffL; -} - -/* dither routine derived from MAD winamp plugin */ - -typedef struct { - FLAC__int32 error[3]; - FLAC__int32 random; -} dither_state; - -static FLaC__INLINE FLAC__int32 linear_dither(unsigned source_bps, unsigned target_bps, FLAC__int32 sample, dither_state *dither, const FLAC__int32 MIN, const FLAC__int32 MAX) -{ - unsigned scalebits; - FLAC__int32 output, mask, random; - - FLAC__ASSERT(source_bps < 32); - FLAC__ASSERT(target_bps <= 24); - FLAC__ASSERT(target_bps <= source_bps); - - /* noise shape */ - sample += dither->error[0] - dither->error[1] + dither->error[2]; - - dither->error[2] = dither->error[1]; - dither->error[1] = dither->error[0] / 2; - - /* bias */ - output = sample + (1L << (source_bps - target_bps - 1)); - - scalebits = source_bps - target_bps; - mask = (1L << scalebits) - 1; - - /* dither */ - random = (FLAC__int32)prng(dither->random); - output += (random & mask) - (dither->random & mask); - - dither->random = random; - - /* clip */ - if(output > MAX) { - output = MAX; - - if(sample > MAX) - sample = MAX; - } - else if(output < MIN) { - output = MIN; - - if(sample < MIN) - sample = MIN; - } - - /* quantize */ - output &= ~mask; - - /* error feedback */ - dither->error[0] = sample - output; - - /* scale */ - return output >> scalebits; -} - -size_t FLAC__plugin_common__pack_pcm_signed_big_endian(FLAC__byte *data, const FLAC__int32 * const input[], unsigned wide_samples, unsigned channels, unsigned source_bps, unsigned target_bps) -{ - static dither_state dither[FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS]; - FLAC__byte * const start = data; - FLAC__int32 sample; - const FLAC__int32 *input_; - unsigned samples, channel; - const unsigned bytes_per_sample = target_bps / 8; - const unsigned incr = bytes_per_sample * channels; - - FLAC__ASSERT(channels > 0 && channels <= FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS); - FLAC__ASSERT(source_bps < 32); - FLAC__ASSERT(target_bps <= 24); - FLAC__ASSERT(target_bps <= source_bps); - FLAC__ASSERT((source_bps & 7) == 0); - FLAC__ASSERT((target_bps & 7) == 0); - - if(source_bps != target_bps) { - const FLAC__int32 MIN = -(1L << (source_bps - 1)); - const FLAC__int32 MAX = ~MIN; /*(1L << (source_bps-1)) - 1 */ - - for(channel = 0; channel < channels; channel++) { - - samples = wide_samples; - data = start + bytes_per_sample * channel; - input_ = input[channel]; - - while(samples--) { - sample = linear_dither(source_bps, target_bps, *input_++, &dither[channel], MIN, MAX); - - switch(target_bps) { - case 8: - data[0] = sample ^ 0x80; - break; - case 16: - data[0] = (FLAC__byte)(sample >> 8); - data[1] = (FLAC__byte)sample; - break; - case 24: - data[0] = (FLAC__byte)(sample >> 16); - data[1] = (FLAC__byte)(sample >> 8); - data[2] = (FLAC__byte)sample; - break; - } - - data += incr; - } - } - } - else { - for(channel = 0; channel < channels; channel++) { - samples = wide_samples; - data = start + bytes_per_sample * channel; - input_ = input[channel]; - - while(samples--) { - sample = *input_++; - - switch(target_bps) { - case 8: - data[0] = sample ^ 0x80; - break; - case 16: - data[0] = (FLAC__byte)(sample >> 8); - data[1] = (FLAC__byte)sample; - break; - case 24: - data[0] = (FLAC__byte)(sample >> 16); - data[1] = (FLAC__byte)(sample >> 8); - data[2] = (FLAC__byte)sample; - break; - } - - data += incr; - } - } - } - - return wide_samples * channels * (target_bps/8); -} - -size_t FLAC__plugin_common__pack_pcm_signed_little_endian(FLAC__byte *data, const FLAC__int32 * const input[], unsigned wide_samples, unsigned channels, unsigned source_bps, unsigned target_bps) -{ - static dither_state dither[FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS]; - FLAC__byte * const start = data; - FLAC__int32 sample; - const FLAC__int32 *input_; - unsigned samples, channel; - const unsigned bytes_per_sample = target_bps / 8; - const unsigned incr = bytes_per_sample * channels; - - FLAC__ASSERT(channels > 0 && channels <= FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS); - FLAC__ASSERT(source_bps < 32); - FLAC__ASSERT(target_bps <= 24); - FLAC__ASSERT(target_bps <= source_bps); - FLAC__ASSERT((source_bps & 7) == 0); - FLAC__ASSERT((target_bps & 7) == 0); - - if(source_bps != target_bps) { - const FLAC__int32 MIN = -(1L << (source_bps - 1)); - const FLAC__int32 MAX = ~MIN; /*(1L << (source_bps-1)) - 1 */ - - for(channel = 0; channel < channels; channel++) { - - samples = wide_samples; - data = start + bytes_per_sample * channel; - input_ = input[channel]; - - while(samples--) { - sample = linear_dither(source_bps, target_bps, *input_++, &dither[channel], MIN, MAX); - - switch(target_bps) { - case 8: - data[0] = sample ^ 0x80; - break; - case 24: - data[2] = (FLAC__byte)(sample >> 16); - /* fall through */ - case 16: - data[1] = (FLAC__byte)(sample >> 8); - data[0] = (FLAC__byte)sample; - } - - data += incr; - } - } - } - else { - for(channel = 0; channel < channels; channel++) { - samples = wide_samples; - data = start + bytes_per_sample * channel; - input_ = input[channel]; - - while(samples--) { - sample = *input_++; - - switch(target_bps) { - case 8: - data[0] = sample ^ 0x80; - break; - case 24: - data[2] = (FLAC__byte)(sample >> 16); - /* fall through */ - case 16: - data[1] = (FLAC__byte)(sample >> 8); - data[0] = (FLAC__byte)sample; - } - - data += incr; - } - } - } - - return wide_samples * channels * (target_bps/8); -} diff --git a/3rdparty/libflac/src/plugin_common/dither.h b/3rdparty/libflac/src/plugin_common/dither.h deleted file mode 100644 index ad94bae194a..00000000000 --- a/3rdparty/libflac/src/plugin_common/dither.h +++ /dev/null @@ -1,29 +0,0 @@ -/* plugin_common - Routines common to several plugins - * Copyright (C) 2002,2003,2004,2005,2006,2007 Josh Coalson - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef FLAC__PLUGIN_COMMON__DITHER_H -#define FLAC__PLUGIN_COMMON__DITHER_H - -#include <stdlib.h> /* for size_t */ -#include "defs.h" /* buy FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS for the caller */ -#include "FLAC/ordinals.h" - -size_t FLAC__plugin_common__pack_pcm_signed_big_endian(FLAC__byte *data, const FLAC__int32 * const input[], unsigned wide_samples, unsigned channels, unsigned source_bps, unsigned target_bps); -size_t FLAC__plugin_common__pack_pcm_signed_little_endian(FLAC__byte *data, const FLAC__int32 * const input[], unsigned wide_samples, unsigned channels, unsigned source_bps, unsigned target_bps); - -#endif diff --git a/3rdparty/libflac/src/plugin_common/plugin_common_static.dsp b/3rdparty/libflac/src/plugin_common/plugin_common_static.dsp deleted file mode 100644 index ae9b2bce61e..00000000000 --- a/3rdparty/libflac/src/plugin_common/plugin_common_static.dsp +++ /dev/null @@ -1,128 +0,0 @@ -# Microsoft Developer Studio Project File - Name="plugin_common_static" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=plugin_common_static - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "plugin_common_static.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "plugin_common_static.mak" CFG="plugin_common_static - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "plugin_common_static - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "plugin_common_static - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "plugin_common" -# PROP Scc_LocalPath "..\.." -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "plugin_common_static - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\obj\release\lib" -# PROP Intermediate_Dir "Release_static" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MD /W3 /WX /GX /Ox /Og /Oi /Os /Op /I ".\include" /I "..\..\include" /D "FLAC__NO_DLL" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /nodefaultlib - -!ELSEIF "$(CFG)" == "plugin_common_static - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\obj\debug\lib" -# PROP Intermediate_Dir "Debug_static" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".\include" /I "..\..\include" /D "FLAC__NO_DLL" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /nodefaultlib - -!ENDIF - -# Begin Target - -# Name "plugin_common_static - Win32 Release" -# Name "plugin_common_static - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp" -# Begin Source File - -SOURCE=.\charset.c -# End Source File -# Begin Source File - -SOURCE=.\dither.c -# End Source File -# Begin Source File - -SOURCE=.\replaygain.c -# End Source File -# Begin Source File - -SOURCE=.\tags.c -# End Source File -# End Group -# Begin Group "Public Header Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\all.h -# End Source File -# Begin Source File - -SOURCE=.\charset.h -# End Source File -# Begin Source File - -SOURCE=.\dither.h -# End Source File -# Begin Source File - -SOURCE=.\replaygain.h -# End Source File -# Begin Source File - -SOURCE=.\tags.h -# End Source File -# End Group -# End Target -# End Project diff --git a/3rdparty/libflac/src/plugin_common/plugin_common_static.vcproj b/3rdparty/libflac/src/plugin_common/plugin_common_static.vcproj deleted file mode 100644 index ee64d2593aa..00000000000 --- a/3rdparty/libflac/src/plugin_common/plugin_common_static.vcproj +++ /dev/null @@ -1,209 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="8.00" - Name="plugin_common_static" - ProjectGUID="{4cefbc88-c215-11db-8314-0800200c9a66}" - RootNamespace="plugin_common_static" - Keyword="Win32Proj" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="..\..\obj\debug\lib" - IntermediateDirectory="Debug_static" - ConfigurationType="4" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories=".\include;..\..\include" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLAC__NO_DLL;DEBUG" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="4" - CompileAs="0" - DisableSpecificWarnings="4267;4996" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\obj\debug\lib\$(ProjectName).lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="..\..\obj\release\lib" - IntermediateDirectory="Release_static" - ConfigurationType="4" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - EnableIntrinsicFunctions="true" - FavorSizeOrSpeed="1" - OmitFramePointers="true" - WholeProgramOptimization="true" - AdditionalIncludeDirectories=".\include;..\..\include" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB;FLAC__NO_DLL" - RuntimeLibrary="0" - BufferSecurityCheck="false" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - CompileAs="0" - DisableSpecificWarnings="4267;4996" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\..\obj\release\lib\$(ProjectName).lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath=".\all.h" - > - </File> - <File - RelativePath=".\charset.h" - > - </File> - <File - RelativePath=".\defs.h" - > - </File> - <File - RelativePath=".\dither.h" - > - </File> - <File - RelativePath=".\replaygain.h" - > - </File> - <File - RelativePath=".\tags.h" - > - </File> - </Filter> - <Filter - Name="Source Files" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\charset.c" - > - </File> - <File - RelativePath=".\dither.c" - > - </File> - <File - RelativePath=".\replaygain.c" - > - </File> - <File - RelativePath=".\tags.c" - > - </File> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/3rdparty/libflac/src/plugin_common/replaygain.c b/3rdparty/libflac/src/plugin_common/replaygain.c deleted file mode 100644 index 5ad59c8305c..00000000000 --- a/3rdparty/libflac/src/plugin_common/replaygain.c +++ /dev/null @@ -1,64 +0,0 @@ -/* plugin_common - Routines common to several plugins - * Copyright (C) 2002,2003,2004,2005,2006,2007 Josh Coalson - * Copyright (C) 2003 Philip Jägenstedt - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#if HAVE_CONFIG_H -# include <config.h> -#endif - -#include "replaygain.h" -#include "FLAC/ordinals.h" -#include "FLAC/metadata.h" -#include "share/grabbag.h" - -FLAC__bool FLAC_plugin__replaygain_get_from_file(const char *filename, - double *reference, FLAC__bool *reference_set, - double *track_gain, FLAC__bool *track_gain_set, - double *album_gain, FLAC__bool *album_gain_set, - double *track_peak, FLAC__bool *track_peak_set, - double *album_peak, FLAC__bool *album_peak_set) -{ - FLAC__Metadata_SimpleIterator *iterator = FLAC__metadata_simple_iterator_new(); - FLAC__bool ret = false; - - *track_gain_set = *album_gain_set = *track_peak_set = *album_peak_set = false; - - if(0 != iterator) { - if(FLAC__metadata_simple_iterator_init(iterator, filename, /*read_only=*/true, /*preserve_file_stats=*/true)) { - FLAC__bool got_vorbis_comments = false; - ret = true; - do { - if(FLAC__metadata_simple_iterator_get_block_type(iterator) == FLAC__METADATA_TYPE_VORBIS_COMMENT) { - FLAC__StreamMetadata *block = FLAC__metadata_simple_iterator_get_block(iterator); - if(0 != block) { - if(grabbag__replaygain_load_from_vorbiscomment(block, /*album_mode=*/false, /*strict=*/true, reference, track_gain, track_peak)) { - *reference_set = *track_gain_set = *track_peak_set = true; - } - if(grabbag__replaygain_load_from_vorbiscomment(block, /*album_mode=*/true, /*strict=*/true, reference, album_gain, album_peak)) { - *reference_set = *album_gain_set = *album_peak_set = true; - } - FLAC__metadata_object_delete(block); - got_vorbis_comments = true; - } - } - } while (!got_vorbis_comments && FLAC__metadata_simple_iterator_next(iterator)); - } - FLAC__metadata_simple_iterator_delete(iterator); - } - return ret; -} diff --git a/3rdparty/libflac/src/plugin_common/replaygain.h b/3rdparty/libflac/src/plugin_common/replaygain.h deleted file mode 100644 index 528312ecc9c..00000000000 --- a/3rdparty/libflac/src/plugin_common/replaygain.h +++ /dev/null @@ -1,32 +0,0 @@ -/* plugin_common - Routines common to several plugins - * Copyright (C) 2002,2003,2004,2005,2006,2007 Josh Coalson - * Copyright (C) 2003 Philip Jägenstedt - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef FLAC__PLUGIN_COMMON__REPLAYGAIN_H -#define FLAC__PLUGIN_COMMON__REPLAYGAIN_H - -#include "FLAC/ordinals.h" - -FLAC__bool FLAC_plugin__replaygain_get_from_file(const char *filename, - double *reference, FLAC__bool *reference_set, - double *track_gain, FLAC__bool *track_gain_set, - double *album_gain, FLAC__bool *album_gain_set, - double *track_peak, FLAC__bool *track_peak_set, - double *album_peak, FLAC__bool *album_peak_set); - -#endif diff --git a/3rdparty/libflac/src/plugin_common/tags.c b/3rdparty/libflac/src/plugin_common/tags.c deleted file mode 100644 index befc8484fd2..00000000000 --- a/3rdparty/libflac/src/plugin_common/tags.c +++ /dev/null @@ -1,358 +0,0 @@ -/* plugin_common - Routines common to several plugins - * Copyright (C) 2002,2003,2004,2005,2006,2007 Josh Coalson - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#if HAVE_CONFIG_H -# include <config.h> -#endif - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> - -#include "tags.h" -#include "FLAC/assert.h" -#include "FLAC/metadata.h" -#include "share/alloc.h" - -#ifndef FLaC__INLINE -#define FLaC__INLINE -#endif - - -static FLaC__INLINE size_t local__wide_strlen(const FLAC__uint16 *s) -{ - size_t n = 0; - while(*s++) - n++; - return n; -} - -/* - * also disallows non-shortest-form encodings, c.f. - * http://www.unicode.org/versions/corrigendum1.html - * and a more clear explanation at the end of this section: - * http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - */ -static FLaC__INLINE size_t local__utf8len(const FLAC__byte *utf8) -{ - FLAC__ASSERT(0 != utf8); - if ((utf8[0] & 0x80) == 0) { - return 1; - } - else if ((utf8[0] & 0xE0) == 0xC0 && (utf8[1] & 0xC0) == 0x80) { - if ((utf8[0] & 0xFE) == 0xC0) /* overlong sequence check */ - return 0; - return 2; - } - else if ((utf8[0] & 0xF0) == 0xE0 && (utf8[1] & 0xC0) == 0x80 && (utf8[2] & 0xC0) == 0x80) { - if (utf8[0] == 0xE0 && (utf8[1] & 0xE0) == 0x80) /* overlong sequence check */ - return 0; - /* illegal surrogates check (U+D800...U+DFFF and U+FFFE...U+FFFF) */ - if (utf8[0] == 0xED && (utf8[1] & 0xE0) == 0xA0) /* D800-DFFF */ - return 0; - if (utf8[0] == 0xEF && utf8[1] == 0xBF && (utf8[2] & 0xFE) == 0xBE) /* FFFE-FFFF */ - return 0; - return 3; - } - else if ((utf8[0] & 0xF8) == 0xF0 && (utf8[1] & 0xC0) == 0x80 && (utf8[2] & 0xC0) == 0x80 && (utf8[3] & 0xC0) == 0x80) { - if (utf8[0] == 0xF0 && (utf8[1] & 0xF0) == 0x80) /* overlong sequence check */ - return 0; - return 4; - } - else if ((utf8[0] & 0xFC) == 0xF8 && (utf8[1] & 0xC0) == 0x80 && (utf8[2] & 0xC0) == 0x80 && (utf8[3] & 0xC0) == 0x80 && (utf8[4] & 0xC0) == 0x80) { - if (utf8[0] == 0xF8 && (utf8[1] & 0xF8) == 0x80) /* overlong sequence check */ - return 0; - return 5; - } - else if ((utf8[0] & 0xFE) == 0xFC && (utf8[1] & 0xC0) == 0x80 && (utf8[2] & 0xC0) == 0x80 && (utf8[3] & 0xC0) == 0x80 && (utf8[4] & 0xC0) == 0x80 && (utf8[5] & 0xC0) == 0x80) { - if (utf8[0] == 0xFC && (utf8[1] & 0xFC) == 0x80) /* overlong sequence check */ - return 0; - return 6; - } - else { - return 0; - } -} - - -static FLaC__INLINE size_t local__utf8_to_ucs2(const FLAC__byte *utf8, FLAC__uint16 *ucs2) -{ - const size_t len = local__utf8len(utf8); - - FLAC__ASSERT(0 != ucs2); - - if (len == 1) - *ucs2 = *utf8; - else if (len == 2) - *ucs2 = (*utf8 & 0x3F)<<6 | (*(utf8+1) & 0x3F); - else if (len == 3) - *ucs2 = (*utf8 & 0x1F)<<12 | (*(utf8+1) & 0x3F)<<6 | (*(utf8+2) & 0x3F); - else - *ucs2 = '?'; - - return len; -} - -static FLAC__uint16 *local__convert_utf8_to_ucs2(const char *src, unsigned length) -{ - FLAC__uint16 *out; - size_t chars = 0; - - FLAC__ASSERT(0 != src); - - /* calculate length */ - { - const unsigned char *s, *end; - for (s=(const unsigned char *)src, end=s+length; s<end; chars++) { - const unsigned n = local__utf8len(s); - if (n == 0) - return 0; - s += n; - } - FLAC__ASSERT(s == end); - } - - /* allocate */ - out = (FLAC__uint16*)safe_malloc_mul_2op_(chars, /*times*/sizeof(FLAC__uint16)); - if (0 == out) { - FLAC__ASSERT(0); - return 0; - } - - /* convert */ - { - const unsigned char *s = (const unsigned char *)src; - FLAC__uint16 *u = out; - for ( ; chars; chars--) - s += local__utf8_to_ucs2(s, u++); - } - - return out; -} - -static FLaC__INLINE size_t local__ucs2len(FLAC__uint16 ucs2) -{ - if (ucs2 < 0x0080) - return 1; - else if (ucs2 < 0x0800) - return 2; - else - return 3; -} - -static FLaC__INLINE size_t local__ucs2_to_utf8(FLAC__uint16 ucs2, FLAC__byte *utf8) -{ - if (ucs2 < 0x080) { - utf8[0] = (FLAC__byte)ucs2; - return 1; - } - else if (ucs2 < 0x800) { - utf8[0] = 0xc0 | (ucs2 >> 6); - utf8[1] = 0x80 | (ucs2 & 0x3f); - return 2; - } - else { - utf8[0] = 0xe0 | (ucs2 >> 12); - utf8[1] = 0x80 | ((ucs2 >> 6) & 0x3f); - utf8[2] = 0x80 | (ucs2 & 0x3f); - return 3; - } -} - -static char *local__convert_ucs2_to_utf8(const FLAC__uint16 *src, unsigned length) -{ - char *out; - size_t len = 0, n; - - FLAC__ASSERT(0 != src); - - /* calculate length */ - { - unsigned i; - for (i = 0; i < length; i++) { - n = local__ucs2len(src[i]); - if(len + n < len) /* overflow check */ - return 0; - len += n; - } - } - - /* allocate */ - out = (char*)safe_malloc_mul_2op_(len, /*times*/sizeof(char)); - if (0 == out) - return 0; - - /* convert */ - { - unsigned char *u = (unsigned char *)out; - for ( ; *src; src++) - u += local__ucs2_to_utf8(*src, u); - local__ucs2_to_utf8(*src, u); - } - - return out; -} - - -FLAC__bool FLAC_plugin__tags_get(const char *filename, FLAC__StreamMetadata **tags) -{ - if(!FLAC__metadata_get_tags(filename, tags)) - if(0 == (*tags = FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT))) - return false; - return true; -} - -FLAC__bool FLAC_plugin__tags_set(const char *filename, const FLAC__StreamMetadata *tags) -{ - FLAC__Metadata_Chain *chain; - FLAC__Metadata_Iterator *iterator; - FLAC__StreamMetadata *block; - FLAC__bool got_vorbis_comments = false; - FLAC__bool ok; - - if(0 == (chain = FLAC__metadata_chain_new())) - return false; - - if(!FLAC__metadata_chain_read(chain, filename)) { - FLAC__metadata_chain_delete(chain); - return false; - } - - if(0 == (iterator = FLAC__metadata_iterator_new())) { - FLAC__metadata_chain_delete(chain); - return false; - } - - FLAC__metadata_iterator_init(iterator, chain); - - do { - if(FLAC__metadata_iterator_get_block_type(iterator) == FLAC__METADATA_TYPE_VORBIS_COMMENT) - got_vorbis_comments = true; - } while(!got_vorbis_comments && FLAC__metadata_iterator_next(iterator)); - - if(0 == (block = FLAC__metadata_object_clone(tags))) { - FLAC__metadata_chain_delete(chain); - FLAC__metadata_iterator_delete(iterator); - return false; - } - - if(got_vorbis_comments) - ok = FLAC__metadata_iterator_set_block(iterator, block); - else - ok = FLAC__metadata_iterator_insert_block_after(iterator, block); - - FLAC__metadata_iterator_delete(iterator); - - if(ok) { - FLAC__metadata_chain_sort_padding(chain); - ok = FLAC__metadata_chain_write(chain, /*use_padding=*/true, /*preserve_file_stats=*/true); - } - - FLAC__metadata_chain_delete(chain); - - return ok; -} - -void FLAC_plugin__tags_destroy(FLAC__StreamMetadata **tags) -{ - FLAC__metadata_object_delete(*tags); - *tags = 0; -} - -const char *FLAC_plugin__tags_get_tag_utf8(const FLAC__StreamMetadata *tags, const char *name) -{ - const int i = FLAC__metadata_object_vorbiscomment_find_entry_from(tags, /*offset=*/0, name); - return (i < 0? 0 : strchr((const char *)tags->data.vorbis_comment.comments[i].entry, '=')+1); -} - -FLAC__uint16 *FLAC_plugin__tags_get_tag_ucs2(const FLAC__StreamMetadata *tags, const char *name) -{ - const char *utf8 = FLAC_plugin__tags_get_tag_utf8(tags, name); - if(0 == utf8) - return 0; - return local__convert_utf8_to_ucs2(utf8, strlen(utf8)+1); /* +1 for terminating null */ -} - -int FLAC_plugin__tags_delete_tag(FLAC__StreamMetadata *tags, const char *name) -{ - return FLAC__metadata_object_vorbiscomment_remove_entries_matching(tags, name); -} - -int FLAC_plugin__tags_delete_all(FLAC__StreamMetadata *tags) -{ - int n = (int)tags->data.vorbis_comment.num_comments; - if(n > 0) { - if(!FLAC__metadata_object_vorbiscomment_resize_comments(tags, 0)) - n = -1; - } - return n; -} - -FLAC__bool FLAC_plugin__tags_add_tag_utf8(FLAC__StreamMetadata *tags, const char *name, const char *value, const char *separator) -{ - int i; - - FLAC__ASSERT(0 != tags); - FLAC__ASSERT(0 != name); - FLAC__ASSERT(0 != value); - - if(separator && (i = FLAC__metadata_object_vorbiscomment_find_entry_from(tags, /*offset=*/0, name)) >= 0) { - FLAC__StreamMetadata_VorbisComment_Entry *entry = tags->data.vorbis_comment.comments+i; - const size_t value_len = strlen(value); - const size_t separator_len = strlen(separator); - FLAC__byte *new_entry; - if(0 == (new_entry = (FLAC__byte*)safe_realloc_add_4op_(entry->entry, entry->length, /*+*/value_len, /*+*/separator_len, /*+*/1))) - return false; - memcpy(new_entry+entry->length, separator, separator_len); - entry->length += separator_len; - memcpy(new_entry+entry->length, value, value_len); - entry->length += value_len; - new_entry[entry->length] = '\0'; - entry->entry = new_entry; - } - else { - FLAC__StreamMetadata_VorbisComment_Entry entry; - if(!FLAC__metadata_object_vorbiscomment_entry_from_name_value_pair(&entry, name, value)) - return false; - FLAC__metadata_object_vorbiscomment_append_comment(tags, entry, /*copy=*/false); - } - return true; -} - -FLAC__bool FLAC_plugin__tags_set_tag_ucs2(FLAC__StreamMetadata *tags, const char *name, const FLAC__uint16 *value, FLAC__bool replace_all) -{ - FLAC__StreamMetadata_VorbisComment_Entry entry; - - FLAC__ASSERT(0 != tags); - FLAC__ASSERT(0 != name); - FLAC__ASSERT(0 != value); - - { - char *utf8 = local__convert_ucs2_to_utf8(value, local__wide_strlen(value)+1); /* +1 for the terminating null */ - if(0 == utf8) - return false; - if(!FLAC__metadata_object_vorbiscomment_entry_from_name_value_pair(&entry, name, utf8)) { - free(utf8); - return false; - } - free(utf8); - } - if(!FLAC__metadata_object_vorbiscomment_replace_comment(tags, entry, replace_all, /*copy=*/false)) - return false; - return true; -} diff --git a/3rdparty/libflac/src/plugin_common/tags.h b/3rdparty/libflac/src/plugin_common/tags.h deleted file mode 100644 index 78887674762..00000000000 --- a/3rdparty/libflac/src/plugin_common/tags.h +++ /dev/null @@ -1,74 +0,0 @@ -/* plugin_common - Routines common to several plugins - * Copyright (C) 2002,2003,2004,2005,2006,2007 Josh Coalson - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef FLAC__PLUGIN_COMMON__TAGS_H -#define FLAC__PLUGIN_COMMON__TAGS_H - -#include "FLAC/format.h" - -FLAC__bool FLAC_plugin__tags_get(const char *filename, FLAC__StreamMetadata **tags); -FLAC__bool FLAC_plugin__tags_set(const char *filename, const FLAC__StreamMetadata *tags); - -/* - * Deletes the tags object and sets '*tags' to NULL. - */ -void FLAC_plugin__tags_destroy(FLAC__StreamMetadata **tags); - -/* - * Gets the value (in UTF-8) of the first tag with the given name (NULL if no - * such tag exists). - */ -const char *FLAC_plugin__tags_get_tag_utf8(const FLAC__StreamMetadata *tags, const char *name); - -/* - * Gets the value (in UCS-2) of the first tag with the given name (NULL if no - * such tag exists). - * - * NOTE: the returned string is malloc()ed and must be free()d by the caller. - */ -FLAC__uint16 *FLAC_plugin__tags_get_tag_ucs2(const FLAC__StreamMetadata *tags, const char *name); - -/* - * Removes all tags with the given 'name'. Returns the number of tags removed, - * or -1 on memory allocation error. - */ -int FLAC_plugin__tags_delete_tag(FLAC__StreamMetadata *tags, const char *name); - -/* - * Removes all tags. Returns the number of tags removed, or -1 on memory - * allocation error. - */ -int FLAC_plugin__tags_delete_all(FLAC__StreamMetadata *tags); - -/* - * Adds a "name=value" tag to the tags. 'value' must be in UTF-8. If - * 'separator' is non-NULL and 'tags' already contains a tag for 'name', the - * first such tag's value is appended with separator, then value. - */ -FLAC__bool FLAC_plugin__tags_add_tag_utf8(FLAC__StreamMetadata *tags, const char *name, const char *value, const char *separator); - -/* - * Adds a "name=value" tag to the tags. 'value' must be in UCS-2. If 'tags' - * already contains a tag or tags for 'name', then they will be replaced - * according to 'replace_all': if 'replace_all' is false, only the first such - * tag will be replaced; if true, all matching tags will be replaced by the one - * new tag. - */ -FLAC__bool FLAC_plugin__tags_set_tag_ucs2(FLAC__StreamMetadata *tags, const char *name, const FLAC__uint16 *value, FLAC__bool replace_all); - -#endif |