summaryrefslogtreecommitdiffstats
path: root/akode/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'akode/plugins')
-rw-r--r--akode/plugins/Makefile.am43
-rw-r--r--akode/plugins/Makefile.in664
-rw-r--r--akode/plugins/alsa_sink/Makefile.am7
-rw-r--r--akode/plugins/alsa_sink/Makefile.in659
-rw-r--r--akode/plugins/alsa_sink/alsa_sink.cpp311
-rw-r--r--akode/plugins/alsa_sink/alsa_sink.h63
-rw-r--r--akode/plugins/ffmpeg_decoder/Makefile.am8
-rw-r--r--akode/plugins/ffmpeg_decoder/Makefile.in660
-rw-r--r--akode/plugins/ffmpeg_decoder/ffmpeg_decoder.cpp415
-rw-r--r--akode/plugins/ffmpeg_decoder/ffmpeg_decoder.h72
-rw-r--r--akode/plugins/jack_sink/Makefile.am7
-rw-r--r--akode/plugins/jack_sink/Makefile.in659
-rw-r--r--akode/plugins/jack_sink/jack_sink.cpp227
-rw-r--r--akode/plugins/jack_sink/jack_sink.h60
-rw-r--r--akode/plugins/mpc_decoder/Makefile.am8
-rw-r--r--akode/plugins/mpc_decoder/Makefile.in778
-rw-r--r--akode/plugins/mpc_decoder/mpc_decoder.cpp218
-rw-r--r--akode/plugins/mpc_decoder/mpc_decoder.h69
-rw-r--r--akode/plugins/mpc_decoder/mppdec/Makefile.am7
-rw-r--r--akode/plugins/mpc_decoder/mppdec/Makefile.in619
-rw-r--r--akode/plugins/mpc_decoder/mppdec/bitstream.cpp166
-rw-r--r--akode/plugins/mpc_decoder/mppdec/huffsv46.cpp228
-rw-r--r--akode/plugins/mpc_decoder/mppdec/huffsv7.cpp461
-rw-r--r--akode/plugins/mpc_decoder/mppdec/idtag.cpp66
-rw-r--r--akode/plugins/mpc_decoder/mppdec/mpc_dec.cpp1074
-rw-r--r--akode/plugins/mpc_decoder/mppdec/mpc_dec.h200
-rw-r--r--akode/plugins/mpc_decoder/mppdec/mpc_math.h88
-rw-r--r--akode/plugins/mpc_decoder/mppdec/readme.txt23
-rw-r--r--akode/plugins/mpc_decoder/mppdec/requant.cpp112
-rw-r--r--akode/plugins/mpc_decoder/mppdec/requant.h14
-rw-r--r--akode/plugins/mpc_decoder/mppdec/stdafx.cpp6
-rw-r--r--akode/plugins/mpc_decoder/mppdec/stdafx.h27
-rw-r--r--akode/plugins/mpc_decoder/mppdec/streaminfo.cpp210
-rw-r--r--akode/plugins/mpc_decoder/mppdec/streaminfo.h70
-rw-r--r--akode/plugins/mpc_decoder/mppdec/synth_filter.cpp403
-rw-r--r--akode/plugins/mpeg_decoder/Makefile.am8
-rw-r--r--akode/plugins/mpeg_decoder/Makefile.in660
-rw-r--r--akode/plugins/mpeg_decoder/mpeg_decoder.cpp572
-rw-r--r--akode/plugins/mpeg_decoder/mpeg_decoder.h69
-rw-r--r--akode/plugins/oss_sink/Makefile.am7
-rw-r--r--akode/plugins/oss_sink/Makefile.in659
-rw-r--r--akode/plugins/oss_sink/oss_sink.cpp218
-rw-r--r--akode/plugins/oss_sink/oss_sink.h65
-rw-r--r--akode/plugins/polyp_sink/Makefile.am7
-rw-r--r--akode/plugins/polyp_sink/Makefile.in659
-rw-r--r--akode/plugins/polyp_sink/polyp_sink.cpp143
-rw-r--r--akode/plugins/polyp_sink/polyp_sink.h60
-rw-r--r--akode/plugins/src_resampler/Makefile.am7
-rw-r--r--akode/plugins/src_resampler/Makefile.in660
-rw-r--r--akode/plugins/src_resampler/src_resampler.cpp177
-rw-r--r--akode/plugins/src_resampler/src_resampler.h57
-rw-r--r--akode/plugins/sun_sink/Makefile.am7
-rw-r--r--akode/plugins/sun_sink/Makefile.in657
-rw-r--r--akode/plugins/sun_sink/sun_sink.cpp179
-rw-r--r--akode/plugins/sun_sink/sun_sink.h64
-rw-r--r--akode/plugins/xiph_decoder/Makefile.am8
-rw-r--r--akode/plugins/xiph_decoder/Makefile.in689
-rw-r--r--akode/plugins/xiph_decoder/flac113_decoder.cpp377
-rw-r--r--akode/plugins/xiph_decoder/flac_decoder.cpp587
-rw-r--r--akode/plugins/xiph_decoder/flac_decoder.h103
-rw-r--r--akode/plugins/xiph_decoder/speex_decoder.cpp351
-rw-r--r--akode/plugins/xiph_decoder/speex_decoder.h74
-rw-r--r--akode/plugins/xiph_decoder/vorbis_decoder.cpp277
-rw-r--r--akode/plugins/xiph_decoder/vorbis_decoder.h70
-rw-r--r--akode/plugins/xiph_decoder/xiph_decoder.cpp84
-rw-r--r--akode/plugins/xiph_decoder/xiph_decoder.h42
66 files changed, 16299 insertions, 0 deletions
diff --git a/akode/plugins/Makefile.am b/akode/plugins/Makefile.am
new file mode 100644
index 0000000..74f27e5
--- /dev/null
+++ b/akode/plugins/Makefile.am
@@ -0,0 +1,43 @@
+AKODE_MPC_DECODER=mpc_decoder
+
+if include_xiph_decoder
+AKODE_XIPH_DECODER=xiph_decoder
+endif
+
+if include_mpeg_decoder
+AKODE_MPEG_DECODER=mpeg_decoder
+endif
+
+if include_ffmpeg_decoder
+AKODE_FFMPEG_DECODER=ffmpeg_decoder
+endif
+
+if include_src_resampler
+AKODE_SRC_RESAMPLER=src_resampler
+endif
+
+if include_alsa_sink
+AKODE_ALSA_SINK=alsa_sink
+endif
+
+if include_oss_sink
+AKODE_OSS_SINK=oss_sink
+endif
+
+if include_sun_sink
+AKODE_SUN_SINK=sun_sink
+endif
+
+if include_jack_sink
+AKODE_JACK_SINK=jack_sink
+endif
+
+if include_polyp_sink
+AKODE_POLYP_SINK=polyp_sink
+endif
+
+SUBDIRS= $(AKODE_MPC_DECODER) $(AKODE_XIPH_DECODER) \
+ $(AKODE_MPEG_DECODER) $(AKODE_FFMPEG_DECODER) \
+ $(AKODE_ALSA_SINK) $(AKODE_OSS_SINK) $(AKODE_SUN_SINK) \
+ $(AKODE_JACK_SINK) $(AKODE_POLYP_SINK) \
+ $(AKODE_SRC_RESAMPLER)
diff --git a/akode/plugins/Makefile.in b/akode/plugins/Makefile.in
new file mode 100644
index 0000000..598fd29
--- /dev/null
+++ b/akode/plugins/Makefile.in
@@ -0,0 +1,664 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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@
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = akode/plugins
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/akode/lib/akode_export.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+#>- RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+#>- html-recursive info-recursive install-data-recursive \
+#>- install-exec-recursive install-info-recursive \
+#>- install-recursive installcheck-recursive installdirs-recursive \
+#>- pdf-recursive ps-recursive uninstall-info-recursive \
+#>- uninstall-recursive
+#>+ 6
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive nmcheck-recursive bcheck-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = mpc_decoder xiph_decoder mpeg_decoder ffmpeg_decoder \
+ alsa_sink oss_sink sun_sink jack_sink polyp_sink src_resampler
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AKODE_LIBDL = @AKODE_LIBDL@
+ALSA_CFLAGS = @ALSA_CFLAGS@
+ALSA_LIBS = @ALSA_LIBS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVCODEC_CFLAGS = @AVCODEC_CFLAGS@
+AVCODEC_LDFLAGS = @AVCODEC_LDFLAGS@
+AVCODEC_LIBADD = @AVCODEC_LIBADD@
+AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@
+AVFORMAT_LDFLAGS = @AVFORMAT_LDFLAGS@
+AVFORMAT_LIBADD = @AVFORMAT_LIBADD@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LDFLAGS = @JACK_LDFLAGS@
+JACK_LIBADD = @JACK_LIBADD@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBFLAC = @LIBFLAC@
+LIBOBJS = @LIBOBJS@
+LIBOGGFLAC = @LIBOGGFLAC@
+LIBOSSAUDIO = @LIBOSSAUDIO@
+LIBPTHREAD = @LIBPTHREAD@
+LIBS = @LIBS@
+LIBSAMPLERATE = @LIBSAMPLERATE@
+LIBSEM = @LIBSEM@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MADLIBS = @MADLIBS@
+MAKEINFO = @MAKEINFO@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POLYP_CFLAGS = @POLYP_CFLAGS@
+POLYP_LDFLAGS = @POLYP_LDFLAGS@
+POLYP_LIBADD = @POLYP_LIBADD@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPEEXLIBS = @SPEEXLIBS@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+VERSION = @VERSION@
+VORBISFILE_LIBS = @VORBISFILE_LIBS@
+VORBIS_LIBS = @VORBIS_LIBS@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+akode_SUBDIR_included_FALSE = @akode_SUBDIR_included_FALSE@
+akode_SUBDIR_included_TRUE = @akode_SUBDIR_included_TRUE@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+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@
+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@
+include_alsa_sink_FALSE = @include_alsa_sink_FALSE@
+include_alsa_sink_TRUE = @include_alsa_sink_TRUE@
+include_ffmpeg_decoder_FALSE = @include_ffmpeg_decoder_FALSE@
+include_ffmpeg_decoder_TRUE = @include_ffmpeg_decoder_TRUE@
+include_jack_sink_FALSE = @include_jack_sink_FALSE@
+include_jack_sink_TRUE = @include_jack_sink_TRUE@
+include_mpeg_decoder_FALSE = @include_mpeg_decoder_FALSE@
+include_mpeg_decoder_TRUE = @include_mpeg_decoder_TRUE@
+include_oss_sink_FALSE = @include_oss_sink_FALSE@
+include_oss_sink_TRUE = @include_oss_sink_TRUE@
+include_polyp_sink_FALSE = @include_polyp_sink_FALSE@
+include_polyp_sink_TRUE = @include_polyp_sink_TRUE@
+include_src_resampler_FALSE = @include_src_resampler_FALSE@
+include_src_resampler_TRUE = @include_src_resampler_TRUE@
+include_sun_sink_FALSE = @include_sun_sink_FALSE@
+include_sun_sink_TRUE = @include_sun_sink_TRUE@
+include_xiph_decoder_FALSE = @include_xiph_decoder_FALSE@
+include_xiph_decoder_TRUE = @include_xiph_decoder_TRUE@
+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@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+AKODE_MPC_DECODER = mpc_decoder
+@include_xiph_decoder_TRUE@AKODE_XIPH_DECODER = xiph_decoder
+@include_mpeg_decoder_TRUE@AKODE_MPEG_DECODER = mpeg_decoder
+@include_ffmpeg_decoder_TRUE@AKODE_FFMPEG_DECODER = ffmpeg_decoder
+@include_src_resampler_TRUE@AKODE_SRC_RESAMPLER = src_resampler
+@include_alsa_sink_TRUE@AKODE_ALSA_SINK = alsa_sink
+@include_oss_sink_TRUE@AKODE_OSS_SINK = oss_sink
+@include_sun_sink_TRUE@AKODE_SUN_SINK = sun_sink
+@include_jack_sink_TRUE@AKODE_JACK_SINK = jack_sink
+@include_polyp_sink_TRUE@AKODE_POLYP_SINK = polyp_sink
+SUBDIRS = $(AKODE_MPC_DECODER) $(AKODE_XIPH_DECODER) \
+ $(AKODE_MPEG_DECODER) $(AKODE_FFMPEG_DECODER) \
+ $(AKODE_ALSA_SINK) $(AKODE_OSS_SINK) $(AKODE_SUN_SINK) \
+ $(AKODE_JACK_SINK) $(AKODE_POLYP_SINK) \
+ $(AKODE_SRC_RESAMPLER)
+
+#>- all: all-recursive
+#>+ 1
+all: docs-am all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu akode/plugins/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/Makefile.in
+.PRECIOUS: 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: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+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: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ 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; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(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
+
+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"; \
+ $(mkdir_p) "$(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
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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-recursive
+#>+ 1
+clean: kde-rpo-clean clean-recursive
+
+#>- clean-am: clean-generic clean-libtool mostlyclean-am
+#>+ 1
+clean-am: clean-bcheck clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+ clean clean-generic clean-libtool clean-recursive ctags \
+ ctags-recursive distclean distclean-generic distclean-libtool \
+ distclean-recursive distclean-tags distdir dvi dvi-am html \
+ html-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 installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-generic mostlyclean-libtool \
+ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-info-am
+
+# 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:
+
+#>+ 2
+KDE_DIST=Makefile.in Makefile.am
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-recursive
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXX) $(DEFS) -I. -I$(srcdir) -I$(top_builddir) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/akode/plugins/alsa_sink/Makefile.am b/akode/plugins/alsa_sink/Makefile.am
new file mode 100644
index 0000000..e1254f1
--- /dev/null
+++ b/akode/plugins/alsa_sink/Makefile.am
@@ -0,0 +1,7 @@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(all_includes)
+
+lib_LTLIBRARIES = libakode_alsa_sink.la
+
+libakode_alsa_sink_la_SOURCES = alsa_sink.cpp
+libakode_alsa_sink_la_LDFLAGS = -module -avoid-version -no-undefined
+libakode_alsa_sink_la_LIBADD = ../../lib/libakode.la $(ALSA_LIBS)
diff --git a/akode/plugins/alsa_sink/Makefile.in b/akode/plugins/alsa_sink/Makefile.in
new file mode 100644
index 0000000..d4dadc8
--- /dev/null
+++ b/akode/plugins/alsa_sink/Makefile.in
@@ -0,0 +1,659 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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@
+
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = akode/plugins/alsa_sink
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/akode/lib/akode_export.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libakode_alsa_sink_la_DEPENDENCIES = ../../lib/libakode.la \
+ $(am__DEPENDENCIES_1)
+am_libakode_alsa_sink_la_OBJECTS = alsa_sink.lo
+#>- libakode_alsa_sink_la_OBJECTS = $(am_libakode_alsa_sink_la_OBJECTS)
+#>+ 1
+libakode_alsa_sink_la_OBJECTS = alsa_sink.lo
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/akode/lib
+depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
+am__depfiles_maybe = depfiles
+#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 2
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+#>- $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 3
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+CXXLD = $(CXX)
+#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+#>+ 2
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libakode_alsa_sink_la_SOURCES)
+DIST_SOURCES = $(libakode_alsa_sink_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AKODE_LIBDL = @AKODE_LIBDL@
+ALSA_CFLAGS = @ALSA_CFLAGS@
+ALSA_LIBS = @ALSA_LIBS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVCODEC_CFLAGS = @AVCODEC_CFLAGS@
+AVCODEC_LDFLAGS = @AVCODEC_LDFLAGS@
+AVCODEC_LIBADD = @AVCODEC_LIBADD@
+AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@
+AVFORMAT_LDFLAGS = @AVFORMAT_LDFLAGS@
+AVFORMAT_LIBADD = @AVFORMAT_LIBADD@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LDFLAGS = @JACK_LDFLAGS@
+JACK_LIBADD = @JACK_LIBADD@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBFLAC = @LIBFLAC@
+LIBOBJS = @LIBOBJS@
+LIBOGGFLAC = @LIBOGGFLAC@
+LIBOSSAUDIO = @LIBOSSAUDIO@
+LIBPTHREAD = @LIBPTHREAD@
+LIBS = @LIBS@
+LIBSAMPLERATE = @LIBSAMPLERATE@
+LIBSEM = @LIBSEM@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MADLIBS = @MADLIBS@
+MAKEINFO = @MAKEINFO@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POLYP_CFLAGS = @POLYP_CFLAGS@
+POLYP_LDFLAGS = @POLYP_LDFLAGS@
+POLYP_LIBADD = @POLYP_LIBADD@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPEEXLIBS = @SPEEXLIBS@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+VERSION = @VERSION@
+VORBISFILE_LIBS = @VORBISFILE_LIBS@
+VORBIS_LIBS = @VORBIS_LIBS@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+akode_SUBDIR_included_FALSE = @akode_SUBDIR_included_FALSE@
+akode_SUBDIR_included_TRUE = @akode_SUBDIR_included_TRUE@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+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@
+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@
+include_alsa_sink_FALSE = @include_alsa_sink_FALSE@
+include_alsa_sink_TRUE = @include_alsa_sink_TRUE@
+include_ffmpeg_decoder_FALSE = @include_ffmpeg_decoder_FALSE@
+include_ffmpeg_decoder_TRUE = @include_ffmpeg_decoder_TRUE@
+include_jack_sink_FALSE = @include_jack_sink_FALSE@
+include_jack_sink_TRUE = @include_jack_sink_TRUE@
+include_mpeg_decoder_FALSE = @include_mpeg_decoder_FALSE@
+include_mpeg_decoder_TRUE = @include_mpeg_decoder_TRUE@
+include_oss_sink_FALSE = @include_oss_sink_FALSE@
+include_oss_sink_TRUE = @include_oss_sink_TRUE@
+include_polyp_sink_FALSE = @include_polyp_sink_FALSE@
+include_polyp_sink_TRUE = @include_polyp_sink_TRUE@
+include_src_resampler_FALSE = @include_src_resampler_FALSE@
+include_src_resampler_TRUE = @include_src_resampler_TRUE@
+include_sun_sink_FALSE = @include_sun_sink_FALSE@
+include_sun_sink_TRUE = @include_sun_sink_TRUE@
+include_xiph_decoder_FALSE = @include_xiph_decoder_FALSE@
+include_xiph_decoder_TRUE = @include_xiph_decoder_TRUE@
+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@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(all_includes)
+lib_LTLIBRARIES = libakode_alsa_sink.la
+libakode_alsa_sink_la_SOURCES = alsa_sink.cpp
+#>- libakode_alsa_sink_la_LDFLAGS = -module -avoid-version -no-undefined
+#>+ 1
+libakode_alsa_sink_la_LDFLAGS = -module -avoid-version -no-undefined $(KDE_NO_UNDEFINED)
+libakode_alsa_sink_la_LIBADD = ../../lib/libakode.la $(ALSA_LIBS)
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/alsa_sink/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu akode/plugins/alsa_sink/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/alsa_sink/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/alsa_sink/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/alsa_sink/Makefile.in
+.PRECIOUS: 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: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_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
+#>- libakode_alsa_sink.la: $(libakode_alsa_sink_la_OBJECTS) $(libakode_alsa_sink_la_DEPENDENCIES)
+#>+ 2
+@KDE_USE_CLOSURE_TRUE@libakode_alsa_sink.la: libakode_alsa_sink.la.closure $(libakode_alsa_sink_la_OBJECTS) $(libakode_alsa_sink_la_DEPENDENCIES)
+@KDE_USE_CLOSURE_FALSE@libakode_alsa_sink.la: $(libakode_alsa_sink_la_OBJECTS) $(libakode_alsa_sink_la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(libdir) $(libakode_alsa_sink_la_LDFLAGS) $(libakode_alsa_sink_la_OBJECTS) $(libakode_alsa_sink_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsa_sink.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+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: TAGS
+
+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; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+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
+
+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"; \
+ $(mkdir_p) "$(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)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+#>- mostlyclean-am
+#>+ 2
+clean-am: clean-closures clean-bcheck clean-generic clean-libLTLIBRARIES clean-libtool \
+ 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:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+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 uninstall-libLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool ctags 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-exec \
+ install-exec-am install-info install-info-am \
+ install-libLTLIBRARIES 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 \
+ uninstall-libLTLIBRARIES
+
+# 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:
+
+#>+ 8
+libakode_alsa_sink.la.closure: $(libakode_alsa_sink_la_OBJECTS) $(libakode_alsa_sink_la_DEPENDENCIES)
+ @echo "int main() {return 0;}" > libakode_alsa_sink_la_closure.cpp
+ @$(LTCXXCOMPILE) -c libakode_alsa_sink_la_closure.cpp
+ $(CXXLINK) libakode_alsa_sink_la_closure.lo $(libakode_alsa_sink_la_LDFLAGS) $(libakode_alsa_sink_la_OBJECTS) $(libakode_alsa_sink_la_LIBADD) $(LIBS)
+ @rm -f libakode_alsa_sink_la_closure.* libakode_alsa_sink.la.closure
+ @echo "timestamp" > libakode_alsa_sink.la.closure
+
+
+#>+ 2
+KDE_DIST=alsa_sink.h Makefile.in Makefile.am
+
+#>+ 3
+clean-closures:
+ -rm -f libakode_alsa_sink.la.closure
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/alsa_sink/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/alsa_sink/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/alsa_sink/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXXCOMPILE) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/akode/plugins/alsa_sink/alsa_sink.cpp b/akode/plugins/alsa_sink/alsa_sink.cpp
new file mode 100644
index 0000000..2abad2e
--- /dev/null
+++ b/akode/plugins/alsa_sink/alsa_sink.cpp
@@ -0,0 +1,311 @@
+/* aKode: ALSA Sink
+
+ Copyright (C) 2004-2005 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <iostream>
+
+#include <alsa/asoundlib.h>
+#include <alsa/pcm.h>
+
+#include <audioframe.h>
+#include "alsa_sink.h"
+
+/*
+ * resume from suspend
+ */
+static int resume(snd_pcm_t *pcm)
+{
+ int res;
+ while ((res = snd_pcm_resume(pcm)) == -EAGAIN)
+ sleep(1);
+ if (! res)
+ return 0;
+ return snd_pcm_prepare(pcm);
+}
+
+namespace aKode {
+
+extern "C" { ALSASinkPlugin alsa_sink; }
+
+struct ALSASink::private_data
+{
+ private_data() : pcm_playback(0), buffer(0), error(false), can_pause(false) {};
+
+ snd_pcm_t *pcm_playback;
+
+ AudioConfiguration config;
+ int scale;
+ int filled, fragmentSize;
+ int sampleSize;
+ char* buffer;
+ bool error;
+ bool can_pause;
+};
+
+ALSASink::ALSASink()
+{
+ m_data = new private_data;
+}
+
+ALSASink::~ALSASink()
+{
+ close();
+ delete m_data;
+}
+
+bool ALSASink::open()
+{
+ int err = 0;
+ // open is non-blocking to make it possible to fail when occupied
+ err = snd_pcm_open(&m_data->pcm_playback, "default", SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
+ if (err < 0) {
+ m_data->error = true;
+ return false;
+ }
+
+ // Set to blocking
+ snd_pcm_nonblock(m_data->pcm_playback, 0);
+
+ m_data->error = false;
+ return true;
+}
+
+void ALSASink::close()
+{
+ if (m_data->pcm_playback) {
+ snd_pcm_drain(m_data->pcm_playback);
+ snd_pcm_close(m_data->pcm_playback);
+ }
+ m_data->pcm_playback = 0;
+ m_data->error = false;
+}
+
+int ALSASink::setAudioConfiguration(const AudioConfiguration* config)
+{
+ if (m_data->error) return -1;
+
+ // Get back to OPEN state (is SETUP state enough with snd_pcm_drop?)
+ snd_pcm_state_t state = snd_pcm_state( m_data->pcm_playback );
+ if (state != SND_PCM_STATE_OPEN) {
+ close();
+ if (!open()) return -1;
+ }
+
+ int res = 0;
+ int wid = 1;
+ m_data->config = *config;
+ snd_pcm_hw_params_t *hw;
+ snd_pcm_hw_params_alloca(&hw);
+ snd_pcm_hw_params_any(m_data->pcm_playback, hw);
+ snd_pcm_hw_params_set_access(m_data->pcm_playback, hw, SND_PCM_ACCESS_RW_INTERLEAVED);
+ // Detect format:
+ snd_pcm_format_t format = SND_PCM_FORMAT_UNKNOWN;
+ // Test for float, 24 and 32 bit integer. Fall back to 16bit
+ if (m_data->config.sample_width<0) {
+ if (snd_pcm_hw_params_test_format(m_data->pcm_playback, hw, SND_PCM_FORMAT_FLOAT ) == 0) {
+ format = SND_PCM_FORMAT_FLOAT;
+ m_data->scale = 1;
+ wid = 4;
+ goto found_format;
+ }
+ // Try 16bit then
+ m_data->config.sample_width = 16;
+ res = 1;
+ }
+ if (m_data->config.sample_width > 24 && m_data->config.sample_width <=32) {
+ if (snd_pcm_hw_params_test_format(m_data->pcm_playback, hw, SND_PCM_FORMAT_S32) == 0) {
+ format = SND_PCM_FORMAT_S32;
+ m_data->scale = 1<<(32-config->sample_width);
+ wid = 4;
+ goto found_format;
+ }
+ // Try 24bit then
+ m_data->config.sample_width = 24;
+ res = 1;
+ }
+ if (m_data->config.sample_width > 16 && m_data->config.sample_width <= 24) {
+ if (snd_pcm_hw_params_test_format(m_data->pcm_playback, hw, SND_PCM_FORMAT_S24 ) == 0) {
+ format = SND_PCM_FORMAT_S24;
+ m_data->scale = 1<<(24-config->sample_width);
+ wid = 4;
+ goto found_format;
+ }
+ // Try 16bit then
+ m_data->config.sample_width = 16;
+ }
+ // If the driver doesnt support 8 or 16 bit, we will fail completly
+ if (m_data->config.sample_width<=8) {
+ format = SND_PCM_FORMAT_S8;
+ m_data->scale = 1<<(8-config->sample_width);
+ wid = 1;
+ goto found_format;
+ }
+ else
+ if (m_data->config.sample_width<=16) {
+ format = SND_PCM_FORMAT_S16;
+ m_data->scale = 1<<(16-config->sample_width);
+ wid = 2;
+ goto found_format;
+ }
+
+found_format:
+ if (format != SND_PCM_FORMAT_UNKNOWN)
+ snd_pcm_hw_params_set_format(m_data->pcm_playback, hw, format);
+ else
+ return -1;
+
+ unsigned int rate = config->sample_rate;
+ snd_pcm_hw_params_set_rate_near(m_data->pcm_playback, hw, &rate, 0);
+ if (m_data->config.sample_rate != rate) {
+ m_data->config.sample_rate = rate;
+ res = 1;
+ }
+
+ snd_pcm_hw_params_set_channels(m_data->pcm_playback, hw, config->channels);
+
+
+ m_data->fragmentSize = 1024;
+ snd_pcm_uframes_t period_size = m_data->fragmentSize / (wid*config->channels);
+ snd_pcm_hw_params_set_period_size_near(m_data->pcm_playback, hw, &period_size, 0);
+
+ m_data->fragmentSize = period_size * (wid*config->channels);
+// std::cerr << "akode: ALSA fragment-size: " << m_data->fragmentSize << "\n";
+
+ delete m_data->buffer;
+ m_data->buffer = new char [m_data->fragmentSize];
+ m_data->filled = 0;
+
+ if (snd_pcm_hw_params(m_data->pcm_playback, hw) < 0) {
+ return -1;
+ }
+ else {
+ m_data->can_pause = (snd_pcm_hw_params_can_pause(hw) == 1);
+ return res;
+ }
+}
+
+const AudioConfiguration* ALSASink::audioConfiguration() const
+{
+ return &m_data->config;
+}
+
+template<class T>
+bool ALSASink::_writeFrame(AudioFrame* frame)
+{
+ int channels = m_data->config.channels;
+
+ long i = 0;
+ T* buffer = (T*)m_data->buffer;
+ T** data = (T**)frame->data;
+ while(true) {
+ if (m_data->filled >= m_data->fragmentSize)
+ xrun:
+ {
+ int frames = snd_pcm_bytes_to_frames(m_data->pcm_playback, m_data->filled);
+ int status = snd_pcm_writei(m_data->pcm_playback, m_data->buffer, frames);
+ if (status == -EPIPE) {
+ snd_pcm_prepare(m_data->pcm_playback);
+ //std::cerr << "akode: ALSA xrun\n";
+ goto xrun;
+ }
+ else if (status < 0) return false;
+ int bytes = snd_pcm_frames_to_bytes(m_data->pcm_playback, status);
+ if (m_data->filled != bytes) {
+ int rest = m_data->filled - bytes;
+ //std::cerr << "akode: ALSA write-remainder: " << rest << "\n";
+ memmove(m_data->buffer, m_data->buffer + bytes, rest);
+ m_data->filled = rest;
+ } else
+ m_data->filled = 0;
+
+ }
+ if (i >= frame->length) break;
+ for(int j=0; j<channels; j++) {
+ buffer[m_data->filled/sizeof(T)] = (data[j][i])*m_data->scale;
+ m_data->filled+=sizeof(T);
+ }
+ i++;
+ }
+
+ if (snd_pcm_state( m_data->pcm_playback ) == SND_PCM_STATE_PREPARED)
+ snd_pcm_start(m_data->pcm_playback);
+
+ return true;
+}
+
+bool ALSASink::writeFrame(AudioFrame* frame)
+{
+ if (m_data->error) return false;
+ if (!frame) return false;
+
+ if ( frame->sample_width != m_data->config.sample_width
+ || frame->channels != m_data->config.channels
+ || frame->sample_rate != m_data->config.sample_rate)
+ {
+ if (setAudioConfiguration(frame) < 0)
+ return false;
+ }
+
+ if ( snd_pcm_state(m_data->pcm_playback) == SND_PCM_STATE_SUSPENDED ) {
+ int res = ::resume(m_data->pcm_playback);
+ if (res < 0)
+ return false;
+ }
+ else
+ if (snd_pcm_state( m_data->pcm_playback ) == SND_PCM_STATE_PAUSED)
+ snd_pcm_pause(m_data->pcm_playback, 0);
+
+ if (snd_pcm_state( m_data->pcm_playback ) == SND_PCM_STATE_SETUP)
+ snd_pcm_prepare(m_data->pcm_playback);
+
+ if (frame->sample_width<0)
+ return _writeFrame<float>(frame);
+ else
+ if (frame->sample_width<=8)
+ return _writeFrame<int8_t>(frame);
+ else
+ if (frame->sample_width<=16)
+ return _writeFrame<int16_t>(frame);
+ else
+ if (frame->sample_width<=32)
+ return _writeFrame<int32_t>(frame);
+
+ return false;
+}
+
+void ALSASink::pause()
+{
+ if (m_data->error) return;
+
+ if (m_data->can_pause) {
+ snd_pcm_pause(m_data->pcm_playback, 1);
+ }
+
+}
+
+// Do not confuse this with snd_pcm_resume which is used to resume from a suspend
+void ALSASink::resume()
+{
+ if (m_data->error) return;
+
+ if (snd_pcm_state( m_data->pcm_playback ) == SND_PCM_STATE_PAUSED)
+ snd_pcm_pause(m_data->pcm_playback, 0);
+}
+
+} // namespace
diff --git a/akode/plugins/alsa_sink/alsa_sink.h b/akode/plugins/alsa_sink/alsa_sink.h
new file mode 100644
index 0000000..cd8da4e
--- /dev/null
+++ b/akode/plugins/alsa_sink/alsa_sink.h
@@ -0,0 +1,63 @@
+/* aKode: ALSA-Sink
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _AKODE_ALSA_SINK_H
+#define _AKODE_ALSA_SINK_H
+
+#include "sink.h"
+
+#include "akode_export.h"
+
+namespace aKode {
+
+class AudioConfiguration;
+class AudioFrame;
+
+class ALSASink : public Sink {
+public:
+ ALSASink();
+ ~ALSASink();
+ bool open();
+ void close();
+ int setAudioConfiguration(const AudioConfiguration *config);
+ const AudioConfiguration* audioConfiguration() const;
+ // Writes blocking
+ bool writeFrame(AudioFrame *frame);
+ void pause();
+ void resume();
+
+ struct private_data;
+private:
+ template<class T> bool _writeFrame(AudioFrame *frame);
+ private_data *m_data;
+};
+
+class ALSASinkPlugin : public SinkPlugin {
+public:
+ virtual ALSASink* openSink() {
+ return new ALSASink();
+ }
+};
+
+extern "C" AKODE_EXPORT ALSASinkPlugin alsa_sink;
+
+} // namespace
+
+#endif
diff --git a/akode/plugins/ffmpeg_decoder/Makefile.am b/akode/plugins/ffmpeg_decoder/Makefile.am
new file mode 100644
index 0000000..05021b8
--- /dev/null
+++ b/akode/plugins/ffmpeg_decoder/Makefile.am
@@ -0,0 +1,8 @@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(AVCODEC_CFLAGS) $(AVFORMAT_CFLAGS) $(all_includes)
+
+lib_LTLIBRARIES = libakode_ffmpeg_decoder.la
+
+libakode_ffmpeg_decoder_la_SOURCES = ffmpeg_decoder.cpp
+
+libakode_ffmpeg_decoder_la_LDFLAGS = -avoid-version -no-undefined $(AVCODEC_LDFLAGS) $(AVFORMAT_LDFLAGS)
+libakode_ffmpeg_decoder_la_LIBADD = ../../lib/libakode.la $(AVCODEC_LIBADD) $(AVFORMAT_LIBADD)
diff --git a/akode/plugins/ffmpeg_decoder/Makefile.in b/akode/plugins/ffmpeg_decoder/Makefile.in
new file mode 100644
index 0000000..b7e749a
--- /dev/null
+++ b/akode/plugins/ffmpeg_decoder/Makefile.in
@@ -0,0 +1,660 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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@
+
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = akode/plugins/ffmpeg_decoder
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/akode/lib/akode_export.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libakode_ffmpeg_decoder_la_DEPENDENCIES = ../../lib/libakode.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_libakode_ffmpeg_decoder_la_OBJECTS = ffmpeg_decoder.lo
+#>- libakode_ffmpeg_decoder_la_OBJECTS = \
+#>- $(am_libakode_ffmpeg_decoder_la_OBJECTS)
+#>+ 1
+libakode_ffmpeg_decoder_la_OBJECTS = ffmpeg_decoder.lo
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/akode/lib
+depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
+am__depfiles_maybe = depfiles
+#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 2
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+#>- $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 3
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+CXXLD = $(CXX)
+#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+#>+ 2
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libakode_ffmpeg_decoder_la_SOURCES)
+DIST_SOURCES = $(libakode_ffmpeg_decoder_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AKODE_LIBDL = @AKODE_LIBDL@
+ALSA_CFLAGS = @ALSA_CFLAGS@
+ALSA_LIBS = @ALSA_LIBS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVCODEC_CFLAGS = @AVCODEC_CFLAGS@
+AVCODEC_LDFLAGS = @AVCODEC_LDFLAGS@
+AVCODEC_LIBADD = @AVCODEC_LIBADD@
+AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@
+AVFORMAT_LDFLAGS = @AVFORMAT_LDFLAGS@
+AVFORMAT_LIBADD = @AVFORMAT_LIBADD@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LDFLAGS = @JACK_LDFLAGS@
+JACK_LIBADD = @JACK_LIBADD@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBFLAC = @LIBFLAC@
+LIBOBJS = @LIBOBJS@
+LIBOGGFLAC = @LIBOGGFLAC@
+LIBOSSAUDIO = @LIBOSSAUDIO@
+LIBPTHREAD = @LIBPTHREAD@
+LIBS = @LIBS@
+LIBSAMPLERATE = @LIBSAMPLERATE@
+LIBSEM = @LIBSEM@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MADLIBS = @MADLIBS@
+MAKEINFO = @MAKEINFO@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POLYP_CFLAGS = @POLYP_CFLAGS@
+POLYP_LDFLAGS = @POLYP_LDFLAGS@
+POLYP_LIBADD = @POLYP_LIBADD@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPEEXLIBS = @SPEEXLIBS@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+VERSION = @VERSION@
+VORBISFILE_LIBS = @VORBISFILE_LIBS@
+VORBIS_LIBS = @VORBIS_LIBS@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+akode_SUBDIR_included_FALSE = @akode_SUBDIR_included_FALSE@
+akode_SUBDIR_included_TRUE = @akode_SUBDIR_included_TRUE@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+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@
+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@
+include_alsa_sink_FALSE = @include_alsa_sink_FALSE@
+include_alsa_sink_TRUE = @include_alsa_sink_TRUE@
+include_ffmpeg_decoder_FALSE = @include_ffmpeg_decoder_FALSE@
+include_ffmpeg_decoder_TRUE = @include_ffmpeg_decoder_TRUE@
+include_jack_sink_FALSE = @include_jack_sink_FALSE@
+include_jack_sink_TRUE = @include_jack_sink_TRUE@
+include_mpeg_decoder_FALSE = @include_mpeg_decoder_FALSE@
+include_mpeg_decoder_TRUE = @include_mpeg_decoder_TRUE@
+include_oss_sink_FALSE = @include_oss_sink_FALSE@
+include_oss_sink_TRUE = @include_oss_sink_TRUE@
+include_polyp_sink_FALSE = @include_polyp_sink_FALSE@
+include_polyp_sink_TRUE = @include_polyp_sink_TRUE@
+include_src_resampler_FALSE = @include_src_resampler_FALSE@
+include_src_resampler_TRUE = @include_src_resampler_TRUE@
+include_sun_sink_FALSE = @include_sun_sink_FALSE@
+include_sun_sink_TRUE = @include_sun_sink_TRUE@
+include_xiph_decoder_FALSE = @include_xiph_decoder_FALSE@
+include_xiph_decoder_TRUE = @include_xiph_decoder_TRUE@
+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@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(AVCODEC_CFLAGS) $(AVFORMAT_CFLAGS) $(all_includes)
+lib_LTLIBRARIES = libakode_ffmpeg_decoder.la
+libakode_ffmpeg_decoder_la_SOURCES = ffmpeg_decoder.cpp
+#>- libakode_ffmpeg_decoder_la_LDFLAGS = -avoid-version -no-undefined $(AVCODEC_LDFLAGS) $(AVFORMAT_LDFLAGS)
+#>+ 1
+libakode_ffmpeg_decoder_la_LDFLAGS = -avoid-version -no-undefined $(KDE_NO_UNDEFINED) $(AVCODEC_LDFLAGS) $(AVFORMAT_LDFLAGS)
+libakode_ffmpeg_decoder_la_LIBADD = ../../lib/libakode.la $(AVCODEC_LIBADD) $(AVFORMAT_LIBADD)
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/ffmpeg_decoder/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu akode/plugins/ffmpeg_decoder/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/ffmpeg_decoder/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/ffmpeg_decoder/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/ffmpeg_decoder/Makefile.in
+.PRECIOUS: 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: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_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
+#>- libakode_ffmpeg_decoder.la: $(libakode_ffmpeg_decoder_la_OBJECTS) $(libakode_ffmpeg_decoder_la_DEPENDENCIES)
+#>+ 2
+@KDE_USE_CLOSURE_TRUE@libakode_ffmpeg_decoder.la: libakode_ffmpeg_decoder.la.closure $(libakode_ffmpeg_decoder_la_OBJECTS) $(libakode_ffmpeg_decoder_la_DEPENDENCIES)
+@KDE_USE_CLOSURE_FALSE@libakode_ffmpeg_decoder.la: $(libakode_ffmpeg_decoder_la_OBJECTS) $(libakode_ffmpeg_decoder_la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(libdir) $(libakode_ffmpeg_decoder_la_LDFLAGS) $(libakode_ffmpeg_decoder_la_OBJECTS) $(libakode_ffmpeg_decoder_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ffmpeg_decoder.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+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: TAGS
+
+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; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+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
+
+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"; \
+ $(mkdir_p) "$(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)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+#>- mostlyclean-am
+#>+ 2
+clean-am: clean-closures clean-bcheck clean-generic clean-libLTLIBRARIES clean-libtool \
+ 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:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+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 uninstall-libLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool ctags 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-exec \
+ install-exec-am install-info install-info-am \
+ install-libLTLIBRARIES 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 \
+ uninstall-libLTLIBRARIES
+
+# 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:
+
+#>+ 8
+libakode_ffmpeg_decoder.la.closure: $(libakode_ffmpeg_decoder_la_OBJECTS) $(libakode_ffmpeg_decoder_la_DEPENDENCIES)
+ @echo "int main() {return 0;}" > libakode_ffmpeg_decoder_la_closure.cpp
+ @$(LTCXXCOMPILE) -c libakode_ffmpeg_decoder_la_closure.cpp
+ $(CXXLINK) libakode_ffmpeg_decoder_la_closure.lo $(libakode_ffmpeg_decoder_la_LDFLAGS) $(libakode_ffmpeg_decoder_la_OBJECTS) $(libakode_ffmpeg_decoder_la_LIBADD) $(LIBS)
+ @rm -f libakode_ffmpeg_decoder_la_closure.* libakode_ffmpeg_decoder.la.closure
+ @echo "timestamp" > libakode_ffmpeg_decoder.la.closure
+
+
+#>+ 2
+KDE_DIST=ffmpeg_decoder.h Makefile.in Makefile.am
+
+#>+ 3
+clean-closures:
+ -rm -f libakode_ffmpeg_decoder.la.closure
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/ffmpeg_decoder/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/ffmpeg_decoder/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/ffmpeg_decoder/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXXCOMPILE) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/akode/plugins/ffmpeg_decoder/ffmpeg_decoder.cpp b/akode/plugins/ffmpeg_decoder/ffmpeg_decoder.cpp
new file mode 100644
index 0000000..67156a1
--- /dev/null
+++ b/akode/plugins/ffmpeg_decoder/ffmpeg_decoder.cpp
@@ -0,0 +1,415 @@
+/* aKode: FFMPEG Decoder
+
+ Copyright (C) 2005 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "akodelib.h"
+// #ifdef HAVE_FFMPEG
+
+#include "file.h"
+#include "audioframe.h"
+#include "decoder.h"
+
+#include <assert.h>
+#include <ffmpeg/avcodec.h>
+#include <ffmpeg/avformat.h>
+#include <ffmpeg/avio.h>
+
+#include "ffmpeg_decoder.h"
+#include <iostream>
+
+// FFMPEG callbacks
+extern "C" {
+ static int akode_read(void* opaque, unsigned char *buf, int size)
+ {
+ aKode::File *file = (aKode::File*)opaque;
+ return file->read((char*)buf, size);
+ }
+ static int akode_write(void* opaque, unsigned char *buf, int size)
+ {
+ aKode::File *file = (aKode::File*)opaque;
+ return file->write((char*)buf, size);
+ }
+ static offset_t akode_seek(void* opaque, offset_t pos, int whence)
+ {
+ aKode::File *file = (aKode::File*)opaque;
+ return file->seek(pos, whence);
+ }
+}
+
+namespace aKode {
+
+
+bool FFMPEGDecoderPlugin::canDecode(File* /*src*/) {
+ // ### FIXME
+ return true;
+}
+/*
+void FFMPEGDecoderPlugin::initializeFFMPEG() {
+ av_register_all();
+}*/
+
+extern "C" { FFMPEGDecoderPlugin ffmpeg_decoder; }
+
+#define FILE_BUFFER_SIZE 8192
+
+struct FFMPEGDecoder::private_data
+{
+ private_data() : audioStream(-1), videoStream(-1), packetSize(0), position(0),
+ eof(false), error(false), initialized(false), retries(0) {};
+
+ AVFormatContext* ic;
+ AVCodec* codec;
+ AVInputFormat *fmt;
+ ByteIOContext stream;
+
+ int audioStream;
+ int videoStream;
+
+ AVPacket packet;
+ uint8_t* packetData;
+ int packetSize;
+
+ File *src;
+ AudioConfiguration config;
+
+ long position;
+
+ bool eof, error;
+ bool initialized;
+ int retries;
+
+ unsigned char file_buffer[FILE_BUFFER_SIZE];
+ char buffer[AVCODEC_MAX_AUDIO_FRAME_SIZE];
+ int buffer_size;
+};
+
+FFMPEGDecoder::FFMPEGDecoder(File *src) {
+ d = new private_data;
+ av_register_all();
+
+ d->src = src;
+}
+
+FFMPEGDecoder::~FFMPEGDecoder() {
+ closeFile();
+ delete d;
+}
+
+
+static bool setAudioConfiguration(AudioConfiguration *config, AVCodecContext *codec_context)
+{
+ config->sample_rate = codec_context->sample_rate;
+ config->channels = codec_context->channels;
+ // I do not know FFMPEGs surround channel ordering
+ if (config->channels > 2) return false;
+ config->channel_config = MonoStereo;
+ // avcodec.h says sample_fmt is not used. I guess it means it is always S16
+ switch(codec_context->sample_fmt) {
+ case SAMPLE_FMT_U8:
+ config->sample_width = 8; // beware unsigned!
+ break;
+ case SAMPLE_FMT_S16:
+ config->sample_width = 16;
+ break;
+/* disabled because I don't know byte ordering
+ case SAMPLE_FMT_S24:
+ config->sample_width = 24;
+ break;
+ */
+ case SAMPLE_FMT_S32:
+ config->sample_width = 32;
+ break;
+ case SAMPLE_FMT_FLT:
+ config->sample_width = -32;
+ break;
+ default:
+ return false;;
+ }
+ return true;
+}
+
+
+bool FFMPEGDecoder::openFile() {
+ d->src->openRO();
+ d->src->fadvise();
+
+ // The following duplicates what av_open_input_file would normally do
+
+ // url_fdopen
+ init_put_byte(&d->stream, d->file_buffer, FILE_BUFFER_SIZE, 0, d->src, akode_read, akode_write, akode_seek);
+ d->stream.is_streamed = !d->src->seekable();
+ d->stream.max_packet_size = FILE_BUFFER_SIZE;
+
+ {
+ // 2048 is PROBE_BUF_SIZE from libavformat/utils.c
+ AVProbeData pd;
+ uint8_t buf[2048];
+ pd.filename = d->src->filename;
+ pd.buf = buf;
+ pd.buf_size = 0;
+ pd.buf_size = get_buffer(&d->stream, buf, 2048);
+ d->fmt = av_probe_input_format(&pd, 1);
+ // Seek back to 0
+ // copied from url_fseek
+ long offset1 = 0 - (d->stream.pos - (d->stream.buf_end - d->stream.buffer));
+ if (offset1 >= 0 && offset1 <= (d->stream.buf_end - d->stream.buffer)) {
+ /* can do the seek inside the buffer */
+ d->stream.buf_ptr = d->stream.buffer + offset1;
+ } else {
+ if (!d->src->seek(0)) {
+ d->src->close();
+ return false;
+ } else {
+ d->stream.pos = 0;
+ d->stream.buf_ptr = d->file_buffer;
+ d->stream.buf_end = d->file_buffer;
+ }
+ }
+ }
+ if (!d->fmt) {
+ std::cerr << "akode: FFMPEG: Format not found\n";
+ closeFile();
+ return false;
+ }
+
+ if (av_open_input_stream(&d->ic, &d->stream, d->src->filename, d->fmt, 0) != 0)
+ {
+ closeFile();
+ return false;
+ }
+
+ av_find_stream_info( d->ic );
+
+ // Find the first a/v streams
+ d->audioStream = -1;
+ d->videoStream = -1;
+ for (int i = 0; i < d->ic->nb_streams; i++) {
+ if (d->ic->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO)
+ d->audioStream = i;
+ else
+ if (d->ic->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO)
+ d->videoStream = i;
+ }
+ if (d->audioStream == -1)
+ {
+ std::cerr << "akode: FFMPEG: Audio stream not found\n";
+ // for now require an audio stream
+ closeFile();
+ return false;
+ }
+
+ // Set config
+ if (!setAudioConfiguration(&d->config, d->ic->streams[d->audioStream]->codec))
+ {
+ closeFile();
+ return false;
+ }
+
+ d->codec = avcodec_find_decoder(d->ic->streams[d->audioStream]->codec->codec_id);
+ if (!d->codec) {
+ std::cerr << "akode: FFMPEG: Codec not found\n";
+ closeFile();
+ return false;
+ }
+ avcodec_open( d->ic->streams[d->audioStream]->codec, d->codec );
+
+ double ffpos = (double)d->ic->streams[d->audioStream]->start_time / (double)AV_TIME_BASE;
+ d->position = (long)(ffpos * d->config.sample_rate);
+
+ return true;
+}
+
+void FFMPEGDecoder::closeFile() {
+ if( d->packetSize > 0 ) {
+ av_free_packet( &d->packet );
+ d->packetSize = 0;
+ }
+
+ if( d->codec ) {
+ avcodec_close( d->ic->streams[d->audioStream]->codec );
+ d->codec = 0;
+ }
+ if( d->ic ) {
+ // make sure av_close_input_file doesn't actually close the file
+ d->ic->iformat->flags = d->ic->iformat->flags | AVFMT_NOFILE;
+ av_close_input_file( d->ic );
+ d->ic = 0;
+ }
+ if (d->src) {
+ d->src->close();
+ }
+}
+
+bool FFMPEGDecoder::readPacket() {
+ do {
+ av_init_packet(&d->packet);
+ if ( av_read_frame(d->ic, &d->packet) < 0 ) {
+ av_free_packet( &d->packet );
+ d->packetSize = 0;
+ d->packetData = 0;
+ return false;
+ }
+ if (d->packet.stream_index == d->audioStream) {
+ d->packetSize = d->packet.size;
+ d->packetData = d->packet.data;
+ return true;
+ }
+ av_free_packet(&d->packet);
+ } while (true);
+
+ return false;
+}
+
+template<typename T>
+static long demux(FFMPEGDecoder::private_data* d, AudioFrame* frame) {
+ int channels = d->config.channels;
+ long length = d->buffer_size/(channels*sizeof(T));
+ frame->reserveSpace(&d->config, length);
+
+ T offset = 0;
+ if (frame->sample_width == 8) offset = -128; // convert unsigned to signed
+
+ // Demux into frame
+ T* buffer = (T*)d->buffer;
+ T** data = (T**)frame->data;
+ for(int i=0; i<length; i++)
+ for(int j=0; j<channels; j++)
+ data[j][i] = buffer[i*channels+j] + offset;
+ return length;
+}
+
+bool FFMPEGDecoder::readFrame(AudioFrame* frame)
+{
+ if (!d->initialized) {
+ if (!openFile()) {
+ d->error = true;
+ return false;
+ }
+ d->initialized = true;
+ }
+
+ if( d->packetSize <= 0 )
+ if (!readPacket()) {
+ std::cerr << "akode: FFMPEG: EOF guessed\n";
+ d->eof = true;
+ return false;
+ }
+
+ assert(d->packet.stream_index == d->audioStream);
+
+retry:
+ int len = avcodec_decode_audio( d->ic->streams[d->audioStream]->codec,
+ (short*)d->buffer, &d->buffer_size,
+ d->packetData, d->packetSize );
+
+ if (len <= 0) {
+ d->retries++;
+ if (d->retries > 8) {
+ std::cerr << "akode: FFMPEG: Decoding failure\n";
+ d->error = true;
+ return false;
+ }
+ goto retry;
+ } else
+ d->retries = 0;
+
+ d->packetSize -= len;
+ d->packetData += len;
+ long length = 0;
+ switch (d->config.sample_width) {
+ case 8:
+ length = demux<int8_t>(d,frame);
+ break;
+ case 16:
+ length = demux<int16_t>(d,frame);
+ break;
+ case 32:
+ length = demux<int32_t>(d,frame);
+ break;
+ case -32:
+ length = demux<float>(d,frame);
+ break;
+ default:
+ assert(false);
+ }
+ if (length == 0) return readFrame(frame);
+ std::cout << "akode: FFMPEG: Frame length: " << length << "\n";
+
+ if( d->packetSize <= 0 )
+ av_free_packet( &d->packet );
+
+ frame->pos = (d->position*1000)/d->config.sample_rate;
+ d->position += length;
+ return true;
+}
+
+long FFMPEGDecoder::length() {
+ if (!d->initialized) return -1;
+ // ### Returns only the length of the first stream
+ double ffmpeglen = (double)d->ic->streams[d->audioStream]->duration / (double)AV_TIME_BASE;
+ return (long)(ffmpeglen*1000.0);
+}
+
+long FFMPEGDecoder::position() {
+ if (!d->initialized) return -1;
+ // ### Replace with FFMPEG native call
+ return (d->position*1000)/d->config.sample_rate;
+}
+
+bool FFMPEGDecoder::eof() {
+ return d->eof;
+}
+
+bool FFMPEGDecoder::error() {
+ return d->error;
+}
+
+bool FFMPEGDecoder::seekable() {
+ return d->src->seekable();
+}
+
+bool FFMPEGDecoder::seek(long pos) {
+ if (!d->initialized) return false;
+ AVRational time_base = d->ic->streams[d->audioStream]->time_base;
+ std::cout<< "time base is " << time_base.num << "/" << time_base.den << "\n";
+ long ffpos = 0;
+ {
+ int div = (pos / (time_base.num*1000)) * time_base.den;
+ int rem = (pos % (time_base.num*1000)) * time_base.den;
+ ffpos = div + rem / (time_base.num*1000);
+ }
+ std::cout<< "seeking to " << pos << "ms\n";
+// long ffpos = (long)((pos/1000.0)*AV_TIME_BASE);
+ std::cout<< "seeking to " << ffpos << "pos\n";
+ bool res = av_seek_frame(d->ic, d->audioStream, ffpos, 0);
+ if (res < 0) return false;
+ else {
+ d->position = (pos * d->config.sample_rate)/1000;
+ return true;
+ }
+}
+
+const AudioConfiguration* FFMPEGDecoder::audioConfiguration() {
+ if (!d->initialized) return 0;
+ return &d->config;
+}
+
+} // namespace
+
+// #endif // HAVE_FFMPEG
diff --git a/akode/plugins/ffmpeg_decoder/ffmpeg_decoder.h b/akode/plugins/ffmpeg_decoder/ffmpeg_decoder.h
new file mode 100644
index 0000000..1ffda6c
--- /dev/null
+++ b/akode/plugins/ffmpeg_decoder/ffmpeg_decoder.h
@@ -0,0 +1,72 @@
+/* aKode: FFMPEG Decoder
+
+ Copyright (C) 2005 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _AKODE_FFMPEG_DECODER_H
+#define _AKODE_FFMPEG_DECODER_H
+
+#include "akodelib.h"
+// #ifdef HAVE_FFMPEG
+
+#include "decoder.h"
+
+namespace aKode {
+
+class File;
+class AudioFrame;
+
+class FFMPEGDecoder : public Decoder {
+public:
+ FFMPEGDecoder(File* src);
+ virtual ~FFMPEGDecoder();
+
+ virtual bool openFile();
+ void closeFile();
+
+ virtual bool readFrame(AudioFrame*);
+ virtual long length();
+ virtual long position();
+ virtual bool seek(long);
+ virtual bool seekable();
+ virtual bool eof();
+ virtual bool error();
+
+ virtual const AudioConfiguration* audioConfiguration();
+
+ struct private_data;
+private:
+ bool readPacket();
+ private_data *d;
+};
+
+
+class FFMPEGDecoderPlugin : public DecoderPlugin {
+public:
+ virtual bool canDecode(File*);
+ virtual FFMPEGDecoder* openDecoder(File* src) {
+ return new FFMPEGDecoder(src);
+ };
+};
+
+extern "C" FFMPEGDecoderPlugin ffmpeg_decoder;
+
+} // namespace
+
+// #endif // HAVE_FFMPEG
+#endif
diff --git a/akode/plugins/jack_sink/Makefile.am b/akode/plugins/jack_sink/Makefile.am
new file mode 100644
index 0000000..967caea
--- /dev/null
+++ b/akode/plugins/jack_sink/Makefile.am
@@ -0,0 +1,7 @@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(JACK_CFLAGS) $(all_includes)
+
+lib_LTLIBRARIES = libakode_jack_sink.la
+
+libakode_jack_sink_la_SOURCES = jack_sink.cpp
+libakode_jack_sink_la_LDFLAGS = -module -avoid-version -no-undefined $(JACK_LDFLAGS)
+libakode_jack_sink_la_LIBADD = ../../lib/libakode.la $(JACK_LIBADD)
diff --git a/akode/plugins/jack_sink/Makefile.in b/akode/plugins/jack_sink/Makefile.in
new file mode 100644
index 0000000..69091ba
--- /dev/null
+++ b/akode/plugins/jack_sink/Makefile.in
@@ -0,0 +1,659 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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@
+
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = akode/plugins/jack_sink
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/akode/lib/akode_export.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libakode_jack_sink_la_DEPENDENCIES = ../../lib/libakode.la \
+ $(am__DEPENDENCIES_1)
+am_libakode_jack_sink_la_OBJECTS = jack_sink.lo
+#>- libakode_jack_sink_la_OBJECTS = $(am_libakode_jack_sink_la_OBJECTS)
+#>+ 1
+libakode_jack_sink_la_OBJECTS = jack_sink.lo
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/akode/lib
+depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
+am__depfiles_maybe = depfiles
+#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 2
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+#>- $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 3
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+CXXLD = $(CXX)
+#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+#>+ 2
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libakode_jack_sink_la_SOURCES)
+DIST_SOURCES = $(libakode_jack_sink_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AKODE_LIBDL = @AKODE_LIBDL@
+ALSA_CFLAGS = @ALSA_CFLAGS@
+ALSA_LIBS = @ALSA_LIBS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVCODEC_CFLAGS = @AVCODEC_CFLAGS@
+AVCODEC_LDFLAGS = @AVCODEC_LDFLAGS@
+AVCODEC_LIBADD = @AVCODEC_LIBADD@
+AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@
+AVFORMAT_LDFLAGS = @AVFORMAT_LDFLAGS@
+AVFORMAT_LIBADD = @AVFORMAT_LIBADD@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LDFLAGS = @JACK_LDFLAGS@
+JACK_LIBADD = @JACK_LIBADD@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBFLAC = @LIBFLAC@
+LIBOBJS = @LIBOBJS@
+LIBOGGFLAC = @LIBOGGFLAC@
+LIBOSSAUDIO = @LIBOSSAUDIO@
+LIBPTHREAD = @LIBPTHREAD@
+LIBS = @LIBS@
+LIBSAMPLERATE = @LIBSAMPLERATE@
+LIBSEM = @LIBSEM@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MADLIBS = @MADLIBS@
+MAKEINFO = @MAKEINFO@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POLYP_CFLAGS = @POLYP_CFLAGS@
+POLYP_LDFLAGS = @POLYP_LDFLAGS@
+POLYP_LIBADD = @POLYP_LIBADD@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPEEXLIBS = @SPEEXLIBS@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+VERSION = @VERSION@
+VORBISFILE_LIBS = @VORBISFILE_LIBS@
+VORBIS_LIBS = @VORBIS_LIBS@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+akode_SUBDIR_included_FALSE = @akode_SUBDIR_included_FALSE@
+akode_SUBDIR_included_TRUE = @akode_SUBDIR_included_TRUE@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+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@
+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@
+include_alsa_sink_FALSE = @include_alsa_sink_FALSE@
+include_alsa_sink_TRUE = @include_alsa_sink_TRUE@
+include_ffmpeg_decoder_FALSE = @include_ffmpeg_decoder_FALSE@
+include_ffmpeg_decoder_TRUE = @include_ffmpeg_decoder_TRUE@
+include_jack_sink_FALSE = @include_jack_sink_FALSE@
+include_jack_sink_TRUE = @include_jack_sink_TRUE@
+include_mpeg_decoder_FALSE = @include_mpeg_decoder_FALSE@
+include_mpeg_decoder_TRUE = @include_mpeg_decoder_TRUE@
+include_oss_sink_FALSE = @include_oss_sink_FALSE@
+include_oss_sink_TRUE = @include_oss_sink_TRUE@
+include_polyp_sink_FALSE = @include_polyp_sink_FALSE@
+include_polyp_sink_TRUE = @include_polyp_sink_TRUE@
+include_src_resampler_FALSE = @include_src_resampler_FALSE@
+include_src_resampler_TRUE = @include_src_resampler_TRUE@
+include_sun_sink_FALSE = @include_sun_sink_FALSE@
+include_sun_sink_TRUE = @include_sun_sink_TRUE@
+include_xiph_decoder_FALSE = @include_xiph_decoder_FALSE@
+include_xiph_decoder_TRUE = @include_xiph_decoder_TRUE@
+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@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(JACK_CFLAGS) $(all_includes)
+lib_LTLIBRARIES = libakode_jack_sink.la
+libakode_jack_sink_la_SOURCES = jack_sink.cpp
+#>- libakode_jack_sink_la_LDFLAGS = -module -avoid-version -no-undefined $(JACK_LDFLAGS)
+#>+ 1
+libakode_jack_sink_la_LDFLAGS = -module -avoid-version -no-undefined $(KDE_NO_UNDEFINED) $(JACK_LDFLAGS)
+libakode_jack_sink_la_LIBADD = ../../lib/libakode.la $(JACK_LIBADD)
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/jack_sink/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu akode/plugins/jack_sink/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/jack_sink/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/jack_sink/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/jack_sink/Makefile.in
+.PRECIOUS: 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: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_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
+#>- libakode_jack_sink.la: $(libakode_jack_sink_la_OBJECTS) $(libakode_jack_sink_la_DEPENDENCIES)
+#>+ 2
+@KDE_USE_CLOSURE_TRUE@libakode_jack_sink.la: libakode_jack_sink.la.closure $(libakode_jack_sink_la_OBJECTS) $(libakode_jack_sink_la_DEPENDENCIES)
+@KDE_USE_CLOSURE_FALSE@libakode_jack_sink.la: $(libakode_jack_sink_la_OBJECTS) $(libakode_jack_sink_la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(libdir) $(libakode_jack_sink_la_LDFLAGS) $(libakode_jack_sink_la_OBJECTS) $(libakode_jack_sink_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jack_sink.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+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: TAGS
+
+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; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+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
+
+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"; \
+ $(mkdir_p) "$(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)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+#>- mostlyclean-am
+#>+ 2
+clean-am: clean-closures clean-bcheck clean-generic clean-libLTLIBRARIES clean-libtool \
+ 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:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+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 uninstall-libLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool ctags 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-exec \
+ install-exec-am install-info install-info-am \
+ install-libLTLIBRARIES 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 \
+ uninstall-libLTLIBRARIES
+
+# 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:
+
+#>+ 8
+libakode_jack_sink.la.closure: $(libakode_jack_sink_la_OBJECTS) $(libakode_jack_sink_la_DEPENDENCIES)
+ @echo "int main() {return 0;}" > libakode_jack_sink_la_closure.cpp
+ @$(LTCXXCOMPILE) -c libakode_jack_sink_la_closure.cpp
+ $(CXXLINK) libakode_jack_sink_la_closure.lo $(libakode_jack_sink_la_LDFLAGS) $(libakode_jack_sink_la_OBJECTS) $(libakode_jack_sink_la_LIBADD) $(LIBS)
+ @rm -f libakode_jack_sink_la_closure.* libakode_jack_sink.la.closure
+ @echo "timestamp" > libakode_jack_sink.la.closure
+
+
+#>+ 2
+KDE_DIST=Makefile.in jack_sink.h Makefile.am
+
+#>+ 3
+clean-closures:
+ -rm -f libakode_jack_sink.la.closure
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/jack_sink/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/jack_sink/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/jack_sink/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXXCOMPILE) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/akode/plugins/jack_sink/jack_sink.cpp b/akode/plugins/jack_sink/jack_sink.cpp
new file mode 100644
index 0000000..4824165
--- /dev/null
+++ b/akode/plugins/jack_sink/jack_sink.cpp
@@ -0,0 +1,227 @@
+/* aKode: JACK-Sink
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#elif HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#include <jack/jack.h>
+
+#include <audioframe.h>
+#include <audiobuffer.h>
+#include "jack_sink.h"
+
+#include <iostream>
+
+namespace aKode {
+
+extern "C" { JACKSinkPlugin jack_sink; }
+
+struct JACKSink::private_data
+{
+ private_data() : left_port(0), right_port(0), client(0), error(false), sample_rate(0), buffer(8),pos(0) {};
+// jack_port_t *input_port;
+ jack_port_t *left_port;
+ jack_port_t *right_port;
+
+ jack_client_t *client;
+
+ bool error;
+ unsigned int sample_rate;
+
+ AudioConfiguration config;
+ AudioBuffer buffer;
+ AudioFrame current;
+ int pos;
+};
+
+static int process (jack_nframes_t nframes, void *arg)
+{
+ JACKSink::private_data *m_data = (JACKSink::private_data*)arg;
+
+ jack_default_audio_sample_t *out1=0, *out2=0;
+
+ if (m_data->left_port)
+ out1 = (jack_default_audio_sample_t *) jack_port_get_buffer (m_data->left_port, nframes);
+ if (m_data->right_port)
+ out2 = (jack_default_audio_sample_t *) jack_port_get_buffer (m_data->right_port, nframes);
+
+ if (!out2 && !out1) return 0;
+
+ unsigned int n = 0;
+ float** buffer = (float**)m_data->current.data;
+ while(n < nframes) {
+ if (m_data->pos >= m_data->current.length) {
+ if (!m_data->buffer.get(&m_data->current, false)) break;
+ m_data->pos = 0;
+ buffer = (float**)m_data->current.data;
+ }
+
+ if (out1) out1[n] = buffer[0][m_data->pos];
+ if (out2) out2[n] = buffer[1][m_data->pos];
+
+ n++;
+ m_data->pos++;
+ }
+
+ return n;
+}
+
+static void shutdown (void *arg)
+{
+ JACKSink::private_data *m_data = (JACKSink::private_data*)arg;
+
+ // Jack has shut down, so the sink is in fatal error.
+ m_data->error = true;
+ m_data->buffer.release();
+}
+
+JACKSink::JACKSink()
+{
+ m_data = new private_data;
+}
+
+bool JACKSink::open() {
+ m_data->client = jack_client_new("akode_client");
+ if (!m_data->client) {
+ m_data->error = true;
+ return false;
+ }
+ jack_set_process_callback(m_data->client, process, (void*)m_data);
+ jack_on_shutdown(m_data->client, shutdown, (void*)m_data);
+
+ m_data->sample_rate = jack_get_sample_rate(m_data->client);
+// jack_set_sample_rate_callback(m_data->client, sample_rate, (void*)m_data);
+
+ if (jack_activate(m_data->client)) {
+ m_data->error = true;
+ std::cout << "aKode::Jack: Activate failed\n";
+ return false;
+ }
+ const char** names = jack_get_ports (m_data->client, NULL, NULL, JackPortIsPhysical|JackPortIsInput);
+ while (*names) {
+ std::cout << *names << std::endl;
+ names++;
+ }
+
+ return true;
+}
+
+JACKSink::~JACKSink()
+{
+ if (m_data->left_port)
+ jack_port_unregister(m_data->client, m_data->left_port);
+ if (m_data->right_port)
+ jack_port_unregister(m_data->client, m_data->right_port);
+ if (m_data->client)
+ jack_deactivate(m_data->client);
+ delete m_data;
+}
+
+int JACKSink::setAudioConfiguration(const AudioConfiguration* config)
+{
+ if (m_data->error) return -1;
+
+ int res = 0;
+ m_data->config = *config;
+
+ if (config->channel_config != MonoStereo ) return -1;
+ m_data->left_port = jack_port_register (m_data->client, "left", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
+ if (jack_connect (m_data->client, jack_port_name (m_data->left_port), "alsa_pcm:playback_1")) {
+ m_data->error = true;
+ return -1;
+ }
+ if (config->channels > 1) {
+ m_data->right_port = jack_port_register (m_data->client, "right", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
+ if (jack_connect (m_data->client, jack_port_name (m_data->right_port), "alsa_pcm:playback_2")) {
+ m_data->config.channels = 1;
+ res = 1;
+ }
+ }
+
+ if (config->sample_width != -32) {
+ res = 1;
+ m_data->config.sample_width = -32;
+ }
+
+ if (config->sample_rate != m_data->sample_rate) {
+ res = 1;
+ m_data->config.sample_rate = m_data->sample_rate;
+ }
+
+ return res;
+}
+
+const AudioConfiguration* JACKSink::audioConfiguration() const
+{
+ return &m_data->config;
+}
+
+template<typename S>
+void JACKSink::convertFrame(AudioFrame *in, AudioFrame *out)
+{
+ float scale = (float)(1<<(in->sample_width-1));
+ scale = 1.0/scale;
+// float scale = 1;
+
+ out->reserveSpace(&m_data->config, in->length);
+
+ int channels = in->channels;
+ S** indata = (S**)in->data;
+ float** outdata = (float**)out->data;
+ for(int j=0; j<in->length; j++) {
+ for(int i=0; i<channels; i++) {
+ outdata[i][j] = scale*indata[i][j];
+ }
+ }
+}
+
+bool JACKSink::writeFrame(AudioFrame* frame)
+{
+ if ( m_data->error ) return false;
+
+ if ( frame->channels != m_data->config.channels )
+ {
+ if (setAudioConfiguration(frame)!=0)
+ return false;
+ }
+ if (frame->length == 0) return true;
+
+ // this shouldn't really happen
+ if (frame->sample_width>0) {
+ AudioFrame out;
+ if (frame->sample_width<=8)
+ convertFrame<int8_t>(frame, &out);
+ else
+ if (frame->sample_width<=16)
+ convertFrame<int16_t>(frame, &out);
+ else
+ if (frame->sample_width<=32)
+ convertFrame<int32_t>(frame, &out);
+ return m_data->buffer.put(&out, true);
+ } else
+ return m_data->buffer.put(frame, true);
+
+}
+
+} // namespace
diff --git a/akode/plugins/jack_sink/jack_sink.h b/akode/plugins/jack_sink/jack_sink.h
new file mode 100644
index 0000000..06fabef
--- /dev/null
+++ b/akode/plugins/jack_sink/jack_sink.h
@@ -0,0 +1,60 @@
+/* aKode: JACK-Sink
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _AKODE_JACK_SINK_H
+#define _AKODE_JACK_SINK_H
+
+#include "sink.h"
+
+#include "akode_export.h"
+
+namespace aKode {
+
+class AudioConfiguration;
+class AudioFrame;
+
+class JACKSink : public Sink {
+public:
+ JACKSink();
+ ~JACKSink();
+ bool open();
+ int setAudioConfiguration(const AudioConfiguration *config);
+ const AudioConfiguration* audioConfiguration() const;
+ // Writes blocking
+ bool writeFrame(AudioFrame *frame);
+
+ struct private_data;
+private:
+ template<class T> void convertFrame(AudioFrame *in, AudioFrame *out);
+ private_data *m_data;
+};
+
+class JACKSinkPlugin : public SinkPlugin {
+public:
+ virtual JACKSink* openSink() {
+ return new JACKSink();
+ }
+};
+
+extern "C" AKODE_EXPORT JACKSinkPlugin jack_sink;
+
+} // namespace
+
+#endif
diff --git a/akode/plugins/mpc_decoder/Makefile.am b/akode/plugins/mpc_decoder/Makefile.am
new file mode 100644
index 0000000..ad7546e
--- /dev/null
+++ b/akode/plugins/mpc_decoder/Makefile.am
@@ -0,0 +1,8 @@
+SUBDIRS = mppdec .
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib -I$(srcdir)/mppdec $(all_includes)
+
+lib_LTLIBRARIES = libakode_mpc_decoder.la
+
+libakode_mpc_decoder_la_SOURCES = mpc_decoder.cpp
+libakode_mpc_decoder_la_LDFLAGS = -module -avoid-version -no-undefined
+libakode_mpc_decoder_la_LIBADD = ../../lib/libakode.la mppdec/libakode_mppdec.la
diff --git a/akode/plugins/mpc_decoder/Makefile.in b/akode/plugins/mpc_decoder/Makefile.in
new file mode 100644
index 0000000..39866eb
--- /dev/null
+++ b/akode/plugins/mpc_decoder/Makefile.in
@@ -0,0 +1,778 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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@
+
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = akode/plugins/mpc_decoder
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/akode/lib/akode_export.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libakode_mpc_decoder_la_DEPENDENCIES = ../../lib/libakode.la \
+ mppdec/libakode_mppdec.la
+am_libakode_mpc_decoder_la_OBJECTS = mpc_decoder.lo
+#>- libakode_mpc_decoder_la_OBJECTS = \
+#>- $(am_libakode_mpc_decoder_la_OBJECTS)
+#>+ 1
+libakode_mpc_decoder_la_OBJECTS = mpc_decoder.lo
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/akode/lib
+depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
+am__depfiles_maybe = depfiles
+#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 2
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+#>- $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 3
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+CXXLD = $(CXX)
+#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+#>+ 2
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libakode_mpc_decoder_la_SOURCES)
+DIST_SOURCES = $(libakode_mpc_decoder_la_SOURCES)
+#>- RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+#>- html-recursive info-recursive install-data-recursive \
+#>- install-exec-recursive install-info-recursive \
+#>- install-recursive installcheck-recursive installdirs-recursive \
+#>- pdf-recursive ps-recursive uninstall-info-recursive \
+#>- uninstall-recursive
+#>+ 6
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive nmcheck-recursive bcheck-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AKODE_LIBDL = @AKODE_LIBDL@
+ALSA_CFLAGS = @ALSA_CFLAGS@
+ALSA_LIBS = @ALSA_LIBS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVCODEC_CFLAGS = @AVCODEC_CFLAGS@
+AVCODEC_LDFLAGS = @AVCODEC_LDFLAGS@
+AVCODEC_LIBADD = @AVCODEC_LIBADD@
+AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@
+AVFORMAT_LDFLAGS = @AVFORMAT_LDFLAGS@
+AVFORMAT_LIBADD = @AVFORMAT_LIBADD@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LDFLAGS = @JACK_LDFLAGS@
+JACK_LIBADD = @JACK_LIBADD@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBFLAC = @LIBFLAC@
+LIBOBJS = @LIBOBJS@
+LIBOGGFLAC = @LIBOGGFLAC@
+LIBOSSAUDIO = @LIBOSSAUDIO@
+LIBPTHREAD = @LIBPTHREAD@
+LIBS = @LIBS@
+LIBSAMPLERATE = @LIBSAMPLERATE@
+LIBSEM = @LIBSEM@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MADLIBS = @MADLIBS@
+MAKEINFO = @MAKEINFO@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POLYP_CFLAGS = @POLYP_CFLAGS@
+POLYP_LDFLAGS = @POLYP_LDFLAGS@
+POLYP_LIBADD = @POLYP_LIBADD@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPEEXLIBS = @SPEEXLIBS@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+VERSION = @VERSION@
+VORBISFILE_LIBS = @VORBISFILE_LIBS@
+VORBIS_LIBS = @VORBIS_LIBS@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+akode_SUBDIR_included_FALSE = @akode_SUBDIR_included_FALSE@
+akode_SUBDIR_included_TRUE = @akode_SUBDIR_included_TRUE@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+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@
+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@
+include_alsa_sink_FALSE = @include_alsa_sink_FALSE@
+include_alsa_sink_TRUE = @include_alsa_sink_TRUE@
+include_ffmpeg_decoder_FALSE = @include_ffmpeg_decoder_FALSE@
+include_ffmpeg_decoder_TRUE = @include_ffmpeg_decoder_TRUE@
+include_jack_sink_FALSE = @include_jack_sink_FALSE@
+include_jack_sink_TRUE = @include_jack_sink_TRUE@
+include_mpeg_decoder_FALSE = @include_mpeg_decoder_FALSE@
+include_mpeg_decoder_TRUE = @include_mpeg_decoder_TRUE@
+include_oss_sink_FALSE = @include_oss_sink_FALSE@
+include_oss_sink_TRUE = @include_oss_sink_TRUE@
+include_polyp_sink_FALSE = @include_polyp_sink_FALSE@
+include_polyp_sink_TRUE = @include_polyp_sink_TRUE@
+include_src_resampler_FALSE = @include_src_resampler_FALSE@
+include_src_resampler_TRUE = @include_src_resampler_TRUE@
+include_sun_sink_FALSE = @include_sun_sink_FALSE@
+include_sun_sink_TRUE = @include_sun_sink_TRUE@
+include_xiph_decoder_FALSE = @include_xiph_decoder_FALSE@
+include_xiph_decoder_TRUE = @include_xiph_decoder_TRUE@
+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@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+SUBDIRS = mppdec .
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib -I$(srcdir)/mppdec $(all_includes)
+lib_LTLIBRARIES = libakode_mpc_decoder.la
+libakode_mpc_decoder_la_SOURCES = mpc_decoder.cpp
+#>- libakode_mpc_decoder_la_LDFLAGS = -module -avoid-version -no-undefined
+#>+ 1
+libakode_mpc_decoder_la_LDFLAGS = -module -avoid-version -no-undefined $(KDE_NO_UNDEFINED)
+libakode_mpc_decoder_la_LIBADD = ../../lib/libakode.la mppdec/libakode_mppdec.la
+#>- all: all-recursive
+#>+ 1
+all: docs-am all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/mpc_decoder/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu akode/plugins/mpc_decoder/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/mpc_decoder/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/mpc_decoder/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/mpc_decoder/Makefile.in
+.PRECIOUS: 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: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_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
+#>- libakode_mpc_decoder.la: $(libakode_mpc_decoder_la_OBJECTS) $(libakode_mpc_decoder_la_DEPENDENCIES)
+#>+ 2
+@KDE_USE_CLOSURE_TRUE@libakode_mpc_decoder.la: libakode_mpc_decoder.la.closure $(libakode_mpc_decoder_la_OBJECTS) $(libakode_mpc_decoder_la_DEPENDENCIES)
+@KDE_USE_CLOSURE_FALSE@libakode_mpc_decoder.la: $(libakode_mpc_decoder_la_OBJECTS) $(libakode_mpc_decoder_la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(libdir) $(libakode_mpc_decoder_la_LDFLAGS) $(libakode_mpc_decoder_la_OBJECTS) $(libakode_mpc_decoder_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpc_decoder.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+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: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ 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; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(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
+
+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"; \
+ $(mkdir_p) "$(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
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LTLIBRARIES)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(libdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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-recursive
+#>+ 1
+clean: kde-rpo-clean clean-recursive
+
+#>- clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+#>- mostlyclean-am
+#>+ 2
+clean-am: clean-closures clean-bcheck clean-generic clean-libLTLIBRARIES clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+ clean clean-generic clean-libLTLIBRARIES clean-libtool \
+ clean-recursive ctags ctags-recursive distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-recursive distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-libLTLIBRARIES install-man \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-info-am uninstall-libLTLIBRARIES
+
+# 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:
+
+#>+ 8
+libakode_mpc_decoder.la.closure: $(libakode_mpc_decoder_la_OBJECTS) $(libakode_mpc_decoder_la_DEPENDENCIES)
+ @echo "int main() {return 0;}" > libakode_mpc_decoder_la_closure.cpp
+ @$(LTCXXCOMPILE) -c libakode_mpc_decoder_la_closure.cpp
+ $(CXXLINK) libakode_mpc_decoder_la_closure.lo $(libakode_mpc_decoder_la_LDFLAGS) $(libakode_mpc_decoder_la_OBJECTS) $(libakode_mpc_decoder_la_LIBADD) $(LIBS)
+ @rm -f libakode_mpc_decoder_la_closure.* libakode_mpc_decoder.la.closure
+ @echo "timestamp" > libakode_mpc_decoder.la.closure
+
+
+#>+ 2
+KDE_DIST=mpc_decoder.h Makefile.in Makefile.am
+
+#>+ 3
+clean-closures:
+ -rm -f libakode_mpc_decoder.la.closure
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/mpc_decoder/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/mpc_decoder/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/mpc_decoder/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-recursive
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXXCOMPILE) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/akode/plugins/mpc_decoder/mpc_decoder.cpp b/akode/plugins/mpc_decoder/mpc_decoder.cpp
new file mode 100644
index 0000000..a355ff4
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mpc_decoder.cpp
@@ -0,0 +1,218 @@
+/* aKode: Musepack(MPC) Decoder
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+//#ifdef AKODE_COMPILE_MPC
+
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
+#include <stdint.h>
+#endif
+
+#include "file.h"
+#include "audioframe.h"
+
+#include "mpc_dec.h"
+
+#include "mpc_decoder.h"
+
+namespace aKode {
+
+class MPC_reader_impl : public MPC_reader
+{
+public:
+ MPC_reader_impl(aKode::File *file, bool p_seekable) : m_file(file), m_seekable(p_seekable)
+ {
+ m_file->openRO();
+ m_file->fadvise();
+ }
+ virtual ~MPC_reader_impl() {
+ m_file->close();
+ }
+ size_t read ( void *ptr, size_t size ) {return m_file->read((char*)ptr,size);}
+ bool seek ( int offset, int origin ) {return m_file->seek(offset,origin);}
+ long tell () {return m_file->position();}
+ long get_size () {return m_file->length();}
+ bool canseek() {return m_file->seekable();}
+private:
+ aKode::File * m_file;
+ bool m_seekable;
+};
+
+bool MPCDecoderPlugin::canDecode(File* src) {
+ MPC_reader_impl reader(src, true);
+ StreamInfo si;
+
+ int r = si.ReadStreamInfo(&reader);
+ return r==0;
+}
+
+extern "C" { MPCDecoderPlugin mpc_decoder; }
+
+struct MPCDecoder::private_data
+{
+ private_data(File *src) : reader(src,true), decoder(&reader),
+ initialized(false), buffer(0), position(0),
+ eof(false), error(false)
+ {};
+ MPC_reader_impl reader;
+ StreamInfo si;
+ MPC_decoder decoder;
+
+ bool initialized;
+ MPC_SAMPLE_FORMAT *buffer;
+
+ long position;
+ bool eof;
+ bool error;
+
+ AudioConfiguration config;
+};
+
+MPCDecoder::MPCDecoder(File *src) {
+ m_data = new private_data(src);
+}
+
+MPCDecoder::~MPCDecoder() {
+ if (m_data->initialized)
+ delete[] m_data->buffer;
+ delete m_data;
+}
+
+void MPCDecoder::initialize() {
+ if (m_data->initialized) return;
+
+ m_data->si.ReadStreamInfo(&m_data->reader);
+ m_data->error = !m_data->decoder.Initialize(&m_data->si);
+ m_data->buffer = new MPC_SAMPLE_FORMAT[MPC_decoder::DecodeBufferLength];
+ m_data->initialized = true;
+
+ m_data->config.channels = m_data->si.simple.Channels;
+ m_data->config.sample_rate = m_data->si.simple.SampleFreq;
+ m_data->config.sample_width = -32;
+
+ if (m_data->config.channels <=2)
+ m_data->config.channel_config = MonoStereo;
+ else
+ m_data->config.channel_config = MultiChannel;
+
+}
+/*
+template<int bits>
+static inline int32_t scale(float sample)
+{
+ static const int32_t max = (1<<(bits-1))-1;
+
+ // scale
+ sample *= max;
+
+ // round
+ sample += 0.5;
+
+ // clip
+ if (sample > max)
+ sample = max;
+ else
+ if (sample < -max)
+ sample = -max;
+
+ return (int32_t)sample;
+}*/
+
+bool MPCDecoder::readFrame(AudioFrame* frame) {
+ if (!m_data->initialized) initialize();
+
+ int status = m_data->decoder.Decode(m_data->buffer);
+
+ if (status == -1) {
+ m_data->error=true;
+ return false;
+ }
+ if (status == 0) {
+ m_data->eof=true;
+ return false;
+ }
+
+ int channels = m_data->config.channels;
+ long length = status;
+ frame->reserveSpace(&m_data->config, length);
+ m_data->position+=length;
+
+ // Demux into frame
+ /*
+ int16_t** data = (int16_t**)frame->data;
+ for(int i=0; i<length; i++)
+ for(int j=0; j<channels; j++) {
+ data[j][i] = scale<16>(m_data->buffer[i*channels+j]);
+ }*/
+
+ float** data = (float**)frame->data;
+ for(int i=0; i<length; i++)
+ for(int j=0; j<channels; j++)
+ data[j][i] = m_data->buffer[i*channels+j];
+
+ frame->pos = position();
+ return true;
+}
+
+long MPCDecoder::length() {
+ if (!m_data->initialized) return -1;
+ return (long)(m_data->si.GetLength()*1000.0);
+}
+
+long MPCDecoder::position() {
+ if (!m_data->initialized) return -1;
+ float mpcpos = ((float)m_data->position)/(float)m_data->si.simple.SampleFreq;
+ return (long)(mpcpos*1000.0);
+}
+
+bool MPCDecoder::eof() {
+ return m_data->eof;
+}
+
+bool MPCDecoder::error() {
+ return m_data->error;
+}
+
+bool MPCDecoder::seekable() {
+ return m_data->reader.canseek();
+}
+
+bool MPCDecoder::seek(long pos) {
+ if (!m_data->initialized) return false;
+
+ long samplepos = (long)((pos*(float)m_data->si.simple.SampleFreq)/1000.0);
+
+ if (m_data->decoder.SeekSample(samplepos)) {
+ m_data->position = samplepos;
+ return true;
+ }
+ else
+ return false;
+}
+
+const AudioConfiguration* MPCDecoder::audioConfiguration() {
+ return &m_data->config;
+}
+
+} // namespace
+
+//#endif
diff --git a/akode/plugins/mpc_decoder/mpc_decoder.h b/akode/plugins/mpc_decoder/mpc_decoder.h
new file mode 100644
index 0000000..f88eede
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mpc_decoder.h
@@ -0,0 +1,69 @@
+/* aKode: MPC-Decoder
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _AKODE_MPC_DECODER_H
+#define _AKODE_MPC_DECODER_H
+
+#include <config.h>
+//#ifdef AKODE_COMPILE_MPC
+
+#include "decoder.h"
+
+namespace aKode {
+
+class File;
+class AudioBuffer;
+
+class MPCDecoder : public Decoder {
+public:
+ MPCDecoder(File* src);
+ virtual ~MPCDecoder();
+
+ virtual void initialize();
+ virtual bool readFrame(AudioFrame* frame);
+ virtual long length();
+ virtual long position();
+ virtual bool seek(long);
+ virtual bool seekable();
+ virtual bool eof();
+ virtual bool error();
+
+ virtual const AudioConfiguration* audioConfiguration();
+
+ struct private_data;
+private:
+ private_data *m_data;
+};
+
+
+class MPCDecoderPlugin : public DecoderPlugin {
+public:
+ virtual bool canDecode(File*);
+ virtual MPCDecoder* openDecoder(File* src) {
+ return new MPCDecoder(src);
+ };
+};
+
+extern "C" MPCDecoderPlugin mpc_decoder;
+
+} // namespace
+
+//#endif // AKODE_COMPILE_MPC
+#endif
diff --git a/akode/plugins/mpc_decoder/mppdec/Makefile.am b/akode/plugins/mpc_decoder/mppdec/Makefile.am
new file mode 100644
index 0000000..5f6f22a
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mppdec/Makefile.am
@@ -0,0 +1,7 @@
+INCLUDES = -I$(top_srcdir)/akode/lib $(all_includes)
+noinst_LTLIBRARIES = libakode_mppdec.la
+
+libakode_mppdec_la_SOURCES = bitstream.cpp huffsv46.cpp huffsv7.cpp idtag.cpp mpc_dec.cpp requant.cpp streaminfo.cpp synth_filter.cpp
+
+# workaround
+KDE_OPTIONS = nofinal
diff --git a/akode/plugins/mpc_decoder/mppdec/Makefile.in b/akode/plugins/mpc_decoder/mppdec/Makefile.in
new file mode 100644
index 0000000..f4f5971
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mppdec/Makefile.in
@@ -0,0 +1,619 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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@
+
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = akode/plugins/mpc_decoder/mppdec
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/akode/lib/akode_export.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libakode_mppdec_la_LIBADD =
+am_libakode_mppdec_la_OBJECTS = bitstream.lo huffsv46.lo huffsv7.lo \
+ idtag.lo mpc_dec.lo requant.lo streaminfo.lo synth_filter.lo
+#>- libakode_mppdec_la_OBJECTS = $(am_libakode_mppdec_la_OBJECTS)
+#>+ 2
+libakode_mppdec_la_OBJECTS = bitstream.lo huffsv46.lo huffsv7.lo \
+ idtag.lo mpc_dec.lo requant.lo streaminfo.lo synth_filter.lo
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/akode/lib
+depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
+am__depfiles_maybe = depfiles
+#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 2
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+#>- $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 3
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+CXXLD = $(CXX)
+#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+#>+ 2
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libakode_mppdec_la_SOURCES)
+DIST_SOURCES = $(libakode_mppdec_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AKODE_LIBDL = @AKODE_LIBDL@
+ALSA_CFLAGS = @ALSA_CFLAGS@
+ALSA_LIBS = @ALSA_LIBS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVCODEC_CFLAGS = @AVCODEC_CFLAGS@
+AVCODEC_LDFLAGS = @AVCODEC_LDFLAGS@
+AVCODEC_LIBADD = @AVCODEC_LIBADD@
+AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@
+AVFORMAT_LDFLAGS = @AVFORMAT_LDFLAGS@
+AVFORMAT_LIBADD = @AVFORMAT_LIBADD@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LDFLAGS = @JACK_LDFLAGS@
+JACK_LIBADD = @JACK_LIBADD@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBFLAC = @LIBFLAC@
+LIBOBJS = @LIBOBJS@
+LIBOGGFLAC = @LIBOGGFLAC@
+LIBOSSAUDIO = @LIBOSSAUDIO@
+LIBPTHREAD = @LIBPTHREAD@
+LIBS = @LIBS@
+LIBSAMPLERATE = @LIBSAMPLERATE@
+LIBSEM = @LIBSEM@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MADLIBS = @MADLIBS@
+MAKEINFO = @MAKEINFO@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POLYP_CFLAGS = @POLYP_CFLAGS@
+POLYP_LDFLAGS = @POLYP_LDFLAGS@
+POLYP_LIBADD = @POLYP_LIBADD@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPEEXLIBS = @SPEEXLIBS@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+VERSION = @VERSION@
+VORBISFILE_LIBS = @VORBISFILE_LIBS@
+VORBIS_LIBS = @VORBIS_LIBS@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+akode_SUBDIR_included_FALSE = @akode_SUBDIR_included_FALSE@
+akode_SUBDIR_included_TRUE = @akode_SUBDIR_included_TRUE@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+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@
+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@
+include_alsa_sink_FALSE = @include_alsa_sink_FALSE@
+include_alsa_sink_TRUE = @include_alsa_sink_TRUE@
+include_ffmpeg_decoder_FALSE = @include_ffmpeg_decoder_FALSE@
+include_ffmpeg_decoder_TRUE = @include_ffmpeg_decoder_TRUE@
+include_jack_sink_FALSE = @include_jack_sink_FALSE@
+include_jack_sink_TRUE = @include_jack_sink_TRUE@
+include_mpeg_decoder_FALSE = @include_mpeg_decoder_FALSE@
+include_mpeg_decoder_TRUE = @include_mpeg_decoder_TRUE@
+include_oss_sink_FALSE = @include_oss_sink_FALSE@
+include_oss_sink_TRUE = @include_oss_sink_TRUE@
+include_polyp_sink_FALSE = @include_polyp_sink_FALSE@
+include_polyp_sink_TRUE = @include_polyp_sink_TRUE@
+include_src_resampler_FALSE = @include_src_resampler_FALSE@
+include_src_resampler_TRUE = @include_src_resampler_TRUE@
+include_sun_sink_FALSE = @include_sun_sink_FALSE@
+include_sun_sink_TRUE = @include_sun_sink_TRUE@
+include_xiph_decoder_FALSE = @include_xiph_decoder_FALSE@
+include_xiph_decoder_TRUE = @include_xiph_decoder_TRUE@
+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@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+INCLUDES = -I$(top_srcdir)/akode/lib $(all_includes)
+noinst_LTLIBRARIES = libakode_mppdec.la
+libakode_mppdec_la_SOURCES = bitstream.cpp huffsv46.cpp huffsv7.cpp idtag.cpp mpc_dec.cpp requant.cpp streaminfo.cpp synth_filter.cpp
+
+# workaround
+KDE_OPTIONS = nofinal
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/mpc_decoder/mppdec/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu akode/plugins/mpc_decoder/mppdec/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/mpc_decoder/mppdec/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/mpc_decoder/mppdec/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/mpc_decoder/mppdec/Makefile.in
+.PRECIOUS: 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: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+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
+libakode_mppdec.la: $(libakode_mppdec_la_OBJECTS) $(libakode_mppdec_la_DEPENDENCIES)
+ $(CXXLINK) $(libakode_mppdec_la_LDFLAGS) $(libakode_mppdec_la_OBJECTS) $(libakode_mppdec_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitstream.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/huffsv46.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/huffsv7.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idtag.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpc_dec.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/requant.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/streaminfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_filter.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+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: TAGS
+
+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; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+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
+
+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"; \
+ $(mkdir_p) "$(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)
+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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+#>- mostlyclean-am
+#>+ 2
+clean-am: clean-bcheck 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:
+
+html: html-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 html html-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
+
+# 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:
+
+#>+ 2
+KDE_DIST=streaminfo.h stdafx.cpp readme.txt requant.h stdafx.h mpc_dec.h mpc_math.h Makefile.in Makefile.am
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/mpc_decoder/mppdec/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/mpc_decoder/mppdec/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/mpc_decoder/mppdec/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXXCOMPILE) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/akode/plugins/mpc_decoder/mppdec/bitstream.cpp b/akode/plugins/mpc_decoder/mppdec/bitstream.cpp
new file mode 100644
index 0000000..6e1714c
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mppdec/bitstream.cpp
@@ -0,0 +1,166 @@
+#include "stdafx.h"
+
+
+/* C O N S T A N T S */
+const unsigned int mask [33] = {
+ 0x00000000, 0x00000001, 0x00000003, 0x00000007,
+ 0x0000000F, 0x0000001F, 0x0000003F, 0x0000007F,
+ 0x000000FF, 0x000001FF, 0x000003FF, 0x000007FF,
+ 0x00000FFF, 0x00001FFF, 0x00003FFF, 0x00007FFF,
+ 0x0000FFFF, 0x0001FFFF, 0x0003FFFF, 0x0007FFFF,
+ 0x000FFFFF, 0x001FFFFF, 0x003FFFFF, 0x007FFFFF,
+ 0x00FFFFFF, 0x01FFFFFF, 0x03FFFFFF, 0x07FFFFFF,
+ 0x0FFFFFFF, 0x1FFFFFFF, 0x3FFFFFFF, 0x7FFFFFFF,
+ 0xFFFFFFFF
+};
+
+/* F U N C T I O N S */
+
+// resets bitstream decoding
+void
+MPC_decoder::Reset_BitstreamDecode ( void )
+{
+ dword = 0;
+ pos = 0;
+ Zaehler = 0;
+ WordsRead = 0;
+}
+
+// reports the number of read bits
+unsigned int
+MPC_decoder::BitsRead ( void )
+{
+ return 32*WordsRead + pos;
+}
+
+// read desired number of bits out of the bitstream
+unsigned int
+MPC_decoder::Bitstream_read ( const unsigned int bits )
+{
+ unsigned int out = dword;
+
+ pos += bits;
+
+ if (pos<32)
+ {
+ out >>= (32-pos);
+ }
+ else
+ {
+ dword = Speicher[Zaehler=(Zaehler+1)&MEMMASK];
+ pos -= 32;
+ if (pos)
+ {
+ out <<= pos;
+ out |= dword >> (32-pos);
+ }
+ ++WordsRead;
+ }
+
+ return out & mask[bits];
+}
+
+// decode huffman
+int
+MPC_decoder::Huffman_Decode ( const HuffmanTyp* Table )
+{
+ // load preview and decode
+ unsigned int code = dword << pos;
+ if (pos>18) code |= Speicher[(Zaehler+1)&MEMMASK] >> (32-pos);
+ while (code < Table->Code) Table++;
+
+ // set the new position within bitstream without performing a dummy-read
+ if ((pos += Table->Length)>=32)
+ {
+ pos -= 32;
+ dword = Speicher[Zaehler=(Zaehler+1)&MEMMASK];
+ ++WordsRead;
+ }
+
+ return Table->Value;
+}
+
+// faster huffman through previewing less bits
+int
+MPC_decoder::Huffman_Decode_fast ( const HuffmanTyp* Table )
+{
+ // load preview and decode
+ unsigned int code = dword << pos;
+ if (pos>22) code |= Speicher[(Zaehler+1)&MEMMASK] >> (32-pos);
+ while (code < Table->Code) Table++;
+
+ // set the new position within bitstream without performing a dummy-read
+ if ((pos += Table->Length)>=32)
+ {
+ pos -= 32;
+ dword = Speicher[Zaehler=(Zaehler+1)&MEMMASK];
+ ++WordsRead;
+ }
+
+ return Table->Value;
+}
+
+// even faster huffman through previewing even less bits
+int
+MPC_decoder::Huffman_Decode_faster ( const HuffmanTyp* Table )
+{
+ // load preview and decode
+ unsigned int code = dword << pos;
+ if (pos>27) code |= Speicher[(Zaehler+1)&MEMMASK] >> (32-pos);
+ while (code < Table->Code) Table++;
+
+ // set the new position within bitstream without performing a dummy-read
+ if ((pos += Table->Length)>=32)
+ {
+ pos -= 32;
+ dword = Speicher[Zaehler=(Zaehler+1)&MEMMASK];
+ ++WordsRead;
+ }
+
+ return Table->Value;
+}
+
+// decode SCFI-bundle (sv4,5,6)
+void
+MPC_decoder::SCFI_Bundle_read ( const HuffmanTyp* Table, int* SCFI, int* DSCF )
+{
+ // load preview and decode
+ unsigned int code = dword << pos;
+ if (pos>26) code |= Speicher[(Zaehler+1)&MEMMASK] >> (32-pos);
+ while (code < Table->Code) Table++;
+
+ // set the new position within bitstream without performing a dummy-read
+ if ((pos += Table->Length)>=32)
+ {
+ pos -= 32;
+ dword = Speicher[Zaehler=(Zaehler+1)&MEMMASK];
+ ++WordsRead;
+ }
+
+ *SCFI = Table->Value >> 1;
+ *DSCF = Table->Value & 1;
+}
+
+int
+MPC_decoder::HuffmanTyp_cmpfn ( const void* p1, const void* p2 )
+{
+ if ( ((const MPC_decoder::HuffmanTyp*) p1)->Code < ((const MPC_decoder::HuffmanTyp*) p2)->Code ) return +1;
+ if ( ((const MPC_decoder::HuffmanTyp*) p1)->Code > ((const MPC_decoder::HuffmanTyp*) p2)->Code ) return -1;
+ return 0;
+}
+
+// sort huffman-tables by codeword
+// offset resulting value
+void
+MPC_decoder::Resort_HuffTables ( const unsigned int elements, HuffmanTyp* Table, const int offset )
+{
+ unsigned int i;
+
+ for ( i = 0; i < elements; i++ ) {
+ Table[i].Code <<= 32 - Table[i].Length;
+ Table[i].Value = i - offset;
+ }
+ qsort ( Table, elements, sizeof(*Table), HuffmanTyp_cmpfn );
+}
+
+/* end of bitstream.c */
diff --git a/akode/plugins/mpc_decoder/mppdec/huffsv46.cpp b/akode/plugins/mpc_decoder/mppdec/huffsv46.cpp
new file mode 100644
index 0000000..b71f5c9
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mppdec/huffsv46.cpp
@@ -0,0 +1,228 @@
+#include "stdafx.h"
+
+void
+MPC_decoder::Huffman_SV6_Decoder ( void )
+{
+ Huffman_SV6_Encoder ();
+ Resort_HuffTables( 16, Region_A , 0);
+ Resort_HuffTables( 8, Region_B , 0);
+ Resort_HuffTables( 4, Region_C , 0);
+ Resort_HuffTables( 8, SCFI_Bundle , 0);
+ Resort_HuffTables( 13, DSCF_Entropie , 6);
+ Resort_HuffTables( 3, Entropie_1 , Dc[1]);
+ Resort_HuffTables( 5, Entropie_2 , Dc[2]);
+ Resort_HuffTables( 7, Entropie_3 , Dc[3]);
+ Resort_HuffTables( 9, Entropie_4 , Dc[4]);
+ Resort_HuffTables( 15, Entropie_5 , Dc[5]);
+ Resort_HuffTables( 31, Entropie_6 , Dc[6]);
+ Resort_HuffTables( 63, Entropie_7 , Dc[7]);
+}
+
+void MPC_decoder::Huffman_SV6_Encoder ( void )
+{
+ // SCFI-bundle
+ SCFI_Bundle[7].Code= 1; SCFI_Bundle[7].Length= 1;
+ SCFI_Bundle[3].Code= 1; SCFI_Bundle[3].Length= 2;
+ SCFI_Bundle[5].Code= 0; SCFI_Bundle[5].Length= 3;
+ SCFI_Bundle[1].Code= 7; SCFI_Bundle[1].Length= 5;
+ SCFI_Bundle[2].Code= 6; SCFI_Bundle[2].Length= 5;
+ SCFI_Bundle[4].Code= 4; SCFI_Bundle[4].Length= 5;
+ SCFI_Bundle[0].Code= 11; SCFI_Bundle[0].Length= 6;
+ SCFI_Bundle[6].Code= 10; SCFI_Bundle[6].Length= 6;
+
+ // region A (subbands 0..10)
+ Region_A[ 1].Code= 1; Region_A[ 1].Length= 1;
+ Region_A[ 2].Code= 0; Region_A[ 2].Length= 2;
+ Region_A[ 0].Code= 2; Region_A[ 0].Length= 3;
+ Region_A[ 3].Code= 15; Region_A[ 3].Length= 5;
+ Region_A[ 5].Code= 13; Region_A[ 5].Length= 5;
+ Region_A[ 6].Code= 12; Region_A[ 6].Length= 5;
+ Region_A[ 4].Code= 29; Region_A[ 4].Length= 6;
+ Region_A[ 7].Code= 57; Region_A[ 7].Length= 7;
+ Region_A[ 8].Code= 113; Region_A[ 8].Length= 8;
+ Region_A[ 9].Code= 225; Region_A[ 9].Length= 9;
+ Region_A[10].Code= 449; Region_A[10].Length= 10;
+ Region_A[11].Code= 897; Region_A[11].Length= 11;
+ Region_A[12].Code= 1793; Region_A[12].Length= 12;
+ Region_A[13].Code= 3585; Region_A[13].Length= 13;
+ Region_A[14].Code= 7169; Region_A[14].Length= 14;
+ Region_A[15].Code= 7168; Region_A[15].Length= 14;
+
+ // region B (subbands 11..22)
+ Region_B[1].Code= 1; Region_B[1].Length= 1;
+ Region_B[0].Code= 1; Region_B[0].Length= 2;
+ Region_B[2].Code= 1; Region_B[2].Length= 3;
+ Region_B[3].Code= 1; Region_B[3].Length= 4;
+ Region_B[4].Code= 1; Region_B[4].Length= 5;
+ Region_B[5].Code= 1; Region_B[5].Length= 6;
+ Region_B[6].Code= 1; Region_B[6].Length= 7;
+ Region_B[7].Code= 0; Region_B[7].Length= 7;
+
+ // region C (subbands 23..31)
+ Region_C[0].Code= 1; Region_C[0].Length= 1;
+ Region_C[1].Code= 1; Region_C[1].Length= 2;
+ Region_C[2].Code= 1; Region_C[2].Length= 3;
+ Region_C[3].Code= 0; Region_C[3].Length= 3;
+
+ // DSCF
+ DSCF_Entropie[ 6].Code= 0; DSCF_Entropie[ 6].Length= 2;
+ DSCF_Entropie[ 7].Code= 7; DSCF_Entropie[ 7].Length= 3;
+ DSCF_Entropie[ 5].Code= 4; DSCF_Entropie[ 5].Length= 3;
+ DSCF_Entropie[ 8].Code= 3; DSCF_Entropie[ 8].Length= 3;
+ DSCF_Entropie[ 9].Code= 13; DSCF_Entropie[ 9].Length= 4;
+ DSCF_Entropie[ 4].Code= 11; DSCF_Entropie[ 4].Length= 4;
+ DSCF_Entropie[10].Code= 10; DSCF_Entropie[10].Length= 4;
+ DSCF_Entropie[ 2].Code= 4; DSCF_Entropie[ 2].Length= 4;
+ DSCF_Entropie[11].Code= 25; DSCF_Entropie[11].Length= 5;
+ DSCF_Entropie[ 3].Code= 24; DSCF_Entropie[ 3].Length= 5;
+ DSCF_Entropie[ 1].Code= 11; DSCF_Entropie[ 1].Length= 5;
+ DSCF_Entropie[12].Code= 21; DSCF_Entropie[12].Length= 6;
+ DSCF_Entropie[ 0].Code= 20; DSCF_Entropie[ 0].Length= 6;
+
+ // first quantizer
+ Entropie_1[1].Code= 1; Entropie_1[1].Length= 1;
+ Entropie_1[0].Code= 1; Entropie_1[0].Length= 2;
+ Entropie_1[2].Code= 0; Entropie_1[2].Length= 2;
+
+ // second quantizer
+ Entropie_2[2].Code= 3; Entropie_2[2].Length= 2;
+ Entropie_2[3].Code= 1; Entropie_2[3].Length= 2;
+ Entropie_2[1].Code= 0; Entropie_2[1].Length= 2;
+ Entropie_2[4].Code= 5; Entropie_2[4].Length= 3;
+ Entropie_2[0].Code= 4; Entropie_2[0].Length= 3;
+
+ // third quantizer
+ Entropie_3[3].Code= 3; Entropie_3[3].Length= 2;
+ Entropie_3[2].Code= 1; Entropie_3[2].Length= 2;
+ Entropie_3[4].Code= 0; Entropie_3[4].Length= 2;
+ Entropie_3[1].Code= 5; Entropie_3[1].Length= 3;
+ Entropie_3[5].Code= 9; Entropie_3[5].Length= 4;
+ Entropie_3[0].Code= 17; Entropie_3[0].Length= 5;
+ Entropie_3[6].Code= 16; Entropie_3[6].Length= 5;
+
+ // forth quantizer
+ Entropie_4[4].Code= 0; Entropie_4[4].Length= 2;
+ Entropie_4[5].Code= 6; Entropie_4[5].Length= 3;
+ Entropie_4[3].Code= 5; Entropie_4[3].Length= 3;
+ Entropie_4[6].Code= 4; Entropie_4[6].Length= 3;
+ Entropie_4[2].Code= 3; Entropie_4[2].Length= 3;
+ Entropie_4[7].Code= 15; Entropie_4[7].Length= 4;
+ Entropie_4[1].Code= 14; Entropie_4[1].Length= 4;
+ Entropie_4[0].Code= 5; Entropie_4[0].Length= 4;
+ Entropie_4[8].Code= 4; Entropie_4[8].Length= 4;
+
+ // fifth quantizer
+ Entropie_5[7 ].Code= 4; Entropie_5[7 ].Length= 3;
+ Entropie_5[8 ].Code= 3; Entropie_5[8 ].Length= 3;
+ Entropie_5[6 ].Code= 2; Entropie_5[6 ].Length= 3;
+ Entropie_5[9 ].Code= 0; Entropie_5[9 ].Length= 3;
+ Entropie_5[5 ].Code= 15; Entropie_5[5 ].Length= 4;
+ Entropie_5[4 ].Code= 13; Entropie_5[4 ].Length= 4;
+ Entropie_5[10].Code= 12; Entropie_5[10].Length= 4;
+ Entropie_5[11].Code= 10; Entropie_5[11].Length= 4;
+ Entropie_5[3 ].Code= 3; Entropie_5[3 ].Length= 4;
+ Entropie_5[12].Code= 2; Entropie_5[12].Length= 4;
+ Entropie_5[2 ].Code= 29; Entropie_5[2 ].Length= 5;
+ Entropie_5[1 ].Code= 23; Entropie_5[1 ].Length= 5;
+ Entropie_5[13].Code= 22; Entropie_5[13].Length= 5;
+ Entropie_5[0 ].Code= 57; Entropie_5[0 ].Length= 6;
+ Entropie_5[14].Code= 56; Entropie_5[14].Length= 6;
+
+ // sixth quantizer
+ Entropie_6[15].Code= 9; Entropie_6[15].Length= 4;
+ Entropie_6[16].Code= 8; Entropie_6[16].Length= 4;
+ Entropie_6[14].Code= 7; Entropie_6[14].Length= 4;
+ Entropie_6[18].Code= 6; Entropie_6[18].Length= 4;
+ Entropie_6[17].Code= 5; Entropie_6[17].Length= 4;
+ Entropie_6[12].Code= 3; Entropie_6[12].Length= 4;
+ Entropie_6[13].Code= 2; Entropie_6[13].Length= 4;
+ Entropie_6[19].Code= 0; Entropie_6[19].Length= 4;
+ Entropie_6[11].Code= 31; Entropie_6[11].Length= 5;
+ Entropie_6[20].Code= 30; Entropie_6[20].Length= 5;
+ Entropie_6[10].Code= 29; Entropie_6[10].Length= 5;
+ Entropie_6[9 ].Code= 27; Entropie_6[9 ].Length= 5;
+ Entropie_6[21].Code= 26; Entropie_6[21].Length= 5;
+ Entropie_6[22].Code= 25; Entropie_6[22].Length= 5;
+ Entropie_6[8 ].Code= 24; Entropie_6[8 ].Length= 5;
+ Entropie_6[7 ].Code= 23; Entropie_6[7 ].Length= 5;
+ Entropie_6[23].Code= 21; Entropie_6[23].Length= 5;
+ Entropie_6[6 ].Code= 9; Entropie_6[6 ].Length= 5;
+ Entropie_6[24].Code= 3; Entropie_6[24].Length= 5;
+ Entropie_6[25].Code= 57; Entropie_6[25].Length= 6;
+ Entropie_6[5 ].Code= 56; Entropie_6[5 ].Length= 6;
+ Entropie_6[4 ].Code= 45; Entropie_6[4 ].Length= 6;
+ Entropie_6[26].Code= 41; Entropie_6[26].Length= 6;
+ Entropie_6[2 ].Code= 40; Entropie_6[2 ].Length= 6;
+ Entropie_6[27].Code= 17; Entropie_6[27].Length= 6;
+ Entropie_6[28].Code= 16; Entropie_6[28].Length= 6;
+ Entropie_6[3 ].Code= 5; Entropie_6[3 ].Length= 6;
+ Entropie_6[29].Code= 89; Entropie_6[29].Length= 7;
+ Entropie_6[1 ].Code= 88; Entropie_6[1 ].Length= 7;
+ Entropie_6[30].Code= 9; Entropie_6[30].Length= 7;
+ Entropie_6[0 ].Code= 8; Entropie_6[0 ].Length= 7;
+
+ // seventh quantizer
+ Entropie_7[25].Code= 0; Entropie_7[25].Length= 5;
+ Entropie_7[37].Code= 1; Entropie_7[37].Length= 5;
+ Entropie_7[62].Code= 16; Entropie_7[62].Length= 8;
+ Entropie_7[ 0].Code= 17; Entropie_7[ 0].Length= 8;
+ Entropie_7[ 3].Code= 9; Entropie_7[ 3].Length= 7;
+ Entropie_7[ 5].Code= 10; Entropie_7[ 5].Length= 7;
+ Entropie_7[ 6].Code= 11; Entropie_7[ 6].Length= 7;
+ Entropie_7[38].Code= 3; Entropie_7[38].Length= 5;
+ Entropie_7[35].Code= 4; Entropie_7[35].Length= 5;
+ Entropie_7[33].Code= 5; Entropie_7[33].Length= 5;
+ Entropie_7[24].Code= 6; Entropie_7[24].Length= 5;
+ Entropie_7[27].Code= 7; Entropie_7[27].Length= 5;
+ Entropie_7[26].Code= 8; Entropie_7[26].Length= 5;
+ Entropie_7[12].Code= 18; Entropie_7[12].Length= 6;
+ Entropie_7[50].Code= 19; Entropie_7[50].Length= 6;
+ Entropie_7[29].Code= 10; Entropie_7[29].Length= 5;
+ Entropie_7[31].Code= 11; Entropie_7[31].Length= 5;
+ Entropie_7[36].Code= 12; Entropie_7[36].Length= 5;
+ Entropie_7[34].Code= 13; Entropie_7[34].Length= 5;
+ Entropie_7[28].Code= 14; Entropie_7[28].Length= 5;
+ Entropie_7[49].Code= 30; Entropie_7[49].Length= 6;
+ Entropie_7[56].Code= 62; Entropie_7[56].Length= 7;
+ Entropie_7[ 7].Code= 63; Entropie_7[ 7].Length= 7;
+ Entropie_7[32].Code= 16; Entropie_7[32].Length= 5;
+ Entropie_7[30].Code= 17; Entropie_7[30].Length= 5;
+ Entropie_7[13].Code= 36; Entropie_7[13].Length= 6;
+ Entropie_7[55].Code= 74; Entropie_7[55].Length= 7;
+ Entropie_7[61].Code= 150; Entropie_7[61].Length= 8;
+ Entropie_7[ 1].Code= 151; Entropie_7[ 1].Length= 8;
+ Entropie_7[14].Code= 38; Entropie_7[14].Length= 6;
+ Entropie_7[48].Code= 39; Entropie_7[48].Length= 6;
+ Entropie_7[ 4].Code= 80; Entropie_7[ 4].Length= 7;
+ Entropie_7[58].Code= 81; Entropie_7[58].Length= 7;
+ Entropie_7[47].Code= 41; Entropie_7[47].Length= 6;
+ Entropie_7[15].Code= 42; Entropie_7[15].Length= 6;
+ Entropie_7[16].Code= 43; Entropie_7[16].Length= 6;
+ Entropie_7[54].Code= 88; Entropie_7[54].Length= 7;
+ Entropie_7[ 8].Code= 89; Entropie_7[ 8].Length= 7;
+ Entropie_7[17].Code= 45; Entropie_7[17].Length= 6;
+ Entropie_7[46].Code= 46; Entropie_7[46].Length= 6;
+ Entropie_7[45].Code= 47; Entropie_7[45].Length= 6;
+ Entropie_7[53].Code= 96; Entropie_7[53].Length= 7;
+ Entropie_7[ 9].Code= 97; Entropie_7[ 9].Length= 7;
+ Entropie_7[43].Code= 49; Entropie_7[43].Length= 6;
+ Entropie_7[19].Code= 50; Entropie_7[19].Length= 6;
+ Entropie_7[18].Code= 51; Entropie_7[18].Length= 6;
+ Entropie_7[44].Code= 52; Entropie_7[44].Length= 6;
+ Entropie_7[ 2].Code= 212; Entropie_7[ 2].Length= 8;
+ Entropie_7[60].Code= 213; Entropie_7[60].Length= 8;
+ Entropie_7[10].Code= 107; Entropie_7[10].Length= 7;
+ Entropie_7[42].Code= 54; Entropie_7[42].Length= 6;
+ Entropie_7[41].Code= 55; Entropie_7[41].Length= 6;
+ Entropie_7[20].Code= 56; Entropie_7[20].Length= 6;
+ Entropie_7[21].Code= 57; Entropie_7[21].Length= 6;
+ Entropie_7[52].Code= 116; Entropie_7[52].Length= 7;
+ Entropie_7[51].Code= 117; Entropie_7[51].Length= 7;
+ Entropie_7[40].Code= 59; Entropie_7[40].Length= 6;
+ Entropie_7[22].Code= 60; Entropie_7[22].Length= 6;
+ Entropie_7[23].Code= 61; Entropie_7[23].Length= 6;
+ Entropie_7[39].Code= 62; Entropie_7[39].Length= 6;
+ Entropie_7[11].Code= 126; Entropie_7[11].Length= 7;
+ Entropie_7[57].Code= 254; Entropie_7[57].Length= 8;
+ Entropie_7[59].Code= 255; Entropie_7[59].Length= 8;
+}
diff --git a/akode/plugins/mpc_decoder/mppdec/huffsv7.cpp b/akode/plugins/mpc_decoder/mppdec/huffsv7.cpp
new file mode 100644
index 0000000..c0ba0ab
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mppdec/huffsv7.cpp
@@ -0,0 +1,461 @@
+#include "stdafx.h"
+
+void
+MPC_decoder::Huffman_SV7_Decoder ( void )
+{
+ Huffman_SV7_Encoder ();
+ Resort_HuffTables(10, &HuffHdr[0] , 5);
+ Resort_HuffTables( 4, &HuffSCFI[0] , 0);
+ Resort_HuffTables(16, &HuffDSCF[0] , 7);
+ Resort_HuffTables(27, &HuffQ1[0][0] , 0);
+ Resort_HuffTables(27, &HuffQ1[1][0] , 0);
+ Resort_HuffTables(25, &HuffQ2[0][0] , 0);
+ Resort_HuffTables(25, &HuffQ2[1][0] , 0);
+ Resort_HuffTables( 7, &HuffQ3[0][0] , Dc[3]);
+ Resort_HuffTables( 7, &HuffQ3[1][0] , Dc[3]);
+ Resort_HuffTables( 9, &HuffQ4[0][0] , Dc[4]);
+ Resort_HuffTables( 9, &HuffQ4[1][0] , Dc[4]);
+ Resort_HuffTables(15, &HuffQ5[0][0] , Dc[5]);
+ Resort_HuffTables(15, &HuffQ5[1][0] , Dc[5]);
+ Resort_HuffTables(31, &HuffQ6[0][0] , Dc[6]);
+ Resort_HuffTables(31, &HuffQ6[1][0] , Dc[6]);
+ Resort_HuffTables(63, &HuffQ7[0][0] , Dc[7]);
+ Resort_HuffTables(63, &HuffQ7[1][0] , Dc[7]);
+}
+
+void
+MPC_decoder::Huffman_SV7_Encoder ( void )
+{
+ /***************************** SCFI *******************************/
+ HuffSCFI[0].Code = 2; HuffSCFI[0].Length = 3;
+ HuffSCFI[1].Code = 1; HuffSCFI[1].Length = 1;
+ HuffSCFI[2].Code = 3; HuffSCFI[2].Length = 3;
+ HuffSCFI[3].Code = 0; HuffSCFI[3].Length = 2;
+
+ /***************************** DSCF *******************************/
+ HuffDSCF[ 0].Code = 32; HuffDSCF[ 0].Length = 6;
+ HuffDSCF[ 1].Code = 4; HuffDSCF[ 1].Length = 5;
+ HuffDSCF[ 2].Code = 17; HuffDSCF[ 2].Length = 5;
+ HuffDSCF[ 3].Code = 30; HuffDSCF[ 3].Length = 5;
+ HuffDSCF[ 4].Code = 13; HuffDSCF[ 4].Length = 4;
+ HuffDSCF[ 5].Code = 0; HuffDSCF[ 5].Length = 3;
+ HuffDSCF[ 6].Code = 3; HuffDSCF[ 6].Length = 3;
+ HuffDSCF[ 7].Code = 9; HuffDSCF[ 7].Length = 4;
+ HuffDSCF[ 8].Code = 5; HuffDSCF[ 8].Length = 3;
+ HuffDSCF[ 9].Code = 2; HuffDSCF[ 9].Length = 3;
+ HuffDSCF[10].Code = 14; HuffDSCF[10].Length = 4;
+ HuffDSCF[11].Code = 3; HuffDSCF[11].Length = 4;
+ HuffDSCF[12].Code = 31; HuffDSCF[12].Length = 5;
+ HuffDSCF[13].Code = 5; HuffDSCF[13].Length = 5;
+ HuffDSCF[14].Code = 33; HuffDSCF[14].Length = 6;
+ HuffDSCF[15].Code = 12; HuffDSCF[15].Length = 4;
+
+ /************************* frame-header ***************************/
+ /***************** differential quantizer indizes *****************/
+ HuffHdr[0].Code = 92; HuffHdr[0].Length = 8;
+ HuffHdr[1].Code = 47; HuffHdr[1].Length = 7;
+ HuffHdr[2].Code = 10; HuffHdr[2].Length = 5;
+ HuffHdr[3].Code = 4; HuffHdr[3].Length = 4;
+ HuffHdr[4].Code = 0; HuffHdr[4].Length = 2;
+ HuffHdr[5].Code = 1; HuffHdr[5].Length = 1;
+ HuffHdr[6].Code = 3; HuffHdr[6].Length = 3;
+ HuffHdr[7].Code = 22; HuffHdr[7].Length = 6;
+ HuffHdr[8].Code = 187; HuffHdr[8].Length = 9;
+ HuffHdr[9].Code = 186; HuffHdr[9].Length = 9;
+
+ /********************** 3-step quantizer **************************/
+ /********************* 3 bundled samples **************************/
+ //less shaped, book 0
+ HuffQ1[0][ 0].Code = 54; HuffQ1[0][ 0].Length = 6;
+ HuffQ1[0][ 1].Code = 9; HuffQ1[0][ 1].Length = 5;
+ HuffQ1[0][ 2].Code = 32; HuffQ1[0][ 2].Length = 6;
+ HuffQ1[0][ 3].Code = 5; HuffQ1[0][ 3].Length = 5;
+ HuffQ1[0][ 4].Code = 10; HuffQ1[0][ 4].Length = 4;
+ HuffQ1[0][ 5].Code = 7; HuffQ1[0][ 5].Length = 5;
+ HuffQ1[0][ 6].Code = 52; HuffQ1[0][ 6].Length = 6;
+ HuffQ1[0][ 7].Code = 0; HuffQ1[0][ 7].Length = 5;
+ HuffQ1[0][ 8].Code = 35; HuffQ1[0][ 8].Length = 6;
+ HuffQ1[0][ 9].Code = 10; HuffQ1[0][ 9].Length = 5;
+ HuffQ1[0][10].Code = 6; HuffQ1[0][10].Length = 4;
+ HuffQ1[0][11].Code = 4; HuffQ1[0][11].Length = 5;
+ HuffQ1[0][12].Code = 11; HuffQ1[0][12].Length = 4;
+ HuffQ1[0][13].Code = 7; HuffQ1[0][13].Length = 3;
+ HuffQ1[0][14].Code = 12; HuffQ1[0][14].Length = 4;
+ HuffQ1[0][15].Code = 3; HuffQ1[0][15].Length = 5;
+ HuffQ1[0][16].Code = 7; HuffQ1[0][16].Length = 4;
+ HuffQ1[0][17].Code = 11; HuffQ1[0][17].Length = 5;
+ HuffQ1[0][18].Code = 34; HuffQ1[0][18].Length = 6;
+ HuffQ1[0][19].Code = 1; HuffQ1[0][19].Length = 5;
+ HuffQ1[0][20].Code = 53; HuffQ1[0][20].Length = 6;
+ HuffQ1[0][21].Code = 6; HuffQ1[0][21].Length = 5;
+ HuffQ1[0][22].Code = 9; HuffQ1[0][22].Length = 4;
+ HuffQ1[0][23].Code = 2; HuffQ1[0][23].Length = 5;
+ HuffQ1[0][24].Code = 33; HuffQ1[0][24].Length = 6;
+ HuffQ1[0][25].Code = 8; HuffQ1[0][25].Length = 5;
+ HuffQ1[0][26].Code = 55; HuffQ1[0][26].Length = 6;
+
+ //more shaped, book 1
+ HuffQ1[1][ 0].Code = 103; HuffQ1[1][ 0].Length = 8;
+ HuffQ1[1][ 1].Code = 62; HuffQ1[1][ 1].Length = 7;
+ HuffQ1[1][ 2].Code = 225; HuffQ1[1][ 2].Length = 9;
+ HuffQ1[1][ 3].Code = 55; HuffQ1[1][ 3].Length = 7;
+ HuffQ1[1][ 4].Code = 3; HuffQ1[1][ 4].Length = 4;
+ HuffQ1[1][ 5].Code = 52; HuffQ1[1][ 5].Length = 7;
+ HuffQ1[1][ 6].Code = 101; HuffQ1[1][ 6].Length = 8;
+ HuffQ1[1][ 7].Code = 60; HuffQ1[1][ 7].Length = 7;
+ HuffQ1[1][ 8].Code = 227; HuffQ1[1][ 8].Length = 9;
+ HuffQ1[1][ 9].Code = 24; HuffQ1[1][ 9].Length = 6;
+ HuffQ1[1][10].Code = 0; HuffQ1[1][10].Length = 4;
+ HuffQ1[1][11].Code = 61; HuffQ1[1][11].Length = 7;
+ HuffQ1[1][12].Code = 4; HuffQ1[1][12].Length = 4;
+ HuffQ1[1][13].Code = 1; HuffQ1[1][13].Length = 1;
+ HuffQ1[1][14].Code = 5; HuffQ1[1][14].Length = 4;
+ HuffQ1[1][15].Code = 63; HuffQ1[1][15].Length = 7;
+ HuffQ1[1][16].Code = 1; HuffQ1[1][16].Length = 4;
+ HuffQ1[1][17].Code = 59; HuffQ1[1][17].Length = 7;
+ HuffQ1[1][18].Code = 226; HuffQ1[1][18].Length = 9;
+ HuffQ1[1][19].Code = 57; HuffQ1[1][19].Length = 7;
+ HuffQ1[1][20].Code = 100; HuffQ1[1][20].Length = 8;
+ HuffQ1[1][21].Code = 53; HuffQ1[1][21].Length = 7;
+ HuffQ1[1][22].Code = 2; HuffQ1[1][22].Length = 4;
+ HuffQ1[1][23].Code = 54; HuffQ1[1][23].Length = 7;
+ HuffQ1[1][24].Code = 224; HuffQ1[1][24].Length = 9;
+ HuffQ1[1][25].Code = 58; HuffQ1[1][25].Length = 7;
+ HuffQ1[1][26].Code = 102; HuffQ1[1][26].Length = 8;
+
+ /********************** 5-step quantizer **************************/
+ /********************* 2 bundled samples **************************/
+ //less shaped, book 0
+ HuffQ2[0][ 0].Code = 89; HuffQ2[0][ 0].Length = 7;
+ HuffQ2[0][ 1].Code = 47; HuffQ2[0][ 1].Length = 6;
+ HuffQ2[0][ 2].Code = 15; HuffQ2[0][ 2].Length = 5;
+ HuffQ2[0][ 3].Code = 0; HuffQ2[0][ 3].Length = 5;
+ HuffQ2[0][ 4].Code = 91; HuffQ2[0][ 4].Length = 7;
+ HuffQ2[0][ 5].Code = 4; HuffQ2[0][ 5].Length = 5;
+ HuffQ2[0][ 6].Code = 6; HuffQ2[0][ 6].Length = 4;
+ HuffQ2[0][ 7].Code = 13; HuffQ2[0][ 7].Length = 4;
+ HuffQ2[0][ 8].Code = 4; HuffQ2[0][ 8].Length = 4;
+ HuffQ2[0][ 9].Code = 5; HuffQ2[0][ 9].Length = 5;
+ HuffQ2[0][10].Code = 20; HuffQ2[0][10].Length = 5;
+ HuffQ2[0][11].Code = 12; HuffQ2[0][11].Length = 4;
+ HuffQ2[0][12].Code = 4; HuffQ2[0][12].Length = 3;
+ HuffQ2[0][13].Code = 15; HuffQ2[0][13].Length = 4;
+ HuffQ2[0][14].Code = 14; HuffQ2[0][14].Length = 5;
+ HuffQ2[0][15].Code = 3; HuffQ2[0][15].Length = 5;
+ HuffQ2[0][16].Code = 3; HuffQ2[0][16].Length = 4;
+ HuffQ2[0][17].Code = 14; HuffQ2[0][17].Length = 4;
+ HuffQ2[0][18].Code = 5; HuffQ2[0][18].Length = 4;
+ HuffQ2[0][19].Code = 1; HuffQ2[0][19].Length = 5;
+ HuffQ2[0][20].Code = 90; HuffQ2[0][20].Length = 7;
+ HuffQ2[0][21].Code = 2; HuffQ2[0][21].Length = 5;
+ HuffQ2[0][22].Code = 21; HuffQ2[0][22].Length = 5;
+ HuffQ2[0][23].Code = 46; HuffQ2[0][23].Length = 6;
+ HuffQ2[0][24].Code = 88; HuffQ2[0][24].Length = 7;
+
+ //more shaped, book 1
+ HuffQ2[1][ 0].Code = 921; HuffQ2[1][ 0].Length = 10;
+ HuffQ2[1][ 1].Code = 113; HuffQ2[1][ 1].Length = 7;
+ HuffQ2[1][ 2].Code = 51; HuffQ2[1][ 2].Length = 6;
+ HuffQ2[1][ 3].Code = 231; HuffQ2[1][ 3].Length = 8;
+ HuffQ2[1][ 4].Code = 922; HuffQ2[1][ 4].Length = 10;
+ HuffQ2[1][ 5].Code = 104; HuffQ2[1][ 5].Length = 7;
+ HuffQ2[1][ 6].Code = 30; HuffQ2[1][ 6].Length = 5;
+ HuffQ2[1][ 7].Code = 0; HuffQ2[1][ 7].Length = 3;
+ HuffQ2[1][ 8].Code = 29; HuffQ2[1][ 8].Length = 5;
+ HuffQ2[1][ 9].Code = 105; HuffQ2[1][ 9].Length = 7;
+ HuffQ2[1][10].Code = 50; HuffQ2[1][10].Length = 6;
+ HuffQ2[1][11].Code = 1; HuffQ2[1][11].Length = 3;
+ HuffQ2[1][12].Code = 2; HuffQ2[1][12].Length = 2;
+ HuffQ2[1][13].Code = 3; HuffQ2[1][13].Length = 3;
+ HuffQ2[1][14].Code = 49; HuffQ2[1][14].Length = 6;
+ HuffQ2[1][15].Code = 107; HuffQ2[1][15].Length = 7;
+ HuffQ2[1][16].Code = 27; HuffQ2[1][16].Length = 5;
+ HuffQ2[1][17].Code = 2; HuffQ2[1][17].Length = 3;
+ HuffQ2[1][18].Code = 31; HuffQ2[1][18].Length = 5;
+ HuffQ2[1][19].Code = 112; HuffQ2[1][19].Length = 7;
+ HuffQ2[1][20].Code = 920; HuffQ2[1][20].Length = 10;
+ HuffQ2[1][21].Code = 106; HuffQ2[1][21].Length = 7;
+ HuffQ2[1][22].Code = 48; HuffQ2[1][22].Length = 6;
+ HuffQ2[1][23].Code = 114; HuffQ2[1][23].Length = 7;
+ HuffQ2[1][24].Code = 923; HuffQ2[1][24].Length = 10;
+
+ /********************** 7-step quantizer **************************/
+ /*********************** single samples ***************************/
+ //less shaped, book 0
+ HuffQ3[0][0].Code = 12; HuffQ3[0][0].Length = 4;
+ HuffQ3[0][1].Code = 4; HuffQ3[0][1].Length = 3;
+ HuffQ3[0][2].Code = 0; HuffQ3[0][2].Length = 2;
+ HuffQ3[0][3].Code = 1; HuffQ3[0][3].Length = 2;
+ HuffQ3[0][4].Code = 7; HuffQ3[0][4].Length = 3;
+ HuffQ3[0][5].Code = 5; HuffQ3[0][5].Length = 3;
+ HuffQ3[0][6].Code = 13; HuffQ3[0][6].Length = 4;
+
+ //more shaped, book 1
+ HuffQ3[1][0].Code = 4; HuffQ3[1][0].Length = 5;
+ HuffQ3[1][1].Code = 3; HuffQ3[1][1].Length = 4;
+ HuffQ3[1][2].Code = 2; HuffQ3[1][2].Length = 2;
+ HuffQ3[1][3].Code = 3; HuffQ3[1][3].Length = 2;
+ HuffQ3[1][4].Code = 1; HuffQ3[1][4].Length = 2;
+ HuffQ3[1][5].Code = 0; HuffQ3[1][5].Length = 3;
+ HuffQ3[1][6].Code = 5; HuffQ3[1][6].Length = 5;
+
+ /********************** 9-step quantizer **************************/
+ /*********************** single samples ***************************/
+ //less shaped, book 0
+ HuffQ4[0][0].Code = 5; HuffQ4[0][0].Length = 4;
+ HuffQ4[0][1].Code = 0; HuffQ4[0][1].Length = 3;
+ HuffQ4[0][2].Code = 4; HuffQ4[0][2].Length = 3;
+ HuffQ4[0][3].Code = 6; HuffQ4[0][3].Length = 3;
+ HuffQ4[0][4].Code = 7; HuffQ4[0][4].Length = 3;
+ HuffQ4[0][5].Code = 5; HuffQ4[0][5].Length = 3;
+ HuffQ4[0][6].Code = 3; HuffQ4[0][6].Length = 3;
+ HuffQ4[0][7].Code = 1; HuffQ4[0][7].Length = 3;
+ HuffQ4[0][8].Code = 4; HuffQ4[0][8].Length = 4;
+
+ //more shaped, book 1
+ HuffQ4[1][0].Code = 9; HuffQ4[1][0].Length = 5;
+ HuffQ4[1][1].Code = 12; HuffQ4[1][1].Length = 4;
+ HuffQ4[1][2].Code = 3; HuffQ4[1][2].Length = 3;
+ HuffQ4[1][3].Code = 0; HuffQ4[1][3].Length = 2;
+ HuffQ4[1][4].Code = 2; HuffQ4[1][4].Length = 2;
+ HuffQ4[1][5].Code = 7; HuffQ4[1][5].Length = 3;
+ HuffQ4[1][6].Code = 13; HuffQ4[1][6].Length = 4;
+ HuffQ4[1][7].Code = 5; HuffQ4[1][7].Length = 4;
+ HuffQ4[1][8].Code = 8; HuffQ4[1][8].Length = 5;
+
+ /********************* 15-step quantizer **************************/
+ /*********************** single samples ***************************/
+ //less shaped, book 0
+ HuffQ5[0][ 0].Code = 57; HuffQ5[0][ 0].Length = 6;
+ HuffQ5[0][ 1].Code = 23; HuffQ5[0][ 1].Length = 5;
+ HuffQ5[0][ 2].Code = 8; HuffQ5[0][ 2].Length = 4;
+ HuffQ5[0][ 3].Code = 10; HuffQ5[0][ 3].Length = 4;
+ HuffQ5[0][ 4].Code = 13; HuffQ5[0][ 4].Length = 4;
+ HuffQ5[0][ 5].Code = 0; HuffQ5[0][ 5].Length = 3;
+ HuffQ5[0][ 6].Code = 2; HuffQ5[0][ 6].Length = 3;
+ HuffQ5[0][ 7].Code = 3; HuffQ5[0][ 7].Length = 3;
+ HuffQ5[0][ 8].Code = 1; HuffQ5[0][ 8].Length = 3;
+ HuffQ5[0][ 9].Code = 15; HuffQ5[0][ 9].Length = 4;
+ HuffQ5[0][10].Code = 12; HuffQ5[0][10].Length = 4;
+ HuffQ5[0][11].Code = 9; HuffQ5[0][11].Length = 4;
+ HuffQ5[0][12].Code = 29; HuffQ5[0][12].Length = 5;
+ HuffQ5[0][13].Code = 22; HuffQ5[0][13].Length = 5;
+ HuffQ5[0][14].Code = 56; HuffQ5[0][14].Length = 6;
+
+ //more shaped, book 1
+ HuffQ5[1][ 0].Code = 229; HuffQ5[1][ 0].Length = 8;
+ HuffQ5[1][ 1].Code = 56; HuffQ5[1][ 1].Length = 6;
+ HuffQ5[1][ 2].Code = 7; HuffQ5[1][ 2].Length = 5;
+ HuffQ5[1][ 3].Code = 2; HuffQ5[1][ 3].Length = 4;
+ HuffQ5[1][ 4].Code = 0; HuffQ5[1][ 4].Length = 3;
+ HuffQ5[1][ 5].Code = 3; HuffQ5[1][ 5].Length = 3;
+ HuffQ5[1][ 6].Code = 5; HuffQ5[1][ 6].Length = 3;
+ HuffQ5[1][ 7].Code = 6; HuffQ5[1][ 7].Length = 3;
+ HuffQ5[1][ 8].Code = 4; HuffQ5[1][ 8].Length = 3;
+ HuffQ5[1][ 9].Code = 2; HuffQ5[1][ 9].Length = 3;
+ HuffQ5[1][10].Code = 15; HuffQ5[1][10].Length = 4;
+ HuffQ5[1][11].Code = 29; HuffQ5[1][11].Length = 5;
+ HuffQ5[1][12].Code = 6; HuffQ5[1][12].Length = 5;
+ HuffQ5[1][13].Code = 115; HuffQ5[1][13].Length = 7;
+ HuffQ5[1][14].Code = 228; HuffQ5[1][14].Length = 8;
+
+ /********************* 31-step quantizer **************************/
+ /*********************** single samples ***************************/
+ //less shaped, book 0
+ HuffQ6[0][ 0].Code = 65; HuffQ6[0][ 0].Length = 7;
+ HuffQ6[0][ 1].Code = 6; HuffQ6[0][ 1].Length = 6;
+ HuffQ6[0][ 2].Code = 44; HuffQ6[0][ 2].Length = 6;
+ HuffQ6[0][ 3].Code = 45; HuffQ6[0][ 3].Length = 6;
+ HuffQ6[0][ 4].Code = 59; HuffQ6[0][ 4].Length = 6;
+ HuffQ6[0][ 5].Code = 13; HuffQ6[0][ 5].Length = 5;
+ HuffQ6[0][ 6].Code = 17; HuffQ6[0][ 6].Length = 5;
+ HuffQ6[0][ 7].Code = 19; HuffQ6[0][ 7].Length = 5;
+ HuffQ6[0][ 8].Code = 23; HuffQ6[0][ 8].Length = 5;
+ HuffQ6[0][ 9].Code = 21; HuffQ6[0][ 9].Length = 5;
+ HuffQ6[0][10].Code = 26; HuffQ6[0][10].Length = 5;
+ HuffQ6[0][11].Code = 30; HuffQ6[0][11].Length = 5;
+ HuffQ6[0][12].Code = 0; HuffQ6[0][12].Length = 4;
+ HuffQ6[0][13].Code = 2; HuffQ6[0][13].Length = 4;
+ HuffQ6[0][14].Code = 5; HuffQ6[0][14].Length = 4;
+ HuffQ6[0][15].Code = 7; HuffQ6[0][15].Length = 4;
+ HuffQ6[0][16].Code = 3; HuffQ6[0][16].Length = 4;
+ HuffQ6[0][17].Code = 4; HuffQ6[0][17].Length = 4;
+ HuffQ6[0][18].Code = 31; HuffQ6[0][18].Length = 5;
+ HuffQ6[0][19].Code = 28; HuffQ6[0][19].Length = 5;
+ HuffQ6[0][20].Code = 25; HuffQ6[0][20].Length = 5;
+ HuffQ6[0][21].Code = 27; HuffQ6[0][21].Length = 5;
+ HuffQ6[0][22].Code = 24; HuffQ6[0][22].Length = 5;
+ HuffQ6[0][23].Code = 20; HuffQ6[0][23].Length = 5;
+ HuffQ6[0][24].Code = 18; HuffQ6[0][24].Length = 5;
+ HuffQ6[0][25].Code = 12; HuffQ6[0][25].Length = 5;
+ HuffQ6[0][26].Code = 2; HuffQ6[0][26].Length = 5;
+ HuffQ6[0][27].Code = 58; HuffQ6[0][27].Length = 6;
+ HuffQ6[0][28].Code = 33; HuffQ6[0][28].Length = 6;
+ HuffQ6[0][29].Code = 7; HuffQ6[0][29].Length = 6;
+ HuffQ6[0][30].Code = 64; HuffQ6[0][30].Length = 7;
+
+ //more shaped, book 1
+ HuffQ6[1][ 0].Code = 6472; HuffQ6[1][ 0].Length = 13;
+ HuffQ6[1][ 1].Code = 6474; HuffQ6[1][ 1].Length = 13;
+ HuffQ6[1][ 2].Code = 808; HuffQ6[1][ 2].Length = 10;
+ HuffQ6[1][ 3].Code = 405; HuffQ6[1][ 3].Length = 9;
+ HuffQ6[1][ 4].Code = 203; HuffQ6[1][ 4].Length = 8;
+ HuffQ6[1][ 5].Code = 102; HuffQ6[1][ 5].Length = 7;
+ HuffQ6[1][ 6].Code = 49; HuffQ6[1][ 6].Length = 6;
+ HuffQ6[1][ 7].Code = 9; HuffQ6[1][ 7].Length = 5;
+ HuffQ6[1][ 8].Code = 15; HuffQ6[1][ 8].Length = 5;
+ HuffQ6[1][ 9].Code = 31; HuffQ6[1][ 9].Length = 5;
+ HuffQ6[1][10].Code = 2; HuffQ6[1][10].Length = 4;
+ HuffQ6[1][11].Code = 6; HuffQ6[1][11].Length = 4;
+ HuffQ6[1][12].Code = 8; HuffQ6[1][12].Length = 4;
+ HuffQ6[1][13].Code = 11; HuffQ6[1][13].Length = 4;
+ HuffQ6[1][14].Code = 13; HuffQ6[1][14].Length = 4;
+ HuffQ6[1][15].Code = 0; HuffQ6[1][15].Length = 3;
+ HuffQ6[1][16].Code = 14; HuffQ6[1][16].Length = 4;
+ HuffQ6[1][17].Code = 10; HuffQ6[1][17].Length = 4;
+ HuffQ6[1][18].Code = 9; HuffQ6[1][18].Length = 4;
+ HuffQ6[1][19].Code = 5; HuffQ6[1][19].Length = 4;
+ HuffQ6[1][20].Code = 3; HuffQ6[1][20].Length = 4;
+ HuffQ6[1][21].Code = 30; HuffQ6[1][21].Length = 5;
+ HuffQ6[1][22].Code = 14; HuffQ6[1][22].Length = 5;
+ HuffQ6[1][23].Code = 8; HuffQ6[1][23].Length = 5;
+ HuffQ6[1][24].Code = 48; HuffQ6[1][24].Length = 6;
+ HuffQ6[1][25].Code = 103; HuffQ6[1][25].Length = 7;
+ HuffQ6[1][26].Code = 201; HuffQ6[1][26].Length = 8;
+ HuffQ6[1][27].Code = 200; HuffQ6[1][27].Length = 8;
+ HuffQ6[1][28].Code = 1619; HuffQ6[1][28].Length = 11;
+ HuffQ6[1][29].Code = 6473; HuffQ6[1][29].Length = 13;
+ HuffQ6[1][30].Code = 6475; HuffQ6[1][30].Length = 13;
+
+ /********************* 63-step quantizer **************************/
+ /*********************** single samples ***************************/
+ //less shaped, book 0
+ HuffQ7[0][ 0].Code = 103; HuffQ7[0][ 0].Length = 8; /* 0.003338 - 01100111 */
+ HuffQ7[0][ 1].Code = 153; HuffQ7[0][ 1].Length = 8; /* 0.003766 - 10011001 */
+ HuffQ7[0][ 2].Code = 181; HuffQ7[0][ 2].Length = 8; /* 0.004715 - 10110101 */
+ HuffQ7[0][ 3].Code = 233; HuffQ7[0][ 3].Length = 8; /* 0.005528 - 11101001 */
+ HuffQ7[0][ 4].Code = 64; HuffQ7[0][ 4].Length = 7; /* 0.006677 - 1000000 */
+ HuffQ7[0][ 5].Code = 65; HuffQ7[0][ 5].Length = 7; /* 0.007041 - 1000001 */
+ HuffQ7[0][ 6].Code = 77; HuffQ7[0][ 6].Length = 7; /* 0.007733 - 1001101 */
+ HuffQ7[0][ 7].Code = 81; HuffQ7[0][ 7].Length = 7; /* 0.008296 - 1010001 */
+ HuffQ7[0][ 8].Code = 91; HuffQ7[0][ 8].Length = 7; /* 0.009295 - 1011011 */
+ HuffQ7[0][ 9].Code = 113; HuffQ7[0][ 9].Length = 7; /* 0.010814 - 1110001 */
+ HuffQ7[0][10].Code = 112; HuffQ7[0][10].Length = 7; /* 0.010807 - 1110000 */
+ HuffQ7[0][11].Code = 24; HuffQ7[0][11].Length = 6; /* 0.012748 - 011000 */
+ HuffQ7[0][12].Code = 29; HuffQ7[0][12].Length = 6; /* 0.013390 - 011101 */
+ HuffQ7[0][13].Code = 35; HuffQ7[0][13].Length = 6; /* 0.014224 - 100011 */
+ HuffQ7[0][14].Code = 37; HuffQ7[0][14].Length = 6; /* 0.015201 - 100101 */
+ HuffQ7[0][15].Code = 41; HuffQ7[0][15].Length = 6; /* 0.016642 - 101001 */
+ HuffQ7[0][16].Code = 44; HuffQ7[0][16].Length = 6; /* 0.017292 - 101100 */
+ HuffQ7[0][17].Code = 46; HuffQ7[0][17].Length = 6; /* 0.018647 - 101110 */
+ HuffQ7[0][18].Code = 51; HuffQ7[0][18].Length = 6; /* 0.020473 - 110011 */
+ HuffQ7[0][19].Code = 49; HuffQ7[0][19].Length = 6; /* 0.020152 - 110001 */
+ HuffQ7[0][20].Code = 54; HuffQ7[0][20].Length = 6; /* 0.021315 - 110110 */
+ HuffQ7[0][21].Code = 55; HuffQ7[0][21].Length = 6; /* 0.021358 - 110111 */
+ HuffQ7[0][22].Code = 57; HuffQ7[0][22].Length = 6; /* 0.021700 - 111001 */
+ HuffQ7[0][23].Code = 60; HuffQ7[0][23].Length = 6; /* 0.022449 - 111100 */
+ HuffQ7[0][24].Code = 0; HuffQ7[0][24].Length = 5; /* 0.023063 - 00000 */
+ HuffQ7[0][25].Code = 2; HuffQ7[0][25].Length = 5; /* 0.023854 - 00010 */
+ HuffQ7[0][26].Code = 10; HuffQ7[0][26].Length = 5; /* 0.025481 - 01010 */
+ HuffQ7[0][27].Code = 5; HuffQ7[0][27].Length = 5; /* 0.024867 - 00101 */
+ HuffQ7[0][28].Code = 9; HuffQ7[0][28].Length = 5; /* 0.025352 - 01001 */
+ HuffQ7[0][29].Code = 6; HuffQ7[0][29].Length = 5; /* 0.025074 - 00110 */
+ HuffQ7[0][30].Code = 13; HuffQ7[0][30].Length = 5; /* 0.025745 - 01101 */
+ HuffQ7[0][31].Code = 7; HuffQ7[0][31].Length = 5; /* 0.025195 - 00111 */
+ HuffQ7[0][32].Code = 11; HuffQ7[0][32].Length = 5; /* 0.025502 - 01011 */
+ HuffQ7[0][33].Code = 15; HuffQ7[0][33].Length = 5; /* 0.026251 - 01111 */
+ HuffQ7[0][34].Code = 8; HuffQ7[0][34].Length = 5; /* 0.025260 - 01000 */
+ HuffQ7[0][35].Code = 4; HuffQ7[0][35].Length = 5; /* 0.024418 - 00100 */
+ HuffQ7[0][36].Code = 3; HuffQ7[0][36].Length = 5; /* 0.023983 - 00011 */
+ HuffQ7[0][37].Code = 1; HuffQ7[0][37].Length = 5; /* 0.023697 - 00001 */
+ HuffQ7[0][38].Code = 63; HuffQ7[0][38].Length = 6; /* 0.023041 - 111111 */
+ HuffQ7[0][39].Code = 62; HuffQ7[0][39].Length = 6; /* 0.022656 - 111110 */
+ HuffQ7[0][40].Code = 61; HuffQ7[0][40].Length = 6; /* 0.022549 - 111101 */
+ HuffQ7[0][41].Code = 53; HuffQ7[0][41].Length = 6; /* 0.021151 - 110101 */
+ HuffQ7[0][42].Code = 59; HuffQ7[0][42].Length = 6; /* 0.022042 - 111011 */
+ HuffQ7[0][43].Code = 52; HuffQ7[0][43].Length = 6; /* 0.020837 - 110100 */
+ HuffQ7[0][44].Code = 48; HuffQ7[0][44].Length = 6; /* 0.019446 - 110000 */
+ HuffQ7[0][45].Code = 47; HuffQ7[0][45].Length = 6; /* 0.019189 - 101111 */
+ HuffQ7[0][46].Code = 43; HuffQ7[0][46].Length = 6; /* 0.017177 - 101011 */
+ HuffQ7[0][47].Code = 42; HuffQ7[0][47].Length = 6; /* 0.017035 - 101010 */
+ HuffQ7[0][48].Code = 39; HuffQ7[0][48].Length = 6; /* 0.015287 - 100111 */
+ HuffQ7[0][49].Code = 36; HuffQ7[0][49].Length = 6; /* 0.014559 - 100100 */
+ HuffQ7[0][50].Code = 33; HuffQ7[0][50].Length = 6; /* 0.014117 - 100001 */
+ HuffQ7[0][51].Code = 28; HuffQ7[0][51].Length = 6; /* 0.012776 - 011100 */
+ HuffQ7[0][52].Code = 117; HuffQ7[0][52].Length = 7; /* 0.011107 - 1110101 */
+ HuffQ7[0][53].Code = 101; HuffQ7[0][53].Length = 7; /* 0.010636 - 1100101 */
+ HuffQ7[0][54].Code = 100; HuffQ7[0][54].Length = 7; /* 0.009751 - 1100100 */
+ HuffQ7[0][55].Code = 80; HuffQ7[0][55].Length = 7; /* 0.008132 - 1010000 */
+ HuffQ7[0][56].Code = 69; HuffQ7[0][56].Length = 7; /* 0.007091 - 1000101 */
+ HuffQ7[0][57].Code = 68; HuffQ7[0][57].Length = 7; /* 0.007084 - 1000100 */
+ HuffQ7[0][58].Code = 50; HuffQ7[0][58].Length = 7; /* 0.006277 - 0110010 */
+ HuffQ7[0][59].Code = 232; HuffQ7[0][59].Length = 8; /* 0.005386 - 11101000 */
+ HuffQ7[0][60].Code = 180; HuffQ7[0][60].Length = 8; /* 0.004408 - 10110100 */
+ HuffQ7[0][61].Code = 152; HuffQ7[0][61].Length = 8; /* 0.003759 - 10011000 */
+ HuffQ7[0][62].Code = 102; HuffQ7[0][62].Length = 8; /* 0.003160 - 01100110 */
+
+ //more shaped, book 1
+ HuffQ7[1][ 0].Code = 14244; HuffQ7[1][ 0].Length = 14; /* 0.000059 - 11011110100100 */
+ HuffQ7[1][ 1].Code = 14253; HuffQ7[1][ 1].Length = 14; /* 0.000098 - 11011110101101 */
+ HuffQ7[1][ 2].Code = 14246; HuffQ7[1][ 2].Length = 14; /* 0.000078 - 11011110100110 */
+ HuffQ7[1][ 3].Code = 14254; HuffQ7[1][ 3].Length = 14; /* 0.000111 - 11011110101110 */
+ HuffQ7[1][ 4].Code = 3562; HuffQ7[1][ 4].Length = 12; /* 0.000320 - 110111101010 */
+ HuffQ7[1][ 5].Code = 752; HuffQ7[1][ 5].Length = 10; /* 0.000920 - 1011110000 */
+ HuffQ7[1][ 6].Code = 753; HuffQ7[1][ 6].Length = 10; /* 0.001057 - 1011110001 */
+ HuffQ7[1][ 7].Code = 160; HuffQ7[1][ 7].Length = 9; /* 0.001403 - 010100000 */
+ HuffQ7[1][ 8].Code = 162; HuffQ7[1][ 8].Length = 9; /* 0.001579 - 010100010 */
+ HuffQ7[1][ 9].Code = 444; HuffQ7[1][ 9].Length = 9; /* 0.002486 - 110111100 */
+ HuffQ7[1][10].Code = 122; HuffQ7[1][10].Length = 8; /* 0.003772 - 01111010 */
+ HuffQ7[1][11].Code = 223; HuffQ7[1][11].Length = 8; /* 0.005710 - 11011111 */
+ HuffQ7[1][12].Code = 60; HuffQ7[1][12].Length = 7; /* 0.006858 - 0111100 */
+ HuffQ7[1][13].Code = 73; HuffQ7[1][13].Length = 7; /* 0.008033 - 1001001 */
+ HuffQ7[1][14].Code = 110; HuffQ7[1][14].Length = 7; /* 0.009827 - 1101110 */
+ HuffQ7[1][15].Code = 14; HuffQ7[1][15].Length = 6; /* 0.012601 - 001110 */
+ HuffQ7[1][16].Code = 24; HuffQ7[1][16].Length = 6; /* 0.013194 - 011000 */
+ HuffQ7[1][17].Code = 25; HuffQ7[1][17].Length = 6; /* 0.013938 - 011001 */
+ HuffQ7[1][18].Code = 34; HuffQ7[1][18].Length = 6; /* 0.015693 - 100010 */
+ HuffQ7[1][19].Code = 37; HuffQ7[1][19].Length = 6; /* 0.017846 - 100101 */
+ HuffQ7[1][20].Code = 54; HuffQ7[1][20].Length = 6; /* 0.020078 - 110110 */
+ HuffQ7[1][21].Code = 3; HuffQ7[1][21].Length = 5; /* 0.022975 - 00011 */
+ HuffQ7[1][22].Code = 9; HuffQ7[1][22].Length = 5; /* 0.025631 - 01001 */
+ HuffQ7[1][23].Code = 11; HuffQ7[1][23].Length = 5; /* 0.027021 - 01011 */
+ HuffQ7[1][24].Code = 16; HuffQ7[1][24].Length = 5; /* 0.031465 - 10000 */
+ HuffQ7[1][25].Code = 19; HuffQ7[1][25].Length = 5; /* 0.034244 - 10011 */
+ HuffQ7[1][26].Code = 21; HuffQ7[1][26].Length = 5; /* 0.035921 - 10101 */
+ HuffQ7[1][27].Code = 24; HuffQ7[1][27].Length = 5; /* 0.037938 - 11000 */
+ HuffQ7[1][28].Code = 26; HuffQ7[1][28].Length = 5; /* 0.039595 - 11010 */
+ HuffQ7[1][29].Code = 29; HuffQ7[1][29].Length = 5; /* 0.041546 - 11101 */
+ HuffQ7[1][30].Code = 31; HuffQ7[1][30].Length = 5; /* 0.042623 - 11111 */
+ HuffQ7[1][31].Code = 2; HuffQ7[1][31].Length = 4; /* 0.045180 - 0010 */
+ HuffQ7[1][32].Code = 0; HuffQ7[1][32].Length = 4; /* 0.043151 - 0000 */
+ HuffQ7[1][33].Code = 30; HuffQ7[1][33].Length = 5; /* 0.042538 - 11110 */
+ HuffQ7[1][34].Code = 28; HuffQ7[1][34].Length = 5; /* 0.041422 - 11100 */
+ HuffQ7[1][35].Code = 25; HuffQ7[1][35].Length = 5; /* 0.039145 - 11001 */
+ HuffQ7[1][36].Code = 22; HuffQ7[1][36].Length = 5; /* 0.036691 - 10110 */
+ HuffQ7[1][37].Code = 20; HuffQ7[1][37].Length = 5; /* 0.034955 - 10100 */
+ HuffQ7[1][38].Code = 14; HuffQ7[1][38].Length = 5; /* 0.029155 - 01110 */
+ HuffQ7[1][39].Code = 13; HuffQ7[1][39].Length = 5; /* 0.027921 - 01101 */
+ HuffQ7[1][40].Code = 8; HuffQ7[1][40].Length = 5; /* 0.025553 - 01000 */
+ HuffQ7[1][41].Code = 6; HuffQ7[1][41].Length = 5; /* 0.023093 - 00110 */
+ HuffQ7[1][42].Code = 2; HuffQ7[1][42].Length = 5; /* 0.021200 - 00010 */
+ HuffQ7[1][43].Code = 46; HuffQ7[1][43].Length = 6; /* 0.018134 - 101110 */
+ HuffQ7[1][44].Code = 35; HuffQ7[1][44].Length = 6; /* 0.015824 - 100011 */
+ HuffQ7[1][45].Code = 31; HuffQ7[1][45].Length = 6; /* 0.014701 - 011111 */
+ HuffQ7[1][46].Code = 21; HuffQ7[1][46].Length = 6; /* 0.013187 - 010101 */
+ HuffQ7[1][47].Code = 15; HuffQ7[1][47].Length = 6; /* 0.012776 - 001111 */
+ HuffQ7[1][48].Code = 95; HuffQ7[1][48].Length = 7; /* 0.009664 - 1011111 */
+ HuffQ7[1][49].Code = 72; HuffQ7[1][49].Length = 7; /* 0.007922 - 1001000 */
+ HuffQ7[1][50].Code = 41; HuffQ7[1][50].Length = 7; /* 0.006838 - 0101001 */
+ HuffQ7[1][51].Code = 189; HuffQ7[1][51].Length = 8; /* 0.005024 - 10111101 */
+ HuffQ7[1][52].Code = 123; HuffQ7[1][52].Length = 8; /* 0.003830 - 01111011 */
+ HuffQ7[1][53].Code = 377; HuffQ7[1][53].Length = 9; /* 0.002232 - 101111001 */
+ HuffQ7[1][54].Code = 161; HuffQ7[1][54].Length = 9; /* 0.001566 - 010100001 */
+ HuffQ7[1][55].Code = 891; HuffQ7[1][55].Length = 10; /* 0.001383 - 1101111011 */
+ HuffQ7[1][56].Code = 327; HuffQ7[1][56].Length = 10; /* 0.000900 - 0101000111 */
+ HuffQ7[1][57].Code = 326; HuffQ7[1][57].Length = 10; /* 0.000790 - 0101000110 */
+ HuffQ7[1][58].Code = 3560; HuffQ7[1][58].Length = 12; /* 0.000254 - 110111101000 */
+ HuffQ7[1][59].Code = 14255; HuffQ7[1][59].Length = 14; /* 0.000117 - 11011110101111 */
+ HuffQ7[1][60].Code = 14247; HuffQ7[1][60].Length = 14; /* 0.000085 - 11011110100111 */
+ HuffQ7[1][61].Code = 14252; HuffQ7[1][61].Length = 14; /* 0.000085 - 11011110101100 */
+ HuffQ7[1][62].Code = 14245; HuffQ7[1][62].Length = 14; /* 0.000065 - 11011110100101 */
+}
diff --git a/akode/plugins/mpc_decoder/mppdec/idtag.cpp b/akode/plugins/mpc_decoder/mppdec/idtag.cpp
new file mode 100644
index 0000000..0b26833
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mppdec/idtag.cpp
@@ -0,0 +1,66 @@
+#include "stdafx.h"
+
+StreamInfo::StreamInfo ()
+{
+ memset ( &simple, 0, sizeof (simple) );
+}
+
+MPC_INT64 StreamInfo::GetLenthSamples()
+{
+ MPC_INT64 samples = (MPC_INT64)simple.Frames * MPC_decoder::FrameLength;
+ if ( simple.IsTrueGapless ) {
+ samples -= (MPC_decoder::FrameLength - simple.LastFrameSamples);
+ } else {
+ samples -= MPC_decoder::SynthDelay;
+ }
+ return samples;
+}
+
+double StreamInfo::GetLength()
+{
+ return (double)GetLenthSamples() / (double)simple.SampleFreq;
+}
+
+
+
+// searches for a ID3v2-tag and reads the length (in bytes) of it
+// -1 on errors of any kind
+
+long
+JumpID3v2 ( MPC_reader* fp )
+{
+ unsigned char tmp [10];
+ unsigned int Unsynchronisation; // ID3v2.4-flag
+ unsigned int ExtHeaderPresent; // ID3v2.4-flag
+ unsigned int ExperimentalFlag; // ID3v2.4-flag
+ unsigned int FooterPresent; // ID3v2.4-flag
+ long ret;
+
+ fp->read ( tmp, sizeof(tmp) );
+
+ // check id3-tag
+ if ( 0 != memcmp ( tmp, "ID3", 3) )
+ return 0;
+
+ // read flags
+ Unsynchronisation = tmp[5] & 0x80;
+ ExtHeaderPresent = tmp[5] & 0x40;
+ ExperimentalFlag = tmp[5] & 0x20;
+ FooterPresent = tmp[5] & 0x10;
+
+ if ( tmp[5] & 0x0F )
+ return -1; // not (yet???) allowed
+ if ( (tmp[6] | tmp[7] | tmp[8] | tmp[9]) & 0x80 )
+ return -1; // not allowed
+
+ // read HeaderSize (syncsave: 4 * $0xxxxxxx = 28 significant bits)
+ ret = tmp[6] << 21;
+ ret += tmp[7] << 14;
+ ret += tmp[8] << 7;
+ ret += tmp[9] ;
+ ret += 10;
+ if ( FooterPresent )
+ ret += 10;
+
+ return ret;
+}
diff --git a/akode/plugins/mpc_decoder/mppdec/mpc_dec.cpp b/akode/plugins/mpc_decoder/mppdec/mpc_dec.cpp
new file mode 100644
index 0000000..1ecb130
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mppdec/mpc_dec.cpp
@@ -0,0 +1,1074 @@
+#include "stdafx.h"
+
+void
+MPC_decoder::RESET_Synthesis ( void )
+{
+ Reset_V ();
+}
+
+void
+MPC_decoder::RESET_Y ( void )
+{
+ memset ( Y_L, 0, sizeof Y_L );
+ memset ( Y_R, 0, sizeof Y_R );
+}
+
+void
+MPC_decoder::RESET_Globals ( void )
+{
+ Reset_BitstreamDecode ();
+
+ DecodedFrames = 0;
+ StreamVersion = 0;
+ MS_used = 0;
+
+ memset ( Y_L , 0, sizeof Y_L );
+ memset ( Y_R , 0, sizeof Y_R );
+ memset ( SCF_Index_L , 0, sizeof SCF_Index_L );
+ memset ( SCF_Index_R , 0, sizeof SCF_Index_R );
+ memset ( Res_L , 0, sizeof Res_L );
+ memset ( Res_R , 0, sizeof Res_R );
+ memset ( SCFI_L , 0, sizeof SCFI_L );
+ memset ( SCFI_R , 0, sizeof SCFI_R );
+ memset ( DSCF_Flag_L , 0, sizeof DSCF_Flag_L );
+ memset ( DSCF_Flag_R , 0, sizeof DSCF_Flag_R );
+ memset ( DSCF_Reference_L, 0, sizeof DSCF_Reference_L );
+ memset ( DSCF_Reference_R, 0, sizeof DSCF_Reference_R );
+ memset ( Q , 0, sizeof Q );
+ memset ( MS_Flag , 0, sizeof MS_Flag );
+}
+
+unsigned int
+MPC_decoder::decode_internal ( MPC_SAMPLE_FORMAT *buffer )
+{
+ unsigned int output_frame_length = FrameLength;
+
+ unsigned int FrameBitCnt = 0;
+
+ if ( DecodedFrames >= OverallFrames )
+ return (unsigned int)(-1); // end of file -> abort decoding
+
+ // read jump-info for validity check of frame
+ FwdJumpInfo = Bitstream_read (20);
+ SeekTable [DecodedFrames] = 20 + FwdJumpInfo; // ...
+
+ ActDecodePos = (Zaehler << 5) + pos;
+
+ // decode data and check for validity of frame
+ FrameBitCnt = BitsRead ();
+ switch ( StreamVersion ) {
+ case 0x04:
+ case 0x05:
+ case 0x06:
+ Lese_Bitstrom_SV6 ();
+ break;
+ case 0x07:
+ case 0x17:
+ Lese_Bitstrom_SV7 ();
+ break;
+ default:
+ return (unsigned int)(-1);
+ }
+ FrameWasValid = BitsRead() - FrameBitCnt == FwdJumpInfo;
+
+ // synthesize signal
+ Requantisierung ( Max_Band );
+
+ //if ( EQ_activated && PluginSettings.EQbyMPC )
+ // perform_EQ ();
+
+ Synthese_Filter_float ( buffer );
+
+
+ DecodedFrames++;
+
+ // cut off first SynthDelay zero-samples
+ if ( DecodedFrames == OverallFrames && StreamVersion >= 6 )
+ { // reconstruct exact filelength
+ int mod_block = Bitstream_read (11);
+ int FilterDecay;
+
+ if (mod_block == 0) mod_block = 1152; // Encoder bugfix
+ FilterDecay = (mod_block + SynthDelay) % FrameLength;
+
+ // additional FilterDecay samples are needed for decay of synthesis filter
+ if ( SynthDelay + mod_block >= FrameLength ) {
+
+ // **********************************************************************
+ // Rhoades 4/16/2002
+ // Commented out are blocks of code which cause gapless playback to fail.
+ // Temporary fix...
+ // **********************************************************************
+
+ if ( ! TrueGaplessPresent ) {
+ RESET_Y ();
+ } else {
+ //if ( FrameLength != LastValidSamples ) {
+ Bitstream_read (20);
+ Lese_Bitstrom_SV7 ();
+ Requantisierung ( Max_Band );
+ //FilterDecay = LastValidSamples;
+ //}
+ //else {
+ //FilterDecay = 0;
+ //}
+ }
+
+ Synthese_Filter_float ( buffer + 2304 );
+
+ output_frame_length = FrameLength + FilterDecay;
+ }
+ else { // there are only FilterDecay samples needed for this frame
+ output_frame_length = FilterDecay;
+ }
+ }
+
+ if ( samples_to_skip ) {
+ if (output_frame_length < samples_to_skip)
+ {
+ samples_to_skip -= output_frame_length;
+ output_frame_length = 0;
+ }
+ else
+ {
+ output_frame_length -= samples_to_skip;
+ memmove ( buffer, buffer + samples_to_skip * 2, output_frame_length * 2 * sizeof (MPC_SAMPLE_FORMAT) );
+ samples_to_skip = 0;
+ }
+ }
+
+ return output_frame_length;
+
+}
+
+unsigned int MPC_decoder::Decode ( MPC_SAMPLE_FORMAT *buffer, unsigned int * vbr_update_acc, unsigned int * vbr_update_bits )
+{
+ for(;;)
+ {
+ const int MaxBrokenFrames = 0; // PluginSettings.MaxBrokenFrames
+
+ unsigned int RING = Zaehler;
+ int vbr_ring = (RING << 5) + pos;
+
+ unsigned int valid_samples = decode_internal ( buffer );
+
+ if ( valid_samples == (unsigned int)(-1) ) return 0;
+
+ /**************** ERROR CONCEALMENT *****************/
+ if ( FrameWasValid == 0 ) { // error occurred in bitstream
+ return (unsigned int)(-1);
+ } else
+ {
+ if (vbr_update_acc && vbr_update_bits)
+ {
+ (*vbr_update_acc) ++;
+ vbr_ring = (Zaehler << 5) + pos - vbr_ring;
+ if (vbr_ring < 0) vbr_ring += 524288;
+ (*vbr_update_bits) += vbr_ring;
+ }
+
+ }
+ UpdateBuffer ( RING );
+
+ if (valid_samples > 0) return valid_samples;
+ }
+}
+
+void
+MPC_decoder::Requantisierung ( const int Last_Band )
+{
+ int Band;
+ int n;
+ MPC_SAMPLE_FORMAT facL;
+ MPC_SAMPLE_FORMAT facR;
+ MPC_SAMPLE_FORMAT templ;
+ MPC_SAMPLE_FORMAT tempr;
+ MPC_SAMPLE_FORMAT* YL;
+ MPC_SAMPLE_FORMAT* YR;
+ int* L;
+ int* R;
+
+#ifdef MPC_FIXED_POINT
+#if MPC_FIXED_POINT_FRACTPART == 14
+#define MPC_MULTIPLY_SCF(CcVal, SCF_idx) \
+ MPC_MULTIPLY_EX(CcVal,SCF[SCF_idx],SCF_shift[SCF_idx])
+#else
+
+#error FIXME, Cc table is in 18.14 format
+
+#endif
+#else
+#define MPC_MULTIPLY_SCF(CcVal, SCF_idx) \
+ MPC_MULTIPLY(CcVal,SCF[SCF_idx])
+#endif
+ // requantization and scaling of subband-samples
+ for ( Band = 0; Band <= Last_Band; Band++ ) { // setting pointers
+ YL = Y_L [0] + Band;
+ YR = Y_R [0] + Band;
+ L = Q [Band].L;
+ R = Q [Band].R;
+ /************************** MS-coded **************************/
+ if ( MS_Flag [Band] ) {
+ if ( Res_L [Band] ) {
+ if ( Res_R [Band] ) { // M!=0, S!=0
+ facL = MPC_MULTIPLY_SCF( Cc[Res_L[Band]] , (unsigned char)SCF_Index_L[Band][0]);
+ facR = MPC_MULTIPLY_SCF( Cc[Res_R[Band]] , (unsigned char)SCF_Index_R[Band][0]);
+ for ( n = 0; n < 12; n++, YL += 32, YR += 32 ) {
+ *YL = (templ = MPC_MULTIPLY_FLOAT_INT(facL,*L++))+(tempr = MPC_MULTIPLY_FLOAT_INT(facR,*R++));
+ *YR = templ - tempr;
+ }
+ facL = MPC_MULTIPLY_SCF( Cc[Res_L[Band]] , (unsigned char)SCF_Index_L[Band][1]);
+ facR = MPC_MULTIPLY_SCF( Cc[Res_R[Band]] , (unsigned char)SCF_Index_R[Band][1]);
+ for ( ; n < 24; n++, YL += 32, YR += 32 ) {
+ *YL = (templ = MPC_MULTIPLY_FLOAT_INT(facL,*L++))+(tempr = MPC_MULTIPLY_FLOAT_INT(facR,*R++));
+ *YR = templ - tempr;
+ }
+ facL = MPC_MULTIPLY_SCF( Cc[Res_L[Band]] , (unsigned char)SCF_Index_L[Band][2]);
+ facR = MPC_MULTIPLY_SCF( Cc[Res_R[Band]] , (unsigned char)SCF_Index_R[Band][2]);
+ for ( ; n < 36; n++, YL += 32, YR += 32 ) {
+ *YL = (templ = MPC_MULTIPLY_FLOAT_INT(facL,*L++))+(tempr = MPC_MULTIPLY_FLOAT_INT(facR,*R++));
+ *YR = templ - tempr;
+ }
+ } else { // M!=0, S==0
+ facL = MPC_MULTIPLY_SCF( Cc[Res_L[Band]] , (unsigned char)SCF_Index_L[Band][0]);
+ for ( n = 0; n < 12; n++, YL += 32, YR += 32 ) {
+ *YR = *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
+ }
+ facL = MPC_MULTIPLY_SCF( Cc[Res_L[Band]] , (unsigned char)SCF_Index_L[Band][1]);
+ for ( ; n < 24; n++, YL += 32, YR += 32 ) {
+ *YR = *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
+ }
+ facL = MPC_MULTIPLY_SCF( Cc[Res_L[Band]] , (unsigned char)SCF_Index_L[Band][2]);
+ for ( ; n < 36; n++, YL += 32, YR += 32 ) {
+ *YR = *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
+ }
+ }
+ } else {
+ if (Res_R[Band]) // M==0, S!=0
+ {
+ facR = MPC_MULTIPLY_SCF( Cc[Res_R[Band]] , (unsigned char)SCF_Index_R[Band][0]);
+ for ( n = 0; n < 12; n++, YL += 32, YR += 32 ) {
+ *YR = - (*YL = MPC_MULTIPLY_FLOAT_INT(facR,*(R++)));
+ }
+ facR = MPC_MULTIPLY_SCF( Cc[Res_R[Band]] , (unsigned char)SCF_Index_R[Band][1]);
+ for ( ; n < 24; n++, YL += 32, YR += 32 ) {
+ *YR = - (*YL = MPC_MULTIPLY_FLOAT_INT(facR,*(R++)));
+ }
+ facR = MPC_MULTIPLY_SCF( Cc[Res_R[Band]] , (unsigned char)SCF_Index_R[Band][2]);
+ for ( ; n < 36; n++, YL += 32, YR += 32 ) {
+ *YR = - (*YL = MPC_MULTIPLY_FLOAT_INT(facR,*(R++)));
+ }
+ } else { // M==0, S==0
+ for ( n = 0; n < 36; n++, YL += 32, YR += 32 ) {
+ *YR = *YL = 0;
+ }
+ }
+ }
+ }
+ /************************** LR-coded **************************/
+ else {
+ if ( Res_L [Band] ) {
+ if ( Res_R [Band] ) { // L!=0, R!=0
+ facL = MPC_MULTIPLY_SCF( Cc[Res_L[Band]] , (unsigned char)SCF_Index_L[Band][0]);
+ facR = MPC_MULTIPLY_SCF( Cc[Res_R[Band]] , (unsigned char)SCF_Index_R[Band][0]);
+ for (n = 0; n < 12; n++, YL += 32, YR += 32 ) {
+ *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
+ *YR = MPC_MULTIPLY_FLOAT_INT(facR,*R++);
+ }
+ facL = MPC_MULTIPLY_SCF( Cc[Res_L[Band]] , (unsigned char)SCF_Index_L[Band][1]);
+ facR = MPC_MULTIPLY_SCF( Cc[Res_R[Band]] , (unsigned char)SCF_Index_R[Band][1]);
+ for (; n < 24; n++, YL += 32, YR += 32 ) {
+ *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
+ *YR = MPC_MULTIPLY_FLOAT_INT(facR,*R++);
+ }
+ facL = MPC_MULTIPLY_SCF( Cc[Res_L[Band]] , (unsigned char)SCF_Index_L[Band][2]);
+ facR = MPC_MULTIPLY_SCF( Cc[Res_R[Band]] , (unsigned char)SCF_Index_R[Band][2]);
+ for (; n < 36; n++, YL += 32, YR += 32 ) {
+ *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
+ *YR = MPC_MULTIPLY_FLOAT_INT(facR,*R++);
+ }
+ } else { // L!=0, R==0
+ facL = MPC_MULTIPLY_SCF( Cc[Res_L[Band]] , (unsigned char)SCF_Index_L[Band][0]);
+ for ( n = 0; n < 12; n++, YL += 32, YR += 32 ) {
+ *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
+ *YR = 0;
+ }
+ facL = MPC_MULTIPLY_SCF( Cc[Res_L[Band]] , (unsigned char)SCF_Index_L[Band][1]);
+ for ( ; n < 24; n++, YL += 32, YR += 32 ) {
+ *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
+ *YR = 0;
+ }
+ facL = MPC_MULTIPLY_SCF( Cc[Res_L[Band]] , (unsigned char)SCF_Index_L[Band][2]);
+ for ( ; n < 36; n++, YL += 32, YR += 32 ) {
+ *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
+ *YR = 0;
+ }
+ }
+ }
+ else {
+ if ( Res_R [Band] ) { // L==0, R!=0
+ facR = MPC_MULTIPLY_SCF( Cc[Res_R[Band]] , (unsigned char)SCF_Index_R[Band][0]);
+ for ( n = 0; n < 12; n++, YL += 32, YR += 32 ) {
+ *YL = 0;
+ *YR = MPC_MULTIPLY_FLOAT_INT(facR,*R++);
+ }
+ facR = MPC_MULTIPLY_SCF( Cc[Res_R[Band]] , (unsigned char)SCF_Index_R[Band][1]);
+ for ( ; n < 24; n++, YL += 32, YR += 32 ) {
+ *YL = 0;
+ *YR = MPC_MULTIPLY_FLOAT_INT(facR,*R++);
+ }
+ facR = MPC_MULTIPLY_SCF( Cc[Res_R[Band]] , (unsigned char)SCF_Index_R[Band][2]);
+ for ( ; n < 36; n++, YL += 32, YR += 32 ) {
+ *YL = 0;
+ *YR = MPC_MULTIPLY_FLOAT_INT(facR,*R++);
+ }
+ } else { // L==0, R==0
+ for ( n = 0; n < 36; n++, YL += 32, YR += 32 ) {
+ *YR = *YL = 0;
+ }
+ }
+ }
+ }
+ }
+}
+
+/****************************************** SV 6 ******************************************/
+void
+MPC_decoder::Lese_Bitstrom_SV6 ( void )
+{
+ int n,k;
+ int Max_used_Band=0;
+ HuffmanTyp *Table;
+ const HuffmanTyp *x1;
+ const HuffmanTyp *x2;
+ int *L;
+ int *R;
+ int *ResL = Res_L;
+ int *ResR = Res_R;
+
+ /************************ HEADER **************************/
+ ResL = Res_L;
+ ResR = Res_R;
+ for (n=0; n<=Max_Band; ++n, ++ResL, ++ResR)
+ {
+ if (n<11) Table = Region_A;
+ else if (n>=11 && n<=22) Table = Region_B;
+ else /*if (n>=23)*/ Table = Region_C;
+
+ *ResL = Q_res[n][Huffman_Decode(Table)];
+ if (MS_used) MS_Flag[n] = Bitstream_read(1);
+ *ResR = Q_res[n][Huffman_Decode(Table)];
+
+ // only perform the following procedure up to the maximum non-zero subband
+ if (*ResL || *ResR) Max_used_Band = n;
+ }
+
+ /************************* SCFI-Bundle *****************************/
+ ResL = Res_L;
+ ResR = Res_R;
+ for (n=0; n<=Max_used_Band; ++n, ++ResL, ++ResR) {
+ if (*ResL) SCFI_Bundle_read(SCFI_Bundle, &SCFI_L[n], &DSCF_Flag_L[n]);
+ if (*ResR) SCFI_Bundle_read(SCFI_Bundle, &SCFI_R[n], &DSCF_Flag_R[n]);
+ }
+
+ /***************************** SCFI ********************************/
+ ResL = Res_L;
+ ResR = Res_R;
+ L = SCF_Index_L[0];
+ R = SCF_Index_R[0];
+ for (n=0; n<=Max_used_Band; ++n, ++ResL, ++ResR, L+=3, R+=3)
+ {
+ if (*ResL)
+ {
+ /*********** DSCF ************/
+ if (DSCF_Flag_L[n]==1)
+ {
+ L[2] = DSCF_Reference_L[n];
+ switch (SCFI_L[n])
+ {
+ case 3:
+ L[0] = L[2] + Huffman_Decode_fast(DSCF_Entropie);
+ L[1] = L[0];
+ L[2] = L[1];
+ break;
+ case 1:
+ L[0] = L[2] + Huffman_Decode_fast(DSCF_Entropie);
+ L[1] = L[0] + Huffman_Decode_fast(DSCF_Entropie);
+ L[2] = L[1];
+ break;
+ case 2:
+ L[0] = L[2] + Huffman_Decode_fast(DSCF_Entropie);
+ L[1] = L[0];
+ L[2] = L[1] + Huffman_Decode_fast(DSCF_Entropie);
+ break;
+ case 0:
+ L[0] = L[2] + Huffman_Decode_fast(DSCF_Entropie);
+ L[1] = L[0] + Huffman_Decode_fast(DSCF_Entropie);
+ L[2] = L[1] + Huffman_Decode_fast(DSCF_Entropie);
+ break;
+ default:
+ return;
+ break;
+ }
+ }
+ /************ SCF ************/
+ else
+ {
+ switch (SCFI_L[n])
+ {
+ case 3:
+ L[0] = Bitstream_read(6);
+ L[1] = L[0];
+ L[2] = L[1];
+ break;
+ case 1:
+ L[0] = Bitstream_read(6);
+ L[1] = Bitstream_read(6);
+ L[2] = L[1];
+ break;
+ case 2:
+ L[0] = Bitstream_read(6);
+ L[1] = L[0];
+ L[2] = Bitstream_read(6);
+ break;
+ case 0:
+ L[0] = Bitstream_read(6);
+ L[1] = Bitstream_read(6);
+ L[2] = Bitstream_read(6);
+ break;
+ default:
+ return;
+ break;
+ }
+ }
+ // update Reference for DSCF
+ DSCF_Reference_L[n] = L[2];
+ }
+ if (*ResR)
+ {
+ R[2] = DSCF_Reference_R[n];
+ /*********** DSCF ************/
+ if (DSCF_Flag_R[n]==1)
+ {
+ switch (SCFI_R[n])
+ {
+ case 3:
+ R[0] = R[2] + Huffman_Decode_fast(DSCF_Entropie);
+ R[1] = R[0];
+ R[2] = R[1];
+ break;
+ case 1:
+ R[0] = R[2] + Huffman_Decode_fast(DSCF_Entropie);
+ R[1] = R[0] + Huffman_Decode_fast(DSCF_Entropie);
+ R[2] = R[1];
+ break;
+ case 2:
+ R[0] = R[2] + Huffman_Decode_fast(DSCF_Entropie);
+ R[1] = R[0];
+ R[2] = R[1] + Huffman_Decode_fast(DSCF_Entropie);
+ break;
+ case 0:
+ R[0] = R[2] + Huffman_Decode_fast(DSCF_Entropie);
+ R[1] = R[0] + Huffman_Decode_fast(DSCF_Entropie);
+ R[2] = R[1] + Huffman_Decode_fast(DSCF_Entropie);
+ break;
+ default:
+ return;
+ break;
+ }
+ }
+ /************ SCF ************/
+ else
+ {
+ switch (SCFI_R[n])
+ {
+ case 3:
+ R[0] = Bitstream_read(6);
+ R[1] = R[0];
+ R[2] = R[1];
+ break;
+ case 1:
+ R[0] = Bitstream_read(6);
+ R[1] = Bitstream_read(6);
+ R[2] = R[1];
+ break;
+ case 2:
+ R[0] = Bitstream_read(6);
+ R[1] = R[0];
+ R[2] = Bitstream_read(6);
+ break;
+ case 0:
+ R[0] = Bitstream_read(6);
+ R[1] = Bitstream_read(6);
+ R[2] = Bitstream_read(6);
+ break;
+ default:
+ return;
+ break;
+ }
+ }
+ // update Reference for DSCF
+ DSCF_Reference_R[n] = R[2];
+ }
+ }
+
+ /**************************** Samples ****************************/
+ ResL = Res_L;
+ ResR = Res_R;
+ for (n=0; n<=Max_used_Band; ++n, ++ResL, ++ResR)
+ {
+ // setting pointers
+ x1 = SampleHuff[*ResL];
+ x2 = SampleHuff[*ResR];
+ L = Q[n].L;
+ R = Q[n].R;
+
+ if (x1!=NULL || x2!=NULL)
+ for (k=0; k<36; ++k)
+ {
+ if (x1 != NULL) *L++ = Huffman_Decode_fast (x1);
+ if (x2 != NULL) *R++ = Huffman_Decode_fast (x2);
+ }
+
+ if (*ResL>7 || *ResR>7)
+ for (k=0; k<36; ++k)
+ {
+ if (*ResL>7) *L++ = (int)Bitstream_read(Res_bit[*ResL]) - Dc[*ResL];
+ if (*ResR>7) *R++ = (int)Bitstream_read(Res_bit[*ResR]) - Dc[*ResR];
+ }
+ }
+}
+
+/****************************************** SV 7 ******************************************/
+void
+MPC_decoder::Lese_Bitstrom_SV7 ( void )
+{
+ // these arrays hold decoding results for bundled quantizers (3- and 5-step)
+ /*static*/ int idx30[] = { -1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1};
+ /*static*/ int idx31[] = { -1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1, 0, 0, 0, 1, 1, 1};
+ /*static*/ int idx32[] = { -1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1};
+ /*static*/ int idx50[] = { -2,-1, 0, 1, 2,-2,-1, 0, 1, 2,-2,-1, 0, 1, 2,-2,-1, 0, 1, 2,-2,-1, 0, 1, 2};
+ /*static*/ int idx51[] = { -2,-2,-2,-2,-2,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2};
+
+ int n,k;
+ int Max_used_Band=0;
+ const HuffmanTyp *Table;
+ int idx;
+ int *L ,*R;
+ int *ResL,*ResR;
+ unsigned int tmp;
+
+ /***************************** Header *****************************/
+ ResL = Res_L;
+ ResR = Res_R;
+
+ // first subband
+ *ResL = Bitstream_read(4);
+ *ResR = Bitstream_read(4);
+ if (MS_used && !(*ResL==0 && *ResR==0)) MS_Flag[0] = Bitstream_read(1);
+
+ // consecutive subbands
+ ++ResL; ++ResR; // increase pointers
+ for (n=1; n<=Max_Band; ++n, ++ResL, ++ResR)
+ {
+ idx = Huffman_Decode_fast(HuffHdr);
+ *ResL = (idx!=4) ? *(ResL-1) + idx : Bitstream_read(4);
+
+ idx = Huffman_Decode_fast(HuffHdr);
+ *ResR = (idx!=4) ? *(ResR-1) + idx : Bitstream_read(4);
+
+ if (MS_used && !(*ResL==0 && *ResR==0)) MS_Flag[n] = Bitstream_read(1);
+
+ // only perform following procedures up to the maximum non-zero subband
+ if (*ResL!=0 || *ResR!=0) Max_used_Band = n;
+ }
+ /****************************** SCFI ******************************/
+ L = SCFI_L;
+ R = SCFI_R;
+ ResL = Res_L;
+ ResR = Res_R;
+ for (n=0; n<=Max_used_Band; ++n, ++L, ++R, ++ResL, ++ResR) {
+ if (*ResL) *L = Huffman_Decode_faster(HuffSCFI);
+ if (*ResR) *R = Huffman_Decode_faster(HuffSCFI);
+ }
+
+ /**************************** SCF/DSCF ****************************/
+ ResL = Res_L;
+ ResR = Res_R;
+ L = SCF_Index_L[0];
+ R = SCF_Index_R[0];
+ for (n=0; n<=Max_used_Band; ++n, ++ResL, ++ResR, L+=3, R+=3) {
+ if (*ResL)
+ {
+ L[2] = DSCF_Reference_L[n];
+ switch (SCFI_L[n])
+ {
+ case 1:
+ idx = Huffman_Decode_fast(HuffDSCF);
+ L[0] = (idx!=8) ? L[2] + idx : Bitstream_read(6);
+ idx = Huffman_Decode_fast(HuffDSCF);
+ L[1] = (idx!=8) ? L[0] + idx : Bitstream_read(6);
+ L[2] = L[1];
+ break;
+ case 3:
+ idx = Huffman_Decode_fast(HuffDSCF);
+ L[0] = (idx!=8) ? L[2] + idx : Bitstream_read(6);
+ L[1] = L[0];
+ L[2] = L[1];
+ break;
+ case 2:
+ idx = Huffman_Decode_fast(HuffDSCF);
+ L[0] = (idx!=8) ? L[2] + idx : Bitstream_read(6);
+ L[1] = L[0];
+ idx = Huffman_Decode_fast(HuffDSCF);
+ L[2] = (idx!=8) ? L[1] + idx : Bitstream_read(6);
+ break;
+ case 0:
+ idx = Huffman_Decode_fast(HuffDSCF);
+ L[0] = (idx!=8) ? L[2] + idx : Bitstream_read(6);
+ idx = Huffman_Decode_fast(HuffDSCF);
+ L[1] = (idx!=8) ? L[0] + idx : Bitstream_read(6);
+ idx = Huffman_Decode_fast(HuffDSCF);
+ L[2] = (idx!=8) ? L[1] + idx : Bitstream_read(6);
+ break;
+ default:
+ return;
+ break;
+ }
+ // update Reference for DSCF
+ DSCF_Reference_L[n] = L[2];
+ }
+ if (*ResR)
+ {
+ R[2] = DSCF_Reference_R[n];
+ switch (SCFI_R[n])
+ {
+ case 1:
+ idx = Huffman_Decode_fast(HuffDSCF);
+ R[0] = (idx!=8) ? R[2] + idx : Bitstream_read(6);
+ idx = Huffman_Decode_fast(HuffDSCF);
+ R[1] = (idx!=8) ? R[0] + idx : Bitstream_read(6);
+ R[2] = R[1];
+ break;
+ case 3:
+ idx = Huffman_Decode_fast(HuffDSCF);
+ R[0] = (idx!=8) ? R[2] + idx : Bitstream_read(6);
+ R[1] = R[0];
+ R[2] = R[1];
+ break;
+ case 2:
+ idx = Huffman_Decode_fast(HuffDSCF);
+ R[0] = (idx!=8) ? R[2] + idx : Bitstream_read(6);
+ R[1] = R[0];
+ idx = Huffman_Decode_fast(HuffDSCF);
+ R[2] = (idx!=8) ? R[1] + idx : Bitstream_read(6);
+ break;
+ case 0:
+ idx = Huffman_Decode_fast(HuffDSCF);
+ R[0] = (idx!=8) ? R[2] + idx : Bitstream_read(6);
+ idx = Huffman_Decode_fast(HuffDSCF);
+ R[1] = (idx!=8) ? R[0] + idx : Bitstream_read(6);
+ idx = Huffman_Decode_fast(HuffDSCF);
+ R[2] = (idx!=8) ? R[1] + idx : Bitstream_read(6);
+ break;
+ default:
+ return;
+ break;
+ }
+ // update Reference for DSCF
+ DSCF_Reference_R[n] = R[2];
+ }
+ }
+ /***************************** Samples ****************************/
+ ResL = Res_L;
+ ResR = Res_R;
+ L = Q[0].L;
+ R = Q[0].R;
+ for (n=0; n<=Max_used_Band; ++n, ++ResL, ++ResR, L+=36, R+=36)
+ {
+ /************** links **************/
+ switch (*ResL)
+ {
+ case -2: case -3: case -4: case -5: case -6: case -7: case -8: case -9:
+ case -10: case -11: case -12: case -13: case -14: case -15: case -16: case -17:
+ L += 36;
+ break;
+ case -1:
+ for (k=0; k<36; k++ ) {
+ tmp = random_int ();
+ *L++ = ((tmp >> 24) & 0xFF) + ((tmp >> 16) & 0xFF) + ((tmp >> 8) & 0xFF) + ((tmp >> 0) & 0xFF) - 510;
+ }
+ break;
+ case 0:
+ L += 36;// increase pointer
+ break;
+ case 1:
+ Table = HuffQ[Bitstream_read(1)][1];
+ for (k=0; k<12; ++k)
+ {
+ idx = Huffman_Decode_fast(Table);
+ *L++ = idx30[idx];
+ *L++ = idx31[idx];
+ *L++ = idx32[idx];
+ }
+ break;
+ case 2:
+ Table = HuffQ[Bitstream_read(1)][2];
+ for (k=0; k<18; ++k)
+ {
+ idx = Huffman_Decode_fast(Table);
+ *L++ = idx50[idx];
+ *L++ = idx51[idx];
+ }
+ break;
+ case 3:
+ case 4:
+ Table = HuffQ[Bitstream_read(1)][*ResL];
+ for (k=0; k<36; ++k)
+ *L++ = Huffman_Decode_faster(Table);
+ break;
+ case 5:
+ Table = HuffQ[Bitstream_read(1)][*ResL];
+ for (k=0; k<36; ++k)
+ *L++ = Huffman_Decode_fast(Table);
+ break;
+ case 6:
+ case 7:
+ Table = HuffQ[Bitstream_read(1)][*ResL];
+ for (k=0; k<36; ++k)
+ *L++ = Huffman_Decode(Table);
+ break;
+ case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17:
+ tmp = Dc[*ResL];
+ for (k=0; k<36; ++k)
+ *L++ = (int)Bitstream_read(Res_bit[*ResL]) - tmp;
+ break;
+ default:
+ return;
+ }
+ /************** rechts **************/
+ switch (*ResR)
+ {
+ case -2: case -3: case -4: case -5: case -6: case -7: case -8: case -9:
+ case -10: case -11: case -12: case -13: case -14: case -15: case -16: case -17:
+ R += 36;
+ break;
+ case -1:
+ for (k=0; k<36; k++ ) {
+ tmp = random_int ();
+ *R++ = ((tmp >> 24) & 0xFF) + ((tmp >> 16) & 0xFF) + ((tmp >> 8) & 0xFF) + ((tmp >> 0) & 0xFF) - 510;
+ }
+ break;
+ case 0:
+ R += 36;// increase pointer
+ break;
+ case 1:
+ Table = HuffQ[Bitstream_read(1)][1];
+ for (k=0; k<12; ++k)
+ {
+ idx = Huffman_Decode_fast(Table);
+ *R++ = idx30[idx];
+ *R++ = idx31[idx];
+ *R++ = idx32[idx];
+ }
+ break;
+ case 2:
+ Table = HuffQ[Bitstream_read(1)][2];
+ for (k=0; k<18; ++k)
+ {
+ idx = Huffman_Decode_fast(Table);
+ *R++ = idx50[idx];
+ *R++ = idx51[idx];
+ }
+ break;
+ case 3:
+ case 4:
+ Table = HuffQ[Bitstream_read(1)][*ResR];
+ for (k=0; k<36; ++k)
+ *R++ = Huffman_Decode_faster(Table);
+ break;
+ case 5:
+ Table = HuffQ[Bitstream_read(1)][*ResR];
+ for (k=0; k<36; ++k)
+ *R++ = Huffman_Decode_fast(Table);
+ break;
+ case 6:
+ case 7:
+ Table = HuffQ[Bitstream_read(1)][*ResR];
+ for (k=0; k<36; ++k)
+ *R++ = Huffman_Decode(Table);
+ break;
+ case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17:
+ tmp = Dc[*ResR];
+ for (k=0; k<36; ++k)
+ *R++ = (int)Bitstream_read(Res_bit[*ResR]) - tmp;
+ break;
+ default:
+ return;
+ }
+ }
+}
+
+MPC_decoder::~MPC_decoder ()
+{
+ if (SeekTable) free ( SeekTable );
+}
+
+MPC_decoder::MPC_decoder ( MPC_reader *r, double scale_factor )
+{
+ m_reader = r;
+
+ HuffQ[0][0] = 0;
+ HuffQ[1][0] = 0;
+ HuffQ[0][1] = HuffQ1[0];
+ HuffQ[1][1] = HuffQ1[1];
+ HuffQ[0][2] = HuffQ2[0];
+ HuffQ[1][2] = HuffQ2[1];
+ HuffQ[0][3] = HuffQ3[0];
+ HuffQ[1][3] = HuffQ3[1];
+ HuffQ[0][4] = HuffQ4[0];
+ HuffQ[1][4] = HuffQ4[1];
+ HuffQ[0][5] = HuffQ5[0];
+ HuffQ[1][5] = HuffQ5[1];
+ HuffQ[0][6] = HuffQ6[0];
+ HuffQ[1][6] = HuffQ6[1];
+ HuffQ[0][7] = HuffQ7[0];
+ HuffQ[1][7] = HuffQ7[1];
+
+ SampleHuff[0] = NULL;
+ SampleHuff[1] = Entropie_1;
+ SampleHuff[2] = Entropie_2;
+ SampleHuff[3] = Entropie_3;
+ SampleHuff[4] = Entropie_4;
+ SampleHuff[5] = Entropie_5;
+ SampleHuff[6] = Entropie_6;
+ SampleHuff[7] = Entropie_7;
+ SampleHuff[8] = NULL;
+ SampleHuff[9] = NULL;
+ SampleHuff[10] = NULL;
+ SampleHuff[11] = NULL;
+ SampleHuff[12] = NULL;
+ SampleHuff[13] = NULL;
+ SampleHuff[14] = NULL;
+ SampleHuff[15] = NULL;
+ SampleHuff[16] = NULL;
+ SampleHuff[17] = NULL;
+
+ SeekTable = NULL;
+ EQ_activated = 0;
+ MPCHeaderPos = 0;
+ StreamVersion = 0;
+ MS_used = 0;
+ FwdJumpInfo = 0;
+ ActDecodePos = 0;
+ FrameWasValid = 0;
+ OverallFrames = 0;
+ DecodedFrames = 0;
+ LastValidSamples = 0;
+ TrueGaplessPresent = 0;
+ WordsRead = 0;
+ Max_Band = 0;
+ SampleRate = 0;
+// clips = 0;
+ __r1 = 1;
+ __r2 = 1;
+
+ dword = 0;
+ pos = 0;
+ Zaehler = 0;
+ WordsRead = 0;
+ Max_Band = 0;
+
+ initialisiere_Quantisierungstabellen (scale_factor);
+ Huffman_SV6_Decoder ();
+ Huffman_SV7_Decoder ();
+}
+
+void MPC_decoder::SetStreamInfo ( const StreamInfo *si )
+{
+ RESET_Synthesis ();
+ RESET_Globals ();
+
+ StreamVersion = si->simple.StreamVersion;
+ MS_used = si->simple.MS;
+ Max_Band = si->simple.MaxBand;
+ OverallFrames = si->simple.Frames;
+ MPCHeaderPos = si->simple.HeaderPosition;
+ LastValidSamples = si->simple.LastFrameSamples;
+ TrueGaplessPresent = si->simple.IsTrueGapless;
+ SampleRate = (int)si->simple.SampleFreq;
+
+ if ( SeekTable != NULL ) free ( SeekTable );
+ SeekTable = (unsigned short *)calloc ( sizeof(unsigned short), OverallFrames+64 );
+
+ samples_to_skip = SynthDelay;
+}
+
+bool MPC_decoder::Initialize(const StreamInfo * info)
+{
+ SetStreamInfo(info);
+
+ // AB: setting position to the beginning of the data-bitstream
+ switch ( StreamVersion ) {
+ case 0x04: f_seek ( 4 + MPCHeaderPos, SEEK_SET); pos = 16; break; // Geht auch über eine der Helperfunktionen
+ case 0x05:
+ case 0x06: f_seek ( 8 + MPCHeaderPos, SEEK_SET); pos = 0; break;
+ case 0x07:
+ case 0x17: /*f_seek ( 24 + MPCHeaderPos, SEEK_SET);*/ pos = 8; break;
+ default: return false;
+ }
+
+ // AB: fill buffer and initialize decoder
+ f_read_dword ( Speicher, MEMSIZE );
+ dword = Speicher [Zaehler = 0];
+
+ return true;
+}
+
+//---------------------------------------------------------------
+// will seek from the beginning of the file to the desired
+// position in ms (given by seek_needed)
+//---------------------------------------------------------------
+
+void
+MPC_decoder::Helper1 ( unsigned long bitpos )
+{
+ f_seek ( (bitpos>>5) * 4 + MPCHeaderPos, SEEK_SET );
+ f_read_dword ( Speicher, 2 );
+ dword = Speicher [ Zaehler = 0];
+ pos = bitpos & 31;
+}
+
+void
+MPC_decoder::Helper2 ( unsigned long bitpos )
+{
+ f_seek ( (bitpos>>5) * 4 + MPCHeaderPos, SEEK_SET );
+ f_read_dword ( Speicher, MEMSIZE );
+ dword = Speicher [ Zaehler = 0];
+ pos = bitpos & 31;
+}
+
+void
+MPC_decoder::Helper3 ( unsigned long bitpos, unsigned long* buffoffs )
+{
+ pos = bitpos & 31;
+ bitpos >>= 5;
+ if ( (unsigned long)(bitpos - *buffoffs) >= MEMSIZE-2 ) {
+ *buffoffs = bitpos;
+ f_seek ( bitpos * 4L + MPCHeaderPos, SEEK_SET );
+ f_read_dword ( Speicher, MEMSIZE );
+ }
+ dword = Speicher [ Zaehler = bitpos - *buffoffs ];
+}
+
+static unsigned int get_initial_fpos(unsigned int StreamVersion)
+{
+ unsigned int fpos = 0;
+ switch ( StreamVersion ) { // setting position to the beginning of the data-bitstream
+ case 0x04: fpos = 48; break;
+ case 0x05:
+ case 0x06: fpos = 64; break;
+ case 0x07:
+ case 0x17: fpos = 200; break;
+ }
+ return fpos;
+}
+
+bool MPC_decoder::SeekSeconds ( double seconds )
+{
+ return SeekSample((MPC_INT64)(seconds * (double)SampleRate + 0.5));
+}
+
+
+bool MPC_decoder::SeekSample(MPC_INT64 destsample)
+{
+ unsigned long fpos;
+ unsigned int fwd;
+
+ fwd = (unsigned) (destsample / FrameLength);
+ samples_to_skip = SynthDelay + (unsigned)(destsample % FrameLength);
+
+ memset ( Y_L , 0, sizeof Y_L );
+ memset ( Y_R , 0, sizeof Y_R );
+ memset ( SCF_Index_L , 0, sizeof SCF_Index_L );
+ memset ( SCF_Index_R , 0, sizeof SCF_Index_R );
+ memset ( Res_L , 0, sizeof Res_L );
+ memset ( Res_R , 0, sizeof Res_R );
+ memset ( SCFI_L , 0, sizeof SCFI_L );
+ memset ( SCFI_R , 0, sizeof SCFI_R );
+ memset ( DSCF_Flag_L , 0, sizeof DSCF_Flag_L );
+ memset ( DSCF_Flag_R , 0, sizeof DSCF_Flag_R );
+ memset ( DSCF_Reference_L, 0, sizeof DSCF_Reference_L );
+ memset ( DSCF_Reference_R, 0, sizeof DSCF_Reference_R );
+ memset ( Q , 0, sizeof Q );
+ memset ( MS_Flag , 0, sizeof MS_Flag );
+
+ RESET_Synthesis (); // resetting synthesis filter to avoid "clicks"
+
+ fwd = fwd < OverallFrames ? fwd : OverallFrames; // prevent from desired position out of allowed range
+ DecodedFrames = 0; // reset number of decoded frames
+
+ fpos = get_initial_fpos(StreamVersion);
+ if (fpos == 0) return false;
+
+#if 1
+ {
+ unsigned long buffoffs = 0x80000000;
+ for ( ; DecodedFrames + 1024 < fwd; DecodedFrames++ ) { // proceed until 32 frames before (!!) desired position (allows to scan the scalefactors)
+ if ( SeekTable [DecodedFrames] == 0 ) {
+ Helper3 ( fpos, &buffoffs );
+ fpos += SeekTable [DecodedFrames] = 20 + Bitstream_read (20); // calculate desired pos (in Bits)
+ } else {
+ fpos += SeekTable [DecodedFrames];
+ }
+ }
+ }
+#endif
+ Helper2 ( fpos );
+
+ for ( ; DecodedFrames < fwd; DecodedFrames++ ) { // read the last 32 frames before the desired position to scan the scalefactors (artifactless jumping)
+ unsigned int FrameBitCnt;
+ unsigned int RING;
+ RING = Zaehler;
+ FwdJumpInfo = Bitstream_read (20); // read jump-info
+ SeekTable [DecodedFrames] = 20 + FwdJumpInfo;
+ ActDecodePos = (Zaehler << 5) + pos;
+ FrameBitCnt = BitsRead (); // scanning the scalefactors and check for validity of frame
+ if (StreamVersion >= 7) Lese_Bitstrom_SV7 ();
+ else Lese_Bitstrom_SV6 ();
+ if ( BitsRead() - FrameBitCnt != FwdJumpInfo ) {
+// Box ("Bug in perform_jump");
+ return false;
+ }
+ if ( (RING ^ Zaehler) & MEMSIZE2 ) // update buffer
+ f_read_dword ( Speicher + (RING & MEMSIZE2), MEMSIZE2 );
+ }
+
+// LastBitsRead = BitsRead ();
+ // LastFrame = DecodedFrames;
+
+ return true;
+}
+
+void MPC_decoder::UpdateBuffer ( unsigned int RING )
+{
+ if ( (RING ^ Zaehler) & MEMSIZE2 )
+ f_read_dword ( Speicher + (RING & MEMSIZE2), MEMSIZE2 ); // update buffer
+}
+
+static unsigned long swap32(unsigned long val)
+{
+ const unsigned char * src = (const unsigned char*)&val;
+ return (unsigned long)src[0] | ((unsigned long)src[1] << 8) | ((unsigned long)src[2] << 16) | ((unsigned long)src[3] << 24);
+}
+
+int MPC_decoder::f_read_dword( unsigned int * ptr, unsigned int count)
+{
+ count = f_read(ptr,count << 2) >> 2;
+#ifndef MPC_LITTLE_ENDIAN
+ unsigned int n;
+ for(n=0;n<count;n++)
+ ptr[n] = swap32(ptr[n]);
+#endif
+ return count;
+}
diff --git a/akode/plugins/mpc_decoder/mppdec/mpc_dec.h b/akode/plugins/mpc_decoder/mppdec/mpc_dec.h
new file mode 100644
index 0000000..e6d37ae
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mppdec/mpc_dec.h
@@ -0,0 +1,200 @@
+#ifndef _mpp_dec_h_
+#define _mpp_dec_h_
+
+
+#ifdef WIN32
+#define MPC_LITTLE_ENDIAN
+#endif
+
+
+#include <assert.h>
+
+#include "mpc_math.h"
+
+
+class MPC_reader {
+public:
+ virtual size_t read ( void *ptr, size_t size ) = 0;
+ virtual bool seek ( int offset, int origin ) = 0;
+ virtual long tell () = 0;
+ virtual long get_size () = 0;
+ virtual bool canseek() = 0;
+};
+
+class MPC_decoder {
+public:
+ MPC_decoder(MPC_reader *r, double scale_factor = 1.0);
+ ~MPC_decoder();
+
+ bool Initialize(const class StreamInfo *si);
+ void ScaleOutput(double factor);
+ unsigned int Decode(MPC_SAMPLE_FORMAT *buffer, unsigned int * vbr_update_acc = 0, unsigned int * vbr_update_bits = 0);
+ bool SeekSeconds(double seconds);
+ bool SeekSample(MPC_INT64 sample);
+
+public:
+ enum
+ {
+ FrameLength = (36 * 32), // samples per frame
+ SynthDelay = 481,
+ DecodeBufferLength = 4 * FrameLength
+ };
+private:
+ enum
+ {
+ EQ_TAP = 13, // length of FIR filter for EQ
+ DELAY = ((EQ_TAP + 1) / 2), // delay of FIR
+ FIR_BANDS = 4, // number of subbands to be FIR filtered
+ MEMSIZE = 16384, // overall buffer size
+ MEMSIZE2 = (MEMSIZE/2), // size of one buffer
+ MEMMASK = (MEMSIZE-1),
+ V_MEM = 2304
+ };
+ void SetStreamInfo ( const class StreamInfo *si );
+ void UpdateBuffer ( unsigned int RING );
+ void RESET_Synthesis ( void );
+ void RESET_Globals ( void );
+
+ unsigned int BitsRead ( void );
+ unsigned int decode_internal ( MPC_SAMPLE_FORMAT *buffer );
+ void RESET_Y ( void );
+ void Lese_Bitstrom_SV6 ( void );
+ void Lese_Bitstrom_SV7 ( void );
+
+ void Requantisierung ( const int Last_Band );
+
+ unsigned int samples_to_skip;
+
+ typedef struct {
+ int L [36];
+ int R [36];
+ } QuantTyp;
+
+ typedef struct {
+ unsigned int Code;
+ unsigned int Length;
+ int Value;
+ } HuffmanTyp;
+
+ static int HuffmanTyp_cmpfn ( const void* p1, const void* p2 );
+
+ MPC_reader *m_reader;
+
+ unsigned int dword; // actually decoded 32bit-word
+ unsigned int pos; // bit-position within dword
+ unsigned int Speicher [MEMSIZE]; // read-buffer
+ unsigned int Zaehler; // actual index within read-buffer
+
+ unsigned int FwdJumpInfo;
+ unsigned int ActDecodePos;
+ unsigned int FrameWasValid;
+
+ unsigned int DecodedFrames;
+ unsigned int OverallFrames;
+ int SampleRate; // Sample frequency
+
+ unsigned int StreamVersion; // version of bitstream
+ unsigned int MS_used; // MS-coding used ?
+ int Max_Band;
+ unsigned int MPCHeaderPos; // AB: needed to support ID3v2
+ //unsigned int OverallFrames;
+ //unsigned int DecodedFrames;
+ unsigned int LastValidSamples;
+ unsigned int TrueGaplessPresent;
+
+ unsigned int EQ_activated;
+
+ unsigned int WordsRead; // counts amount of decoded dwords
+ unsigned short* SeekTable;
+
+ /*static*/ unsigned int __r1;
+ /*static*/ unsigned int __r2;
+
+
+ int SCF_Index_L [32] [3];
+ int SCF_Index_R [32] [3]; // holds scalefactor-indices
+ QuantTyp Q [32]; // holds quantized samples
+ int Res_L [32];
+ int Res_R [32]; // holds the chosen quantizer for each subband
+ int DSCF_Flag_L [32];
+ int DSCF_Flag_R [32]; // differential SCF used?
+ int SCFI_L [32];
+ int SCFI_R [32]; // describes order of transmitted SCF
+ int DSCF_Reference_L [32];
+ int DSCF_Reference_R [32]; // holds last frames SCF
+ int MS_Flag[32]; // MS used?
+
+
+ HuffmanTyp HuffHdr [10];
+ HuffmanTyp HuffSCFI [ 4];
+ HuffmanTyp HuffDSCF [16];
+ HuffmanTyp* HuffQ [2] [8];
+
+ HuffmanTyp HuffQ1 [2] [3*3*3];
+ HuffmanTyp HuffQ2 [2] [5*5];
+ HuffmanTyp HuffQ3 [2] [ 7];
+ HuffmanTyp HuffQ4 [2] [ 9];
+ HuffmanTyp HuffQ5 [2] [15];
+ HuffmanTyp HuffQ6 [2] [31];
+ HuffmanTyp HuffQ7 [2] [63];
+
+ const HuffmanTyp* SampleHuff [18];
+ HuffmanTyp SCFI_Bundle [ 8];
+ HuffmanTyp DSCF_Entropie [13];
+ HuffmanTyp Region_A [16];
+ HuffmanTyp Region_B [ 8];
+ HuffmanTyp Region_C [ 4];
+
+ HuffmanTyp Entropie_1 [ 3];
+ HuffmanTyp Entropie_2 [ 5];
+ HuffmanTyp Entropie_3 [ 7];
+ HuffmanTyp Entropie_4 [ 9];
+ HuffmanTyp Entropie_5 [15];
+ HuffmanTyp Entropie_6 [31];
+ HuffmanTyp Entropie_7 [63];
+
+ MPC_SAMPLE_FORMAT V_L [V_MEM + 960];
+ MPC_SAMPLE_FORMAT V_R [V_MEM + 960];
+ MPC_SAMPLE_FORMAT Y_L [36] [32];
+ MPC_SAMPLE_FORMAT Y_R [36] [32];
+
+ MPC_SAMPLE_FORMAT SCF [256]; // holds adapted scalefactors (for clipping prevention)
+#ifdef MPC_FIXED_POINT
+ unsigned char SCF_shift[256];
+#endif
+ unsigned int Q_bit [32]; // holds amount of bits to save chosen quantizer (SV6)
+ unsigned int Q_res [32] [16]; // holds conversion: index -> quantizer (SV6)
+
+private: // functions
+ void Reset_BitstreamDecode ( void );
+ unsigned int Bitstream_read ( const unsigned int );
+ int Huffman_Decode ( const HuffmanTyp* ); // works with maximum lengths up to 14
+ int Huffman_Decode_fast ( const HuffmanTyp* ); // works with maximum lengths up to 10
+ int Huffman_Decode_faster ( const HuffmanTyp* ); // works with maximum lengths up to 5
+ void SCFI_Bundle_read ( const HuffmanTyp*, int*, int* );
+
+ void Reset_V ( void );
+ void Synthese_Filter_float ( MPC_SAMPLE_FORMAT * dst );
+ unsigned int random_int ( void );
+
+ void EQSet ( int on, char data[10], int preamp );
+ void Helper1 ( unsigned long bitpos );
+ void Helper2 ( unsigned long bitpos );
+ void Helper3 ( unsigned long bitpos, unsigned long* buffoffs );
+ void Huffman_SV6_Encoder ( void );
+ void Huffman_SV6_Decoder ( void );
+ void Huffman_SV7_Encoder ( void );
+ void Huffman_SV7_Decoder ( void );
+
+ void initialisiere_Quantisierungstabellen ( double );
+ void Quantisierungsmodes ( void ); // conversion: index -> quantizer (bitstream reading)
+ void Resort_HuffTables ( const unsigned int elements, HuffmanTyp* Table, const int offset );
+private:
+ inline int f_read ( void *ptr, size_t size) { return m_reader->read (ptr, size); };
+ int f_read_dword( unsigned int * ptr, unsigned int count);
+ inline bool f_seek ( int offset, int origin) { return m_reader->seek (offset, origin); };
+};
+
+#include "streaminfo.h"
+
+#endif
diff --git a/akode/plugins/mpc_decoder/mppdec/mpc_math.h b/akode/plugins/mpc_decoder/mppdec/mpc_math.h
new file mode 100644
index 0000000..df894be
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mppdec/mpc_math.h
@@ -0,0 +1,88 @@
+#ifndef _MPC_MATH_H_
+#define _MPC_MATH_H_
+
+
+// #define MPC_FIXED_POINT
+
+
+#ifdef _MSC_VER
+typedef __int64 MPC_INT64;
+#else
+typedef long long MPC_INT64;
+#endif
+
+
+#define MPC_FIXED_POINT_SHIFT 16
+
+#ifdef MPC_FIXED_POINT
+
+#define MPC_FIXED_POINT_SCALE_SHIFT (MPC_FIXED_POINT_SHIFT + MPC_FIXED_POINT_FRACTPART)
+#define MPC_FIXED_POINT_SCALE (1 << (MPC_FIXED_POINT_SCALE_SHIFT - 1))
+
+
+//in fixedpoint mode, results in decode output buffer are in -MPC_FIXED_POINT_SCALE ... MPC_FIXED_POINT_SCALE range
+
+#define MPC_FIXED_POINT_FRACTPART 14
+typedef int MPC_SAMPLE_FORMAT;
+
+typedef MPC_INT64 MPC_SAMPLE_FORMAT_MULTIPLY;
+
+#define MAKE_MPC_SAMPLE(X) (MPC_SAMPLE_FORMAT)((double)(X) * (double)(((MPC_INT64)1)<<MPC_FIXED_POINT_FRACTPART))
+#define MAKE_MPC_SAMPLE_EX(X,Y) (MPC_SAMPLE_FORMAT)((double)(X) * (double)(((MPC_INT64)1)<<(Y)))
+
+#define MPC_MULTIPLY_NOTRUNCATE(X,Y) \
+ (((MPC_SAMPLE_FORMAT_MULTIPLY)(X) * (MPC_SAMPLE_FORMAT_MULTIPLY)(Y)) >> MPC_FIXED_POINT_FRACTPART)
+
+#define MPC_MULTIPLY_EX_NOTRUNCATE(X,Y,Z) \
+ (((MPC_SAMPLE_FORMAT_MULTIPLY)(X) * (MPC_SAMPLE_FORMAT_MULTIPLY)(Y)) >> (Z))
+
+#ifdef _DEBUG
+static inline MPC_SAMPLE_FORMAT MPC_MULTIPLY(MPC_SAMPLE_FORMAT item1,MPC_SAMPLE_FORMAT item2)
+{
+ MPC_SAMPLE_FORMAT_MULTIPLY temp = MPC_MULTIPLY_NOTRUNCATE(item1,item2);
+ assert(temp == (MPC_SAMPLE_FORMAT_MULTIPLY)(MPC_SAMPLE_FORMAT)temp);
+ return (MPC_SAMPLE_FORMAT)temp;
+}
+
+static inline MPC_SAMPLE_FORMAT MPC_MULTIPLY_EX(MPC_SAMPLE_FORMAT item1,MPC_SAMPLE_FORMAT item2,unsigned shift)
+{
+ MPC_SAMPLE_FORMAT_MULTIPLY temp = MPC_MULTIPLY_EX_NOTRUNCATE(item1,item2,shift);
+ assert(temp == (MPC_SAMPLE_FORMAT_MULTIPLY)(MPC_SAMPLE_FORMAT)temp);
+ return (MPC_SAMPLE_FORMAT)temp;
+}
+
+#else
+
+#define MPC_MULTIPLY(X,Y) ((MPC_SAMPLE_FORMAT)MPC_MULTIPLY_NOTRUNCATE(X,Y))
+#define MPC_MULTIPLY_EX(X,Y,Z) ((MPC_SAMPLE_FORMAT)MPC_MULTIPLY_EX_NOTRUNCATE(X,Y,Z))
+
+#endif
+
+#define MPC_MULTIPLY_FLOAT_INT(X,Y) ((X)*(Y))
+#define MPC_SCALE_CONST(X,Y,Z) MPC_MULTIPLY_EX(X,MAKE_MPC_SAMPLE_EX(Y,Z),(Z))
+#define MPC_SCALE_CONST_SHL(X,Y,Z,S) MPC_MULTIPLY_EX(X,MAKE_MPC_SAMPLE_EX(Y,Z),(Z)-(S))
+#define MPC_SCALE_CONST_SHR(X,Y,Z,S) MPC_MULTIPLY_EX(X,MAKE_MPC_SAMPLE_EX(Y,Z),(Z)+(S))
+#define MPC_SHR(X,Y) ((X)>>(Y))
+#define MPC_SHL(X,Y) ((X)<<(Y))
+
+#else
+
+//in floating-point mode, decoded samples are in -1...1 range
+
+typedef float MPC_SAMPLE_FORMAT;
+
+#define MAKE_MPC_SAMPLE(X) ((MPC_SAMPLE_FORMAT)(X))
+#define MAKE_MPC_SAMPLE_EX(X,Y) ((MPC_SAMPLE_FORMAT)(X))
+
+#define MPC_MULTIPLY_FLOAT_INT(X,Y) ((X)*(Y))
+#define MPC_MULTIPLY(X,Y) ((X)*(Y))
+#define MPC_MULTIPLY_EX(X,Y,Z) ((X)*(Y))
+#define MPC_SCALE_CONST(X,Y,Z) ((X)*(Y))
+#define MPC_SCALE_CONST_SHL(X,Y,Z,S) ((X)*(Y))
+#define MPC_SCALE_CONST_SHR(X,Y,Z,S) ((X)*(Y))
+#define MPC_SHR(X,Y) (X)
+#define MPC_SHL(X,Y) (X)
+
+#endif
+
+#endif
diff --git a/akode/plugins/mpc_decoder/mppdec/readme.txt b/akode/plugins/mpc_decoder/mppdec/readme.txt
new file mode 100644
index 0000000..f4e3d62
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mppdec/readme.txt
@@ -0,0 +1,23 @@
+Portable Musepack decoder
+(C) 1999-2002 Buschmann/Klemm/Piecha/Wolf
+(C) 2003-2004 Peter Pawlowski
+
+See LGPL.txt for license/redistribution info.
+
+Usage: see sample.cpp
+
+Features:
+- Switchable fixed-point and floating-point modes - enable/disable "#define MPC_FIXED_POINT" in mpc_math.h
+- Endian-safe, verified running correctly on big-endian machines
+- Multiinstance and multithread safe
+- File access callbacks
+- No assembly code used, for full portability
+
+Verified correctly compiling/running under:
+- win32 / x86 / MSVC6 + SP5 + processor pack - very fast floating-point mode (goes above 200x on ~2GHz machines), fixed-point mode is significantly slower (~60x)
+- win32 / x86 / MSVC7.1 - slightly faster than MSVC6, fixed-point mode still relatively slow
+- win32 / x86 / DMCPP - fixed-point mode faster than MSVC, floating-point mode slower than expected with strange slowdowns when compiled with speed optimizations enabled
+- wince / ARM (32bit) / eVC4 + SP3 - fixed-point decoding speed on 400MHz XScale CPU is about 10x realtime
+- Darwin 7.3.0, MacOS X 10.3.3 / PowerPC970/G5 / GCC 3.3 - about 80x-100x decoding speed in both modes on 2GHz G5, thanks to TrNSZ for testing/feedback
+
+Package includes project files for MSVC6 and eVC4. \ No newline at end of file
diff --git a/akode/plugins/mpc_decoder/mppdec/requant.cpp b/akode/plugins/mpc_decoder/mppdec/requant.cpp
new file mode 100644
index 0000000..b2e22c9
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mppdec/requant.cpp
@@ -0,0 +1,112 @@
+#include "stdafx.h"
+
+/* C O N S T A N T S */
+// bits per sample for chosen quantizer
+const unsigned int Res_bit [18] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
+};
+
+// coefficients for requantization
+// 65536/step bzw. 65536/(2*D+1)
+
+
+
+#define _(X) MAKE_MPC_SAMPLE_EX(X,14)
+
+const MPC_SAMPLE_FORMAT __Cc [1 + 18] = {
+ _(111.285962475327f), // 32768/2/255*sqrt(3)
+ _(65536.000000000000f), _(21845.333333333332f), _(13107.200000000001f), _(9362.285714285713f),
+ _(7281.777777777777f), _(4369.066666666666f), _(2114.064516129032f), _(1040.253968253968f),
+ _(516.031496062992f), _(257.003921568627f), _(128.250489236790f), _(64.062561094819f),
+ _(32.015632633121f), _(16.003907203907f), _(8.000976681723f), _(4.000244155527f),
+ _(2.000061037018f), _(1.000015259021f)
+};
+
+#undef _
+
+// offset for requantization
+// 2*D+1 = steps of quantizer
+const int __Dc [1 + 18] = {
+ 2,
+ 0, 1, 2, 3, 4, 7, 15, 31, 63,
+ 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767
+};
+
+static unsigned find_shift(double fval)
+{
+ MPC_INT64 val = (MPC_INT64)fval;
+ if (val<0) val = -val;
+ unsigned ptr = 0;
+ while(val) {val>>=1;ptr++;}
+
+ return ptr > 31 ? 0 : 31 - ptr;
+}
+
+/* F U N C T I O N S */
+
+#define SET_SCF(N,X) SCF[N] = MAKE_MPC_SAMPLE_EX(X,SCF_shift[N] = find_shift(X));
+
+void
+MPC_decoder::ScaleOutput ( double factor )
+{
+#ifndef MPC_FIXED_POINT
+ factor *= 1.0 / (double)(1<<(MPC_FIXED_POINT_SHIFT-1));
+#else
+ factor *= 1.0 / (double)(1<<(16 - MPC_FIXED_POINT_SHIFT));
+#endif
+ int n;
+ double f1 = factor;
+ double f2 = factor;
+
+ // handles +1.58...-98.41 dB, where's scf[n] / scf[n-1] = 1.20050805774840750476
+
+ SET_SCF(1,factor);
+
+ f1 *= 0.83298066476582673961;
+ f2 *= 1/0.83298066476582673961;
+
+ for ( n = 1; n <= 128; n++ ) {
+ SET_SCF((unsigned char)(1+n),f1);
+ SET_SCF((unsigned char)(1-n),f2);
+ f1 *= 0.83298066476582673961;
+ f2 *= 1/0.83298066476582673961;
+ }
+}
+
+void
+MPC_decoder::Quantisierungsmodes ( void ) // conversion: index -> quantizer (bitstream reading)
+{ // conversion: quantizer -> index (bitstream writing)
+ int Band = 0;
+ int i;
+
+ do {
+ Q_bit [Band] = 4;
+ for ( i = 0; i < 16-1; i++ )
+ Q_res [Band] [i] = i;
+ Q_res [Band][i] = 17;
+ Band++;
+ } while ( Band < 11 );
+
+ do {
+ Q_bit [Band] = 3;
+ for ( i = 0; i < 8-1; i++ )
+ Q_res [Band] [i] = i;
+ Q_res [Band] [i] = 17;
+ Band++;
+ } while ( Band < 23 );
+
+ do {
+ Q_bit [Band] = 2;
+ for ( i = 0; i < 4-1; i++ )
+ Q_res [Band] [i] = i;
+ Q_res [Band] [i] = 17;
+ Band++;
+ } while ( Band < 32 );
+}
+
+void
+MPC_decoder::initialisiere_Quantisierungstabellen ( double scale_factor )
+{
+ Quantisierungsmodes ();
+ ScaleOutput ( scale_factor );
+}
diff --git a/akode/plugins/mpc_decoder/mppdec/requant.h b/akode/plugins/mpc_decoder/mppdec/requant.h
new file mode 100644
index 0000000..c5b8794
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mppdec/requant.h
@@ -0,0 +1,14 @@
+#ifndef _requant_h
+#define _requant_h_
+
+#include "mpc_dec.h"
+
+/* C O N S T A N T S */
+extern const unsigned int Res_bit [18]; // bits per sample for chosen quantizer
+extern const MPC_SAMPLE_FORMAT __Cc [1 + 18]; // coefficients for requantization
+extern const int __Dc [1 + 18]; // offset for requantization
+
+#define Cc (__Cc + 1)
+#define Dc (__Dc + 1)
+
+#endif
diff --git a/akode/plugins/mpc_decoder/mppdec/stdafx.cpp b/akode/plugins/mpc_decoder/mppdec/stdafx.cpp
new file mode 100644
index 0000000..81b3bac
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mppdec/stdafx.cpp
@@ -0,0 +1,6 @@
+// stdafx.cpp : source file that includes just the standard includes
+// mpcdec.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
diff --git a/akode/plugins/mpc_decoder/mppdec/stdafx.h b/akode/plugins/mpc_decoder/mppdec/stdafx.h
new file mode 100644
index 0000000..771f6fe
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mppdec/stdafx.h
@@ -0,0 +1,27 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#if !defined(AFX_STDAFX_H__B71FBBBC_81CB_47B5_A555_53A45CFD74F3__INCLUDED_)
+#define AFX_STDAFX_H__B71FBBBC_81CB_47B5_A555_53A45CFD74F3__INCLUDED_
+
+#ifdef _MSC_VER
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+#endif // _MSC_VER
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+#include "mpc_dec.h"
+#include "requant.h"
+
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_STDAFX_H__B71FBBBC_81CB_47B5_A555_53A45CFD74F3__INCLUDED_)
diff --git a/akode/plugins/mpc_decoder/mppdec/streaminfo.cpp b/akode/plugins/mpc_decoder/mppdec/streaminfo.cpp
new file mode 100644
index 0000000..fa61a23
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mppdec/streaminfo.cpp
@@ -0,0 +1,210 @@
+#include "stdafx.h"
+
+long JumpID3v2 ( MPC_reader* fp );//idtag.cpp
+
+static const char*
+Stringify ( unsigned int profile ) // profile is 0...15, where 7...13 is used
+{
+ static const char na [] = "n.a.";
+ static const char* Names [] = {
+ na, "'Unstable/Experimental'", na, na,
+ na, "'quality 0'", "'quality 1'", "'Telephone'",
+ "'Thumb'", "'Radio'", "'Standard'", "'Xtreme'",
+ "'Insane'", "'BrainDead'", "'quality 9'", "'quality 10'"
+ };
+
+ return profile >= sizeof(Names)/sizeof(*Names) ? na : Names [profile];
+}
+
+// read information from SV8 header
+int StreamInfo::ReadHeaderSV8 ( MPC_reader* fp )
+{
+ return 0;
+}
+
+// read information from SV7 header
+int StreamInfo::ReadHeaderSV7 ( unsigned int HeaderData [8] )
+{
+ const int samplefreqs [4] = { 44100, 48000, 37800, 32000 };
+
+ //unsigned int HeaderData [8];
+ unsigned short EstimatedPeakTitle = 0;
+
+ if ( simple.StreamVersion > 0x71 ) {
+// Update (simple.StreamVersion);
+ return 0;
+ }
+
+ /*
+ if ( !fp->seek ( simple.HeaderPosition, SEEK_SET ) ) // seek to header start
+ return ERROR_CODE_FILE;
+ if ( fp->read ( HeaderData, sizeof HeaderData) != sizeof HeaderData )
+ return ERROR_CODE_FILE;
+ */
+
+ simple.Bitrate = 0;
+ simple.Frames = HeaderData[1];
+ simple.IS = 0;
+ simple.MS = (HeaderData[2] >> 30) & 0x0001;
+ simple.MaxBand = (HeaderData[2] >> 24) & 0x003F;
+ simple.BlockSize = 1;
+ simple.Profile = (HeaderData[2] << 8) >> 28;
+ simple.ProfileName = Stringify ( simple.Profile );
+
+ simple.SampleFreq = samplefreqs [(HeaderData[2]>>16) & 0x0003];
+
+ EstimatedPeakTitle = (unsigned short)( HeaderData[2] & 0xFFFF ); // read the ReplayGain data
+ simple.GainTitle = (unsigned short)((HeaderData[3] >> 16) & 0xFFFF );
+ simple.PeakTitle = (unsigned short)( HeaderData[3] & 0xFFFF );
+ simple.GainAlbum = (unsigned short)((HeaderData[4] >> 16) & 0xFFFF );
+ simple.PeakAlbum = (unsigned short)( HeaderData[4] & 0xFFFF );
+
+ simple.IsTrueGapless = (HeaderData[5] >> 31) & 0x0001; // true gapless: used?
+ simple.LastFrameSamples = (HeaderData[5] >> 20) & 0x07FF; // true gapless: valid samples for last frame
+
+ simple.EncoderVersion = (HeaderData[6] >> 24) & 0x00FF;
+ if ( simple.EncoderVersion == 0 ) {
+ sprintf ( simple.Encoder, "Buschmann 1.7.0...9, Klemm 0.90...1.05" );
+ } else {
+ switch ( simple.EncoderVersion % 10 ) {
+ case 0:
+ sprintf ( simple.Encoder, "Release %u.%u", simple.EncoderVersion/100, simple.EncoderVersion/10%10 );
+ break;
+ case 2: case 4: case 6: case 8:
+ sprintf ( simple.Encoder, "Beta %u.%02u", simple.EncoderVersion/100, simple.EncoderVersion%100 );
+ break;
+ default:
+ sprintf ( simple.Encoder, "--Alpha-- %u.%02u", simple.EncoderVersion/100, simple.EncoderVersion%100 );
+ break;
+ }
+ }
+
+// if ( simple.PeakTitle == 0 ) // there is no correct PeakTitle contained within header
+// simple.PeakTitle = (unsigned short)(EstimatedPeakTitle * 1.18);
+// if ( simple.PeakAlbum == 0 )
+// simple.PeakAlbum = simple.PeakTitle; // no correct PeakAlbum, use PeakTitle
+
+ //simple.SampleFreq = 44100; // AB: used by all files up to SV7
+ simple.Channels = 2;
+
+ return ERROR_CODE_OK;
+}
+
+// read information from SV4-SV6 header
+int StreamInfo::ReadHeaderSV6 ( unsigned int HeaderData [8] )
+{
+ //unsigned int HeaderData [8];
+
+ /*
+ if ( !fp->seek ( simple.HeaderPosition, SEEK_SET ) ) // seek to header start
+ return ERROR_CODE_FILE;
+ if ( fp->read ( HeaderData, sizeof HeaderData ) != sizeof HeaderData )
+ return ERROR_CODE_FILE;
+ */
+
+ simple.Bitrate = (HeaderData[0] >> 23) & 0x01FF; // read the file-header (SV6 and below)
+ simple.IS = (HeaderData[0] >> 22) & 0x0001;
+ simple.MS = (HeaderData[0] >> 21) & 0x0001;
+ simple.StreamVersion = (HeaderData[0] >> 11) & 0x03FF;
+ simple.MaxBand = (HeaderData[0] >> 6) & 0x001F;
+ simple.BlockSize = (HeaderData[0] ) & 0x003F;
+ simple.Profile = 0;
+ simple.ProfileName = Stringify ( (unsigned)(-1) );
+ if ( simple.StreamVersion >= 5 )
+ simple.Frames = HeaderData[1]; // 32 bit
+ else
+ simple.Frames = (HeaderData[1]>>16); // 16 bit
+
+ simple.GainTitle = 0; // not supported
+ simple.PeakTitle = 0;
+ simple.GainAlbum = 0;
+ simple.PeakAlbum = 0;
+
+ simple.LastFrameSamples = 0;
+ simple.IsTrueGapless = 0;
+
+ simple.EncoderVersion = 0;
+ simple.Encoder[0] = '\0';
+
+ if ( simple.StreamVersion == 7 ) return ERROR_CODE_SV7BETA; // are there any unsupported parameters used?
+ if ( simple.Bitrate != 0 ) return ERROR_CODE_CBR;
+ if ( simple.IS != 0 ) return ERROR_CODE_IS;
+ if ( simple.BlockSize != 1 ) return ERROR_CODE_BLOCKSIZE;
+
+ if ( simple.StreamVersion < 6 ) // Bugfix: last frame was invalid for up to SV5
+ simple.Frames -= 1;
+
+ simple.SampleFreq = 44100; // AB: used by all files up to SV7
+ simple.Channels = 2;
+
+ if ( simple.StreamVersion < 4 || simple.StreamVersion > 7 )
+ return ERROR_CODE_INVALIDSV;
+
+ return ERROR_CODE_OK;
+}
+
+static unsigned int swap32(unsigned int val)
+{
+ const unsigned char * src = (const unsigned char*)&val;
+ return (unsigned int)src[0] | ((unsigned int)src[1] << 8) | ((unsigned int)src[2] << 16) | ((unsigned int)src[3] << 24);
+}
+
+// reads file header and tags
+int StreamInfo::ReadStreamInfo ( MPC_reader* fp)
+{
+ unsigned int HeaderData[8];
+ int Error = 0;
+
+ //memset ( &simple, 0, sizeof (BasicData) ); // Reset Info-Data
+
+
+ if ( (simple.HeaderPosition = JumpID3v2 (fp)) < 0 ) // get header position
+ return ERROR_CODE_FILE;
+
+ if ( !fp->seek ( simple.HeaderPosition, SEEK_SET ) ) // seek to first byte of mpc data
+ return ERROR_CODE_FILE;
+ if ( fp->read ( HeaderData, 8*4 ) != 8*4 )
+ return ERROR_CODE_FILE;
+ if (!fp->seek(simple.HeaderPosition+6*4,SEEK_SET)) return ERROR_CODE_FILE;
+
+/* if ( fp->read ( HeaderData, 6*4 ) != 6*4 )
+ return ERROR_CODE_FILE;
+ HeaderData[6]=HeaderData[7]=0;
+ */
+ /*
+ if ( fp->seek ( 0L, SEEK_END ) != 0 ) // get filelength
+ return ERROR_CODE_FILE;
+ simple.TotalFileLength = fp->tell();
+ */
+ simple.TotalFileLength = fp->get_size ();
+ simple.TagOffset = simple.TotalFileLength;
+
+ if ( memcmp ( HeaderData, "MP+", 3 ) == 0 )
+ {
+#ifndef MPC_LITTLE_ENDIAN
+ {
+ unsigned int ptr;
+ for(ptr=0;ptr<8;ptr++) HeaderData[ptr] = swap32(HeaderData[ptr]);
+ }
+#endif
+ simple.StreamVersion = HeaderData[0] >> 24;
+
+ if ( (simple.StreamVersion & 15) >= 8 ) // StreamVersion 8
+ Error = ReadHeaderSV8 ( fp );
+ else if ( (simple.StreamVersion & 15) == 7 ) // StreamVersion 7
+ Error = ReadHeaderSV7 ( HeaderData );
+ } else { // StreamVersion 4-6
+ Error = ReadHeaderSV6 ( HeaderData );
+ }
+
+
+ simple.PCMSamples = 1152 * simple.Frames - 576; // estimation, exact value needs too much time
+ if ( simple.PCMSamples > 0 )
+ simple.AverageBitrate = (simple.TagOffset - simple.HeaderPosition) * 8. * simple.SampleFreq / simple.PCMSamples;
+ else
+ simple.AverageBitrate = 0;
+
+ return Error;
+}
+
+/* end of in_mpc.c */
diff --git a/akode/plugins/mpc_decoder/mppdec/streaminfo.h b/akode/plugins/mpc_decoder/mppdec/streaminfo.h
new file mode 100644
index 0000000..19bf2e9
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mppdec/streaminfo.h
@@ -0,0 +1,70 @@
+#ifndef _mpc_streaminfo_h_
+#define _mpc_streaminfo_h_
+
+#ifndef _mpc_dec_h_
+class MPC_reader;
+#endif
+
+
+// error codes
+#define ERROR_CODE_OK 0
+#define ERROR_CODE_FILE -1
+#define ERROR_CODE_SV7BETA 1
+#define ERROR_CODE_CBR 2
+#define ERROR_CODE_IS 3
+#define ERROR_CODE_BLOCKSIZE 4
+#define ERROR_CODE_INVALIDSV 5
+
+
+class StreamInfo {
+public:
+ typedef long off_t;
+
+ typedef struct {
+ unsigned int SampleFreq;
+ unsigned int Channels;
+ off_t HeaderPosition; // byte position of header
+ unsigned int StreamVersion; // Streamversion of current file
+ unsigned int Bitrate; // bitrate of current file (bps)
+ double AverageBitrate; // Average bitrate in bits/sec
+ unsigned int Frames; // number of frames contained
+ MPC_INT64 PCMSamples;
+ unsigned int MaxBand; // maximum band-index used (0...31)
+ unsigned int IS; // Intensity Stereo (0: off, 1: on)
+ unsigned int MS; // Mid/Side Stereo (0: off, 1: on)
+ unsigned int BlockSize; // only needed for SV4...SV6 -> not supported
+ unsigned int Profile; // quality profile
+ const char* ProfileName;
+
+ // ReplayGain related data
+ short GainTitle;
+ short GainAlbum;
+ unsigned short PeakAlbum;
+ unsigned short PeakTitle;
+
+ // true gapless stuff
+ unsigned int IsTrueGapless; // is true gapless used?
+ unsigned int LastFrameSamples; // number of valid samples within last frame
+
+ unsigned int EncoderVersion; // version of encoder used
+ char Encoder[256];
+
+ off_t TagOffset;
+ off_t TotalFileLength;
+ } BasicData;
+
+ BasicData simple;
+
+public:
+ StreamInfo ();
+ int ReadStreamInfo ( MPC_reader *fp );
+ MPC_INT64 GetLenthSamples();
+ double GetLength();//in seconds
+
+private:
+ int ReadHeaderSV6 ( unsigned int HeaderData [8] );
+ int ReadHeaderSV7 ( unsigned int HeaderData [8] );
+ int ReadHeaderSV8 ( MPC_reader* fp );
+};
+
+#endif //_mpc_streaminfo_h_
diff --git a/akode/plugins/mpc_decoder/mppdec/synth_filter.cpp b/akode/plugins/mpc_decoder/mppdec/synth_filter.cpp
new file mode 100644
index 0000000..256417a
--- /dev/null
+++ b/akode/plugins/mpc_decoder/mppdec/synth_filter.cpp
@@ -0,0 +1,403 @@
+#include "stdafx.h"
+
+typedef int ptrdiff_t;
+
+
+/* C O N S T A N T S */
+#undef _
+
+#define MPC_FIXED_POINT_SYNTH_FIX 2
+#define MPC_FIXED_POINT_SYNTH_FIX2 0
+
+#define Di_opt_shift 30
+#define _(value) MAKE_MPC_SAMPLE_EX((double)value/(double)(0x10000 << MPC_FIXED_POINT_SYNTH_FIX2),Di_opt_shift)
+
+
+static const MPC_SAMPLE_FORMAT Di_opt [32] [16] = {
+ { _( 0), _( -29), _( 213), _( -459), _( 2037), _(-5153), _( 6574), _(-37489), _(75038), _(37489), _(6574), _( 5153), _(2037), _( 459), _(213), _(29) },
+ { _( -1), _( -31), _( 218), _( -519), _( 2000), _(-5517), _( 5959), _(-39336), _(74992), _(35640), _(7134), _( 4788), _(2063), _( 401), _(208), _(26) },
+ { _( -1), _( -35), _( 222), _( -581), _( 1952), _(-5879), _( 5288), _(-41176), _(74856), _(33791), _(7640), _( 4425), _(2080), _( 347), _(202), _(24) },
+ { _( -1), _( -38), _( 225), _( -645), _( 1893), _(-6237), _( 4561), _(-43006), _(74630), _(31947), _(8092), _( 4063), _(2087), _( 294), _(196), _(21) },
+ { _( -1), _( -41), _( 227), _( -711), _( 1822), _(-6589), _( 3776), _(-44821), _(74313), _(30112), _(8492), _( 3705), _(2085), _( 244), _(190), _(19) },
+ { _( -1), _( -45), _( 228), _( -779), _( 1739), _(-6935), _( 2935), _(-46617), _(73908), _(28289), _(8840), _( 3351), _(2075), _( 197), _(183), _(17) },
+ { _( -1), _( -49), _( 228), _( -848), _( 1644), _(-7271), _( 2037), _(-48390), _(73415), _(26482), _(9139), _( 3004), _(2057), _( 153), _(176), _(16) },
+ { _( -2), _( -53), _( 227), _( -919), _( 1535), _(-7597), _( 1082), _(-50137), _(72835), _(24694), _(9389), _( 2663), _(2032), _( 111), _(169), _(14) },
+ { _( -2), _( -58), _( 224), _( -991), _( 1414), _(-7910), _( 70), _(-51853), _(72169), _(22929), _(9592), _( 2330), _(2001), _( 72), _(161), _(13) },
+ { _( -2), _( -63), _( 221), _(-1064), _( 1280), _(-8209), _( -998), _(-53534), _(71420), _(21189), _(9750), _( 2006), _(1962), _( 36), _(154), _(11) },
+ { _( -2), _( -68), _( 215), _(-1137), _( 1131), _(-8491), _( -2122), _(-55178), _(70590), _(19478), _(9863), _( 1692), _(1919), _( 2), _(147), _(10) },
+ { _( -3), _( -73), _( 208), _(-1210), _( 970), _(-8755), _( -3300), _(-56778), _(69679), _(17799), _(9935), _( 1388), _(1870), _( -29), _(139), _( 9) },
+ { _( -3), _( -79), _( 200), _(-1283), _( 794), _(-8998), _( -4533), _(-58333), _(68692), _(16155), _(9966), _( 1095), _(1817), _( -57), _(132), _( 8) },
+ { _( -4), _( -85), _( 189), _(-1356), _( 605), _(-9219), _( -5818), _(-59838), _(67629), _(14548), _(9959), _( 814), _(1759), _( -83), _(125), _( 7) },
+ { _( -4), _( -91), _( 177), _(-1428), _( 402), _(-9416), _( -7154), _(-61289), _(66494), _(12980), _(9916), _( 545), _(1698), _(-106), _(117), _( 7) },
+ { _( -5), _( -97), _( 163), _(-1498), _( 185), _(-9585), _( -8540), _(-62684), _(65290), _(11455), _(9838), _( 288), _(1634), _(-127), _(111), _( 6) },
+ { _( -5), _(-104), _( 146), _(-1567), _( -45), _(-9727), _( -9975), _(-64019), _(64019), _( 9975), _(9727), _( 45), _(1567), _(-146), _(104), _( 5) },
+ { _( -6), _(-111), _( 127), _(-1634), _( -288), _(-9838), _(-11455), _(-65290), _(62684), _( 8540), _(9585), _( -185), _(1498), _(-163), _( 97), _( 5) },
+ { _( -7), _(-117), _( 106), _(-1698), _( -545), _(-9916), _(-12980), _(-66494), _(61289), _( 7154), _(9416), _( -402), _(1428), _(-177), _( 91), _( 4) },
+ { _( -7), _(-125), _( 83), _(-1759), _( -814), _(-9959), _(-14548), _(-67629), _(59838), _( 5818), _(9219), _( -605), _(1356), _(-189), _( 85), _( 4) },
+ { _( -8), _(-132), _( 57), _(-1817), _(-1095), _(-9966), _(-16155), _(-68692), _(58333), _( 4533), _(8998), _( -794), _(1283), _(-200), _( 79), _( 3) },
+ { _( -9), _(-139), _( 29), _(-1870), _(-1388), _(-9935), _(-17799), _(-69679), _(56778), _( 3300), _(8755), _( -970), _(1210), _(-208), _( 73), _( 3) },
+ { _(-10), _(-147), _( -2), _(-1919), _(-1692), _(-9863), _(-19478), _(-70590), _(55178), _( 2122), _(8491), _(-1131), _(1137), _(-215), _( 68), _( 2) },
+ { _(-11), _(-154), _( -36), _(-1962), _(-2006), _(-9750), _(-21189), _(-71420), _(53534), _( 998), _(8209), _(-1280), _(1064), _(-221), _( 63), _( 2) },
+ { _(-13), _(-161), _( -72), _(-2001), _(-2330), _(-9592), _(-22929), _(-72169), _(51853), _( -70), _(7910), _(-1414), _( 991), _(-224), _( 58), _( 2) },
+ { _(-14), _(-169), _(-111), _(-2032), _(-2663), _(-9389), _(-24694), _(-72835), _(50137), _(-1082), _(7597), _(-1535), _( 919), _(-227), _( 53), _( 2) },
+ { _(-16), _(-176), _(-153), _(-2057), _(-3004), _(-9139), _(-26482), _(-73415), _(48390), _(-2037), _(7271), _(-1644), _( 848), _(-228), _( 49), _( 1) },
+ { _(-17), _(-183), _(-197), _(-2075), _(-3351), _(-8840), _(-28289), _(-73908), _(46617), _(-2935), _(6935), _(-1739), _( 779), _(-228), _( 45), _( 1) },
+ { _(-19), _(-190), _(-244), _(-2085), _(-3705), _(-8492), _(-30112), _(-74313), _(44821), _(-3776), _(6589), _(-1822), _( 711), _(-227), _( 41), _( 1) },
+ { _(-21), _(-196), _(-294), _(-2087), _(-4063), _(-8092), _(-31947), _(-74630), _(43006), _(-4561), _(6237), _(-1893), _( 645), _(-225), _( 38), _( 1) },
+ { _(-24), _(-202), _(-347), _(-2080), _(-4425), _(-7640), _(-33791), _(-74856), _(41176), _(-5288), _(5879), _(-1952), _( 581), _(-222), _( 35), _( 1) },
+ { _(-26), _(-208), _(-401), _(-2063), _(-4788), _(-7134), _(-35640), _(-74992), _(39336), _(-5959), _(5517), _(-2000), _( 519), _(-218), _( 31), _( 1) }
+};
+
+#undef _
+
+/* F U N K T I O N E N */
+void
+MPC_decoder::Reset_V ( void )
+{
+ memset ( V_L, 0, sizeof V_L );
+ memset ( V_R, 0, sizeof V_R );
+}
+
+
+static void Calculate_New_V ( const MPC_SAMPLE_FORMAT * Sample, MPC_SAMPLE_FORMAT * V )
+{
+ // Calculating new V-buffer values for left channel
+ // calculate new V-values (ISO-11172-3, p. 39)
+ // based upon fast-MDCT algorithm by Byeong Gi Lee
+ /*static*/ MPC_SAMPLE_FORMAT A00, A01, A02, A03, A04, A05, A06, A07, A08, A09, A10, A11, A12, A13, A14, A15;
+ /*static*/ MPC_SAMPLE_FORMAT B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B11, B12, B13, B14, B15;
+ MPC_SAMPLE_FORMAT tmp;
+
+ A00 = Sample[ 0] + Sample[31];
+ A01 = Sample[ 1] + Sample[30];
+ A02 = Sample[ 2] + Sample[29];
+ A03 = Sample[ 3] + Sample[28];
+ A04 = Sample[ 4] + Sample[27];
+ A05 = Sample[ 5] + Sample[26];
+ A06 = Sample[ 6] + Sample[25];
+ A07 = Sample[ 7] + Sample[24];
+ A08 = Sample[ 8] + Sample[23];
+ A09 = Sample[ 9] + Sample[22];
+ A10 = Sample[10] + Sample[21];
+ A11 = Sample[11] + Sample[20];
+ A12 = Sample[12] + Sample[19];
+ A13 = Sample[13] + Sample[18];
+ A14 = Sample[14] + Sample[17];
+ A15 = Sample[15] + Sample[16];
+
+ B00 = A00 + A15;
+ B01 = A01 + A14;
+ B02 = A02 + A13;
+ B03 = A03 + A12;
+ B04 = A04 + A11;
+ B05 = A05 + A10;
+ B06 = A06 + A09;
+ B07 = A07 + A08;;
+ B08 = MPC_SCALE_CONST((A00 - A15) , 0.5024192929f , 31);
+ B09 = MPC_SCALE_CONST((A01 - A14) , 0.5224986076f , 31);
+ B10 = MPC_SCALE_CONST((A02 - A13) , 0.5669440627f , 31);
+ B11 = MPC_SCALE_CONST((A03 - A12) , 0.6468217969f , 31);
+ B12 = MPC_SCALE_CONST((A04 - A11) , 0.7881546021f , 31);
+ B13 = MPC_SCALE_CONST((A05 - A10) , 1.0606776476f , 30);
+ B14 = MPC_SCALE_CONST((A06 - A09) , 1.7224471569f , 30);
+ B15 = MPC_SCALE_CONST((A07 - A08) , 5.1011486053f , 28);
+
+ A00 = B00 + B07;
+ A01 = B01 + B06;
+ A02 = B02 + B05;
+ A03 = B03 + B04;
+ A04 = MPC_SCALE_CONST((B00 - B07) , 0.5097956061f , 31);
+ A05 = MPC_SCALE_CONST((B01 - B06) , 0.6013448834f , 31);
+ A06 = MPC_SCALE_CONST((B02 - B05) , 0.8999761939f , 31);
+ A07 = MPC_SCALE_CONST((B03 - B04) , 2.5629155636f , 29);
+ A08 = B08 + B15;
+ A09 = B09 + B14;
+ A10 = B10 + B13;
+ A11 = B11 + B12;
+ A12 = MPC_SCALE_CONST((B08 - B15) , 0.5097956061f , 31);
+ A13 = MPC_SCALE_CONST((B09 - B14) , 0.6013448834f , 31);
+ A14 = MPC_SCALE_CONST((B10 - B13) , 0.8999761939f , 31);
+ A15 = MPC_SCALE_CONST((B11 - B12) , 2.5629155636f , 29);
+
+ B00 = A00 + A03;
+ B01 = A01 + A02;
+ B02 = MPC_SCALE_CONST((A00 - A03) , 0.5411961079f , 31);
+ B03 = MPC_SCALE_CONST((A01 - A02) , 1.3065630198f , 30);
+ B04 = A04 + A07;
+ B05 = A05 + A06;
+ B06 = MPC_SCALE_CONST((A04 - A07) , 0.5411961079f , 31);
+ B07 = MPC_SCALE_CONST((A05 - A06) , 1.3065630198f , 30);
+ B08 = A08 + A11;
+ B09 = A09 + A10;
+ B10 = MPC_SCALE_CONST((A08 - A11) , 0.5411961079f , 31);
+ B11 = MPC_SCALE_CONST((A09 - A10) , 1.3065630198f , 30);
+ B12 = A12 + A15;
+ B13 = A13 + A14;
+ B14 = MPC_SCALE_CONST((A12 - A15) , 0.5411961079f , 31);
+ B15 = MPC_SCALE_CONST((A13 - A14) , 1.3065630198f , 30);
+
+ A00 = B00 + B01;
+ A01 = MPC_SCALE_CONST((B00 - B01) , 0.7071067691f , 31);
+ A02 = B02 + B03;
+ A03 = MPC_SCALE_CONST((B02 - B03) , 0.7071067691f , 31);
+ A04 = B04 + B05;
+ A05 = MPC_SCALE_CONST((B04 - B05) , 0.7071067691f , 31);
+ A06 = B06 + B07;
+ A07 = MPC_SCALE_CONST((B06 - B07) , 0.7071067691f , 31);
+ A08 = B08 + B09;
+ A09 = MPC_SCALE_CONST((B08 - B09) , 0.7071067691f , 31);
+ A10 = B10 + B11;
+ A11 = MPC_SCALE_CONST((B10 - B11) , 0.7071067691f , 31);
+ A12 = B12 + B13;
+ A13 = MPC_SCALE_CONST((B12 - B13) , 0.7071067691f , 31);
+ A14 = B14 + B15;
+ A15 = MPC_SCALE_CONST((B14 - B15) , 0.7071067691f , 31);
+
+ V[48] = -A00;
+ V[ 0] = A01;
+ V[40] = -A02 - (V[ 8] = A03);
+ V[36] = -((V[ 4] = A05 + (V[12] = A07)) + A06);
+ V[44] = - A04 - A06 - A07;
+ V[ 6] = (V[10] = A11 + (V[14] = A15)) + A13;
+ V[38] = (V[34] = -(V[ 2] = A09 + A13 + A15) - A14) + A09 - A10 - A11;
+ V[46] = (tmp = -(A12 + A14 + A15)) - A08;
+ V[42] = tmp - A10 - A11;
+
+ A00 = MPC_SCALE_CONST_SHR((Sample[ 0] - Sample[31]) , 0.5006030202f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A01 = MPC_SCALE_CONST_SHR((Sample[ 1] - Sample[30]) , 0.5054709315f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A02 = MPC_SCALE_CONST_SHR((Sample[ 2] - Sample[29]) , 0.5154473186f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A03 = MPC_SCALE_CONST_SHR((Sample[ 3] - Sample[28]) , 0.5310425758f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A04 = MPC_SCALE_CONST_SHR((Sample[ 4] - Sample[27]) , 0.5531039238f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A05 = MPC_SCALE_CONST_SHR((Sample[ 5] - Sample[26]) , 0.5829349756f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A06 = MPC_SCALE_CONST_SHR((Sample[ 6] - Sample[25]) , 0.6225041151f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A07 = MPC_SCALE_CONST_SHR((Sample[ 7] - Sample[24]) , 0.6748083234f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A08 = MPC_SCALE_CONST_SHR((Sample[ 8] - Sample[23]) , 0.7445362806f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A09 = MPC_SCALE_CONST_SHR((Sample[ 9] - Sample[22]) , 0.8393496275f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A10 = MPC_SCALE_CONST_SHR((Sample[10] - Sample[21]) , 0.9725682139f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A11 = MPC_SCALE_CONST_SHR((Sample[11] - Sample[20]) , 1.1694399118f , 30, MPC_FIXED_POINT_SYNTH_FIX);
+ A12 = MPC_SCALE_CONST_SHR((Sample[12] - Sample[19]) , 1.4841645956f , 30, MPC_FIXED_POINT_SYNTH_FIX);
+ A13 = MPC_SCALE_CONST_SHR((Sample[13] - Sample[18]) , 2.0577809811f , 29, MPC_FIXED_POINT_SYNTH_FIX);
+ A14 = MPC_SCALE_CONST_SHR((Sample[14] - Sample[17]) , 3.4076085091f , 29, MPC_FIXED_POINT_SYNTH_FIX);
+ A15 = MPC_SCALE_CONST_SHR((Sample[15] - Sample[16]) , 10.1900081635f, 27 ,MPC_FIXED_POINT_SYNTH_FIX);
+
+ B00 = A00 + A15;
+ B01 = A01 + A14;
+ B02 = A02 + A13;
+ B03 = A03 + A12;
+ B04 = A04 + A11;
+ B05 = A05 + A10;
+ B06 = A06 + A09;
+ B07 = A07 + A08;
+ B08 = MPC_SCALE_CONST((A00 - A15) , 0.5024192929f , 31);
+ B09 = MPC_SCALE_CONST((A01 - A14) , 0.5224986076f , 31);
+ B10 = MPC_SCALE_CONST((A02 - A13) , 0.5669440627f , 31);
+ B11 = MPC_SCALE_CONST((A03 - A12) , 0.6468217969f , 31);
+ B12 = MPC_SCALE_CONST((A04 - A11) , 0.7881546021f , 31);
+ B13 = MPC_SCALE_CONST((A05 - A10) , 1.0606776476f , 30);
+ B14 = MPC_SCALE_CONST((A06 - A09) , 1.7224471569f , 30);
+ B15 = MPC_SCALE_CONST((A07 - A08) , 5.1011486053f , 28);
+
+ A00 = B00 + B07;
+ A01 = B01 + B06;
+ A02 = B02 + B05;
+ A03 = B03 + B04;
+ A04 = MPC_SCALE_CONST((B00 - B07) , 0.5097956061f , 31);
+ A05 = MPC_SCALE_CONST((B01 - B06) , 0.6013448834f , 31);
+ A06 = MPC_SCALE_CONST((B02 - B05) , 0.8999761939f , 31);
+ A07 = MPC_SCALE_CONST((B03 - B04) , 2.5629155636f , 29);
+ A08 = B08 + B15;
+ A09 = B09 + B14;
+ A10 = B10 + B13;
+ A11 = B11 + B12;
+ A12 = MPC_SCALE_CONST((B08 - B15) , 0.5097956061f , 31);
+ A13 = MPC_SCALE_CONST((B09 - B14) , 0.6013448834f , 31);
+ A14 = MPC_SCALE_CONST((B10 - B13) , 0.8999761939f , 31);
+ A15 = MPC_SCALE_CONST((B11 - B12) , 2.5629155636f , 29);
+
+ B00 = A00 + A03;
+ B01 = A01 + A02;
+ B02 = MPC_SCALE_CONST((A00 - A03) , 0.5411961079f , 31);
+ B03 = MPC_SCALE_CONST((A01 - A02) , 1.3065630198f , 30);
+ B04 = A04 + A07;
+ B05 = A05 + A06;
+ B06 = MPC_SCALE_CONST((A04 - A07) , 0.5411961079f , 31);
+ B07 = MPC_SCALE_CONST((A05 - A06) , 1.3065630198f , 30);
+ B08 = A08 + A11;
+ B09 = A09 + A10;
+ B10 = MPC_SCALE_CONST((A08 - A11) , 0.5411961079f , 31);
+ B11 = MPC_SCALE_CONST((A09 - A10) , 1.3065630198f , 30);
+ B12 = A12 + A15;
+ B13 = A13 + A14;
+ B14 = MPC_SCALE_CONST((A12 - A15) , 0.5411961079f , 31);
+ B15 = MPC_SCALE_CONST((A13 - A14) , 1.3065630198f , 30);
+
+ A00 = MPC_SHL(B00 + B01, MPC_FIXED_POINT_SYNTH_FIX);
+ A01 = MPC_SCALE_CONST_SHL((B00 - B01) , 0.7071067691f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A02 = MPC_SHL(B02 + B03, MPC_FIXED_POINT_SYNTH_FIX);
+ A03 = MPC_SCALE_CONST_SHL((B02 - B03) , 0.7071067691f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A04 = MPC_SHL(B04 + B05, MPC_FIXED_POINT_SYNTH_FIX);
+ A05 = MPC_SCALE_CONST_SHL((B04 - B05) , 0.7071067691f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A06 = MPC_SHL(B06 + B07, MPC_FIXED_POINT_SYNTH_FIX);
+ A07 = MPC_SCALE_CONST_SHL((B06 - B07) , 0.7071067691f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A08 = MPC_SHL(B08 + B09, MPC_FIXED_POINT_SYNTH_FIX);
+ A09 = MPC_SCALE_CONST_SHL((B08 - B09) , 0.7071067691f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A10 = MPC_SHL(B10 + B11, MPC_FIXED_POINT_SYNTH_FIX);
+ A11 = MPC_SCALE_CONST_SHL((B10 - B11) , 0.7071067691f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A12 = MPC_SHL(B12 + B13, MPC_FIXED_POINT_SYNTH_FIX);
+ A13 = MPC_SCALE_CONST_SHL((B12 - B13) , 0.7071067691f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+ A14 = MPC_SHL(B14 + B15, MPC_FIXED_POINT_SYNTH_FIX);
+ A15 = MPC_SCALE_CONST_SHL((B14 - B15) , 0.7071067691f , 31, MPC_FIXED_POINT_SYNTH_FIX);
+
+ // mehrfach verwendete Ausdrücke: A04+A06+A07, A09+A13+A15
+ V[ 5] = (V[11] = (V[13] = A07 + (V[15] = A15)) + A11) + A05 + A13;
+ V[ 7] = (V[ 9] = A03 + A11 + A15) + A13;
+ V[33] = -(V[ 1] = A01 + A09 + A13 + A15) - A14;
+ V[35] = -(V[ 3] = A05 + A07 + A09 + A13 + A15) - A06 - A14;
+ V[37] = (tmp = -(A10 + A11 + A13 + A14 + A15)) - A05 - A06 - A07;
+ V[39] = tmp - A02 - A03; // abhängig vom Befehl drüber
+ V[41] = (tmp += A13 - A12) - A02 - A03; // abhängig vom Befehl 2 drüber
+ V[43] = tmp - A04 - A06 - A07; // abhängig von Befehlen 1 und 3 drüber
+ V[47] = (tmp = -(A08 + A12 + A14 + A15)) - A00;
+ V[45] = tmp - A04 - A06 - A07; // abhängig vom Befehl drüber
+
+ V[32] = -V[ 0];
+ V[31] = -V[ 1];
+ V[30] = -V[ 2];
+ V[29] = -V[ 3];
+ V[28] = -V[ 4];
+ V[27] = -V[ 5];
+ V[26] = -V[ 6];
+ V[25] = -V[ 7];
+ V[24] = -V[ 8];
+ V[23] = -V[ 9];
+ V[22] = -V[10];
+ V[21] = -V[11];
+ V[20] = -V[12];
+ V[19] = -V[13];
+ V[18] = -V[14];
+ V[17] = -V[15];
+
+ V[63] = V[33];
+ V[62] = V[34];
+ V[61] = V[35];
+ V[60] = V[36];
+ V[59] = V[37];
+ V[58] = V[38];
+ V[57] = V[39];
+ V[56] = V[40];
+ V[55] = V[41];
+ V[54] = V[42];
+ V[53] = V[43];
+ V[52] = V[44];
+ V[51] = V[45];
+ V[50] = V[46];
+ V[49] = V[47];
+}
+
+static void Synthese_Filter_float_internal(MPC_SAMPLE_FORMAT * OutData,MPC_SAMPLE_FORMAT * V,const MPC_SAMPLE_FORMAT * Y)
+{
+ unsigned n;
+ for ( n = 0; n < 36; n++, Y += 32 ) {
+ V -= 64;
+ Calculate_New_V ( Y, V );
+ {
+ MPC_SAMPLE_FORMAT * Data = OutData;
+ const MPC_SAMPLE_FORMAT * D = (const MPC_SAMPLE_FORMAT *) &Di_opt;
+ int k;
+ //int tmp;
+
+
+
+ for ( k = 0; k < 32; k++, D += 16, V++ ) {
+ *Data = (
+ ( MPC_MULTIPLY_EX(V[ 0],D[ 0],Di_opt_shift) + MPC_MULTIPLY_EX(V[ 96],D[ 1],Di_opt_shift) + MPC_MULTIPLY_EX(V[128],D[ 2],Di_opt_shift) + MPC_MULTIPLY_EX(V[224],D[ 3],Di_opt_shift)
+ + MPC_MULTIPLY_EX(V[256],D[ 4],Di_opt_shift) + MPC_MULTIPLY_EX(V[352],D[ 5],Di_opt_shift) + MPC_MULTIPLY_EX(V[384],D[ 6],Di_opt_shift) + MPC_MULTIPLY_EX(V[480],D[ 7],Di_opt_shift)
+ + MPC_MULTIPLY_EX(V[512],D[ 8],Di_opt_shift) + MPC_MULTIPLY_EX(V[608],D[ 9],Di_opt_shift) + MPC_MULTIPLY_EX(V[640],D[10],Di_opt_shift) + MPC_MULTIPLY_EX(V[736],D[11],Di_opt_shift)
+ + MPC_MULTIPLY_EX(V[768],D[12],Di_opt_shift) + MPC_MULTIPLY_EX(V[864],D[13],Di_opt_shift) + MPC_MULTIPLY_EX(V[896],D[14],Di_opt_shift) + MPC_MULTIPLY_EX(V[992],D[15],Di_opt_shift) ) );
+
+ Data += 2;
+ }
+ V -= 32;//bleh
+ OutData+=64;
+ }
+ }
+}
+
+void
+MPC_decoder::Synthese_Filter_float ( MPC_SAMPLE_FORMAT* OutData )
+{
+ /********* left channel ********/
+ memmove ( V_L + V_MEM, V_L, 960 * sizeof(MPC_SAMPLE_FORMAT) );
+
+ Synthese_Filter_float_internal(OutData,reinterpret_cast<MPC_SAMPLE_FORMAT*>(V_L + V_MEM),reinterpret_cast<MPC_SAMPLE_FORMAT*>(Y_L [0]));
+
+ /******** right channel ********/
+ memmove ( V_R + V_MEM, V_R, 960 * sizeof(MPC_SAMPLE_FORMAT) );
+
+ Synthese_Filter_float_internal(OutData+1,reinterpret_cast<MPC_SAMPLE_FORMAT*>(V_R + V_MEM),reinterpret_cast<MPC_SAMPLE_FORMAT*>(Y_R [0]));
+
+}
+
+
+
+/*******************************************/
+/* */
+/* dithered synthesis */
+/* */
+/*******************************************/
+
+static const unsigned char Parity [256] = { // parity
+ 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
+ 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,
+ 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,
+ 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
+ 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,
+ 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
+ 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
+ 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0
+};
+
+/*
+ * This is a simple random number generator with good quality for audio purposes.
+ * It consists of two polycounters with opposite rotation direction and different
+ * periods. The periods are coprime, so the total period is the product of both.
+ *
+ * -------------------------------------------------------------------------------------------------
+ * +-> |31:30:29:28:27:26:25:24:23:22:21:20:19:18:17:16:15:14:13:12:11:10: 9: 8: 7: 6: 5: 4: 3: 2: 1: 0|
+ * | -------------------------------------------------------------------------------------------------
+ * | | | | | | |
+ * | +--+--+--+-XOR-+--------+
+ * | |
+ * +--------------------------------------------------------------------------------------+
+ *
+ * -------------------------------------------------------------------------------------------------
+ * |31:30:29:28:27:26:25:24:23:22:21:20:19:18:17:16:15:14:13:12:11:10: 9: 8: 7: 6: 5: 4: 3: 2: 1: 0| <-+
+ * ------------------------------------------------------------------------------------------------- |
+ * | | | | |
+ * +--+----XOR----+--+ |
+ * | |
+ * +----------------------------------------------------------------------------------------+
+ *
+ *
+ * The first has an period of 3*5*17*257*65537, the second of 7*47*73*178481,
+ * which gives a period of 18.410.713.077.675.721.215. The result is the
+ * XORed values of both generators.
+ */
+
+unsigned int
+MPC_decoder::random_int ( void )
+{
+#if 1
+ unsigned int t1, t2, t3, t4;
+
+ t3 = t1 = __r1; t4 = t2 = __r2; // Parity calculation is done via table lookup, this is also available
+ t1 &= 0xF5; t2 >>= 25; // on CPUs without parity, can be implemented in C and avoid unpredictable
+ t1 = Parity [t1]; t2 &= 0x63; // jumps and slow rotate through the carry flag operations.
+ t1 <<= 31; t2 = Parity [t2];
+
+ return (__r1 = (t3 >> 1) | t1 ) ^ (__r2 = (t4 + t4) | t2 );
+#else
+ return (__r1 = (__r1 >> 1) | ((unsigned int)Parity [__r1 & 0xF5] << 31) ) ^
+ (__r2 = (__r2 << 1) | (unsigned int)Parity [(__r2 >> 25) & 0x63] );
+#endif
+}
diff --git a/akode/plugins/mpeg_decoder/Makefile.am b/akode/plugins/mpeg_decoder/Makefile.am
new file mode 100644
index 0000000..ae5c2dc
--- /dev/null
+++ b/akode/plugins/mpeg_decoder/Makefile.am
@@ -0,0 +1,8 @@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(USER_INCLUDES) $(all_includes)
+
+lib_LTLIBRARIES = libakode_mpeg_decoder.la
+
+libakode_mpeg_decoder_la_SOURCES = mpeg_decoder.cpp
+
+libakode_mpeg_decoder_la_LDFLAGS = -avoid-version -no-undefined $(USER_LDFLAGS)
+libakode_mpeg_decoder_la_LIBADD = ../../lib/libakode.la $(MADLIBS)
diff --git a/akode/plugins/mpeg_decoder/Makefile.in b/akode/plugins/mpeg_decoder/Makefile.in
new file mode 100644
index 0000000..244b914
--- /dev/null
+++ b/akode/plugins/mpeg_decoder/Makefile.in
@@ -0,0 +1,660 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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@
+
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = akode/plugins/mpeg_decoder
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/akode/lib/akode_export.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libakode_mpeg_decoder_la_DEPENDENCIES = ../../lib/libakode.la \
+ $(am__DEPENDENCIES_1)
+am_libakode_mpeg_decoder_la_OBJECTS = mpeg_decoder.lo
+#>- libakode_mpeg_decoder_la_OBJECTS = \
+#>- $(am_libakode_mpeg_decoder_la_OBJECTS)
+#>+ 1
+libakode_mpeg_decoder_la_OBJECTS = mpeg_decoder.lo
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/akode/lib
+depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
+am__depfiles_maybe = depfiles
+#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 2
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+#>- $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 3
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+CXXLD = $(CXX)
+#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+#>+ 2
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libakode_mpeg_decoder_la_SOURCES)
+DIST_SOURCES = $(libakode_mpeg_decoder_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AKODE_LIBDL = @AKODE_LIBDL@
+ALSA_CFLAGS = @ALSA_CFLAGS@
+ALSA_LIBS = @ALSA_LIBS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVCODEC_CFLAGS = @AVCODEC_CFLAGS@
+AVCODEC_LDFLAGS = @AVCODEC_LDFLAGS@
+AVCODEC_LIBADD = @AVCODEC_LIBADD@
+AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@
+AVFORMAT_LDFLAGS = @AVFORMAT_LDFLAGS@
+AVFORMAT_LIBADD = @AVFORMAT_LIBADD@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LDFLAGS = @JACK_LDFLAGS@
+JACK_LIBADD = @JACK_LIBADD@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBFLAC = @LIBFLAC@
+LIBOBJS = @LIBOBJS@
+LIBOGGFLAC = @LIBOGGFLAC@
+LIBOSSAUDIO = @LIBOSSAUDIO@
+LIBPTHREAD = @LIBPTHREAD@
+LIBS = @LIBS@
+LIBSAMPLERATE = @LIBSAMPLERATE@
+LIBSEM = @LIBSEM@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MADLIBS = @MADLIBS@
+MAKEINFO = @MAKEINFO@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POLYP_CFLAGS = @POLYP_CFLAGS@
+POLYP_LDFLAGS = @POLYP_LDFLAGS@
+POLYP_LIBADD = @POLYP_LIBADD@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPEEXLIBS = @SPEEXLIBS@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+VERSION = @VERSION@
+VORBISFILE_LIBS = @VORBISFILE_LIBS@
+VORBIS_LIBS = @VORBIS_LIBS@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+akode_SUBDIR_included_FALSE = @akode_SUBDIR_included_FALSE@
+akode_SUBDIR_included_TRUE = @akode_SUBDIR_included_TRUE@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+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@
+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@
+include_alsa_sink_FALSE = @include_alsa_sink_FALSE@
+include_alsa_sink_TRUE = @include_alsa_sink_TRUE@
+include_ffmpeg_decoder_FALSE = @include_ffmpeg_decoder_FALSE@
+include_ffmpeg_decoder_TRUE = @include_ffmpeg_decoder_TRUE@
+include_jack_sink_FALSE = @include_jack_sink_FALSE@
+include_jack_sink_TRUE = @include_jack_sink_TRUE@
+include_mpeg_decoder_FALSE = @include_mpeg_decoder_FALSE@
+include_mpeg_decoder_TRUE = @include_mpeg_decoder_TRUE@
+include_oss_sink_FALSE = @include_oss_sink_FALSE@
+include_oss_sink_TRUE = @include_oss_sink_TRUE@
+include_polyp_sink_FALSE = @include_polyp_sink_FALSE@
+include_polyp_sink_TRUE = @include_polyp_sink_TRUE@
+include_src_resampler_FALSE = @include_src_resampler_FALSE@
+include_src_resampler_TRUE = @include_src_resampler_TRUE@
+include_sun_sink_FALSE = @include_sun_sink_FALSE@
+include_sun_sink_TRUE = @include_sun_sink_TRUE@
+include_xiph_decoder_FALSE = @include_xiph_decoder_FALSE@
+include_xiph_decoder_TRUE = @include_xiph_decoder_TRUE@
+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@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(USER_INCLUDES) $(all_includes)
+lib_LTLIBRARIES = libakode_mpeg_decoder.la
+libakode_mpeg_decoder_la_SOURCES = mpeg_decoder.cpp
+#>- libakode_mpeg_decoder_la_LDFLAGS = -avoid-version -no-undefined $(USER_LDFLAGS)
+#>+ 1
+libakode_mpeg_decoder_la_LDFLAGS = -avoid-version -no-undefined $(KDE_NO_UNDEFINED) $(USER_LDFLAGS)
+libakode_mpeg_decoder_la_LIBADD = ../../lib/libakode.la $(MADLIBS)
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/mpeg_decoder/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu akode/plugins/mpeg_decoder/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/mpeg_decoder/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/mpeg_decoder/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/mpeg_decoder/Makefile.in
+.PRECIOUS: 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: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_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
+#>- libakode_mpeg_decoder.la: $(libakode_mpeg_decoder_la_OBJECTS) $(libakode_mpeg_decoder_la_DEPENDENCIES)
+#>+ 2
+@KDE_USE_CLOSURE_TRUE@libakode_mpeg_decoder.la: libakode_mpeg_decoder.la.closure $(libakode_mpeg_decoder_la_OBJECTS) $(libakode_mpeg_decoder_la_DEPENDENCIES)
+@KDE_USE_CLOSURE_FALSE@libakode_mpeg_decoder.la: $(libakode_mpeg_decoder_la_OBJECTS) $(libakode_mpeg_decoder_la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(libdir) $(libakode_mpeg_decoder_la_LDFLAGS) $(libakode_mpeg_decoder_la_OBJECTS) $(libakode_mpeg_decoder_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpeg_decoder.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+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: TAGS
+
+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; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+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
+
+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"; \
+ $(mkdir_p) "$(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)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+#>- mostlyclean-am
+#>+ 2
+clean-am: clean-closures clean-bcheck clean-generic clean-libLTLIBRARIES clean-libtool \
+ 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:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+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 uninstall-libLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool ctags 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-exec \
+ install-exec-am install-info install-info-am \
+ install-libLTLIBRARIES 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 \
+ uninstall-libLTLIBRARIES
+
+# 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:
+
+#>+ 8
+libakode_mpeg_decoder.la.closure: $(libakode_mpeg_decoder_la_OBJECTS) $(libakode_mpeg_decoder_la_DEPENDENCIES)
+ @echo "int main() {return 0;}" > libakode_mpeg_decoder_la_closure.cpp
+ @$(LTCXXCOMPILE) -c libakode_mpeg_decoder_la_closure.cpp
+ $(CXXLINK) libakode_mpeg_decoder_la_closure.lo $(libakode_mpeg_decoder_la_LDFLAGS) $(libakode_mpeg_decoder_la_OBJECTS) $(libakode_mpeg_decoder_la_LIBADD) $(LIBS)
+ @rm -f libakode_mpeg_decoder_la_closure.* libakode_mpeg_decoder.la.closure
+ @echo "timestamp" > libakode_mpeg_decoder.la.closure
+
+
+#>+ 2
+KDE_DIST=mpeg_decoder.h Makefile.in Makefile.am
+
+#>+ 3
+clean-closures:
+ -rm -f libakode_mpeg_decoder.la.closure
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/mpeg_decoder/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/mpeg_decoder/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/mpeg_decoder/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXXCOMPILE) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/akode/plugins/mpeg_decoder/mpeg_decoder.cpp b/akode/plugins/mpeg_decoder/mpeg_decoder.cpp
new file mode 100644
index 0000000..33466fa
--- /dev/null
+++ b/akode/plugins/mpeg_decoder/mpeg_decoder.cpp
@@ -0,0 +1,572 @@
+/* aKode: MPEG-Decoder (MAD-decoder)
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ 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., 51 Franklin Steet, Fifth Floor, Boston,
+ MA 02110-1301, USA.
+*/
+
+#include "akodelib.h"
+
+// uncomment to debug the plugin
+//#define MPEG_DEBUG
+
+#include <string.h>
+#include <mad.h>
+
+#ifdef MPEG_DEBUG
+#include <iostream>
+using std::cerr;
+#endif
+
+#include "file.h"
+#include "audioframe.h"
+#include "mpeg_decoder.h"
+
+namespace aKode {
+
+bool MPEGDecoderPlugin::canDecode(File* src) {
+ char header[6];
+ unsigned char *buf = (unsigned char*)header; // C-stuff
+ bool res = false;
+ src->openRO();
+ if(src->read(header, 4)) {
+ // skip id3v2 headers
+ if (memcmp(header, "ID3", 3) == 0) {
+ src->read(header, 6);
+ int size = 0;
+ if (buf[1] & 0x10) size += 10;
+ size += buf[5];
+ size += buf[4] << 7;
+ size += buf[3] << 14;
+ size += buf[2] << 21;
+ src->seek(10+size);
+ src->read(header, 4);
+ }
+ if (buf[0] == 0xff && (buf[1] & 14)) // frame synchronizer
+ if((buf[1] & 0x18) != 0x08) // support MPEG 1, 2 and 2½
+ if((buf[1] & 0x06) != 0x00) // Layer I, II and III
+ res = true;
+ }
+ src->close();
+ return res;
+}
+
+extern "C" { MPEGDecoderPlugin mpeg_decoder; }
+
+struct xing_frame {
+ // Xing header:
+ bool has_toc; // valid table-of-contents
+ unsigned int bytes; // nr-of-bytes (0 if unknown)
+ unsigned int frames; // nr-of-frames (0 if unknown)
+ unsigned char toc[100]; // time: x/100 -> place: y/256 (y = toc[x])
+};
+
+#define FILEBUFFER_SIZE 8192
+struct MPEGDecoder::private_data
+{
+ private_data() : position(0),
+ length(0),
+ bitrate(0),
+ eof(false),
+ error(false),
+ initialized(false),
+ id3v2size(0),
+ xing_vbr(false),
+ unknown_vbr(false)
+ {};
+ mad_stream stream;
+ mad_frame frame;
+ mad_synth synth;
+
+ File *src;
+ AudioConfiguration config;
+
+ long position, length;
+ int bitrate, layer;
+
+ bool eof, error, initialized;
+
+ int id3v2size; // size of prepended ID3v2 tag
+ bool xing_vbr; // Xing-compatible VBR
+ bool unknown_vbr; // Oh, bugger...
+ xing_frame xing;
+
+ char filebuffer[FILEBUFFER_SIZE];
+
+ bool metaframe_filter(bool fast);
+};
+
+MPEGDecoder::MPEGDecoder(File *src) {
+ m_data = new private_data();
+
+ mad_stream_init(&m_data->stream);
+ mad_frame_init(&m_data->frame);
+ mad_synth_init(&m_data->synth);
+
+ mad_stream_options(&m_data->stream, MAD_OPTION_IGNORECRC);
+
+ m_data->eof = false;
+ m_data->error = false;
+
+ m_data->src = src;
+ if (!m_data->src->openRO()) {
+ m_data->error = true;
+ #ifdef MPEG_DEBUG
+ cerr << "Could not open file: " << m_data->src->filename << "\n";
+ #endif
+ }
+ m_data->src->fadvise();
+
+ m_data->length = m_data->src->length();
+}
+
+MPEGDecoder::~MPEGDecoder() {
+ mad_stream_finish(&m_data->stream);
+ mad_frame_finish(&m_data->frame);
+ mad_synth_finish(&m_data->synth);
+ m_data->src->close();
+ delete m_data;
+}
+
+bool MPEGDecoder::skipID3v2() {
+ m_data->src->seek(0);
+ m_data->id3v2size = 0;
+ char buf[16];
+ if (m_data->src->read(buf, 10)) {
+ // skip id3v2 headers
+ if (memcmp(buf, "ID3", 3) == 0) {
+ #ifdef MPEG_DEBUG
+ cerr << "ID3v2 tag found\n";
+ #endif
+ int size = 0;
+ if (buf[5] & 0x10) size += 10;
+ size += buf[9];
+ size += buf[8] << 7;
+ size += buf[7] << 14;
+ size += buf[6] << 21;
+ m_data->id3v2size = size;
+ if (!m_data->src->seek(10+size)) {
+ char space[256];
+ for(int i=0; i<size; ) {
+ i += m_data->src->read(space, (size-i) > 256 ? 256 : (size-i));
+ }
+ }
+ return true;
+ }
+ }
+ if (!m_data->src->seek(0)) {
+ mad_stream_buffer(&m_data->stream, (uint8_t*)buf, 10);
+ }
+ return false;
+}
+
+bool MPEGDecoder::moreData(bool flush)
+{
+ mad_stream *stream = &m_data->stream;
+
+ long rem = 0;
+ if (stream->next_frame != 0 && !flush) {
+ rem = stream->bufend - stream->next_frame;
+ memmove(m_data->filebuffer, stream->next_frame, rem);
+ }
+ #ifdef MPEG_DEBUG
+// cerr << "remainder=" << rem << "\n";
+ #endif
+
+ int res = m_data->src->read(m_data->filebuffer+rem, FILEBUFFER_SIZE-rem);
+ mad_stream_buffer(stream, (uint8_t*)m_data->filebuffer, res+rem);
+ // for some reason MAD can't to do this itself:
+ if (stream->error == MAD_ERROR_LOSTSYNC || flush) stream->sync = 0;
+ stream->error = MAD_ERROR_NONE;
+
+ if (res == 0) {
+ m_data->eof = true;
+ return false;
+ } else
+ if (res < 0) {
+ m_data->error = true;
+ return false;
+ } else
+ return true;
+}
+
+// originaly from minimad.c
+template<int bits>
+static inline int32_t scale(mad_fixed_t sample)
+{
+ /* round */
+ sample += (1L << (MAD_F_FRACBITS - bits));
+
+ /* clip */
+ if (sample >= MAD_F_ONE)
+ sample = MAD_F_ONE - 1;
+ else if (sample < -MAD_F_ONE)
+ sample = -MAD_F_ONE;
+
+ /* quantize */
+ return sample >> (MAD_F_FRACBITS + 1 - bits);
+}
+
+static inline long postotime(long pos, int sample_rate) {
+ if (sample_rate == 0) return 0;
+ long sec = pos/sample_rate;
+ long rem = pos%sample_rate;
+ long ms = (rem*1000)/sample_rate;
+ return sec*1000+ms;
+}
+
+
+// Xing-header documentation is from http://www.multiweb.cz/twoinches/MP3inside.htm
+// toc-format verified in LAME source-code
+static bool xing_decode(xing_frame *xing, const unsigned char * bytes)
+{
+ mad_bitptr ptr;
+ mad_bit_init(&ptr, bytes);
+
+ if (mad_bit_read(&ptr, 32) == (('X' << 24) | ('i' << 16) | ('n' << 8) | 'g'))
+ {
+ int flags = mad_bit_read(&ptr, 32);
+ if (flags & 1)
+ xing->frames = mad_bit_read(&ptr, 32);
+ if (flags & 2)
+ xing->bytes = mad_bit_read(&ptr, 32);
+ if (flags & 4) {
+ xing->has_toc = true;
+ for (int i=0; i<100; i++) {
+ xing->toc[i] = mad_bit_read(&ptr, 8);
+ }
+ }
+ return true;
+ }
+ return false;
+}
+
+// Detect various metaframes
+bool MPEGDecoder::private_data::metaframe_filter(bool fast)
+{
+ if (stream.anc_bitlen < 16) return false;
+
+ const unsigned char* ptr;
+
+ ptr = stream.anc_ptr.byte;
+test:
+ if ((ptr[0] == 'X') && (ptr[1] == 'i') && (ptr[2] == 'n') && (ptr[3] =='g'))
+ {
+ #ifdef MPEG_DEBUG
+ cerr << "Xing(VBR) header found\n";
+ #endif
+ xing_vbr = true;
+ xing_decode(&xing, ptr);
+ return true;
+ } /*
+ if ((ptr[0] == 'L') || (ptr[1] == 'A') || (ptr[2] == 'M') || (ptr[3] =='E'))
+ {
+ #ifdef MPEG_DEBUG
+ cerr << "LAME frame found\n";
+ #endif
+ return true;
+ }*/
+ if ((ptr[0] == 'I') && (ptr[1] == 'n') && (ptr[2] == 'f') && (ptr[3] =='o'))
+ {
+ #ifdef MPEG_DEBUG
+ cerr << "Info(CBR) header found\n";
+ #endif
+ return true;
+ }
+
+ if (!fast) {
+ // We can't trust broken-encoders to _not_ fuck this up
+ ptr = stream.this_frame;
+ // skip frame header and side info
+ ptr += 6;
+ // Search for metaframe tags:
+ for(int i=0; i<64 && ptr < stream.bufend; i++) {
+ if (*ptr == 'X' || *ptr== 'I') {
+ fast = true;
+ goto test;
+ }
+ ptr++;
+ }
+ }
+
+ return false;
+}
+
+bool MPEGDecoder::sync()
+{
+ // only try 32 times, if no sync-frame is found the file is properbly not MPEG
+ for(int i=0; i<32; i++) {
+ int res = mad_stream_sync(&m_data->stream);
+ if (res == 0 ) goto got_sync;
+ if (!moreData(true)) break;
+ }
+ m_data->error=true;
+ #ifdef MPEG_DEBUG
+ cerr << "Synchronization failed, likely not a mpeg audio file.\n";
+ #endif
+ return false;
+
+got_sync:
+ return true;
+}
+
+bool MPEGDecoder::prepare()
+{
+ skipID3v2();
+ // initialize stream
+ if (m_data->stream.buffer == 0) moreData();
+
+ if (sync()) {
+ m_data->initialized = true;
+ return true;
+ } else
+ return false;
+}
+
+static void setChannelConfiguration(AudioConfiguration& config, mad_mode mode)
+{
+ switch(mode) {
+ case MAD_MODE_SINGLE_CHANNEL:
+ config.channels=1;
+ config.channel_config=MonoStereo;
+ break;
+ case MAD_MODE_DUAL_CHANNEL:
+ config.channels=2;
+ config.channel_config=MultiChannel;
+ break;
+ default: // Stereo and joint stereo
+ config.channels=2;
+ config.channel_config=MonoStereo;
+ }
+ config.surround_config = 0;
+}
+
+bool MPEGDecoder::readFrame(AudioFrame* frame)
+{
+ if (m_data->error) return false;
+
+ int res = 0;
+ if (!m_data->initialized) {
+ if (!prepare()) return false;
+
+ int retries = 0;
+ first_frame:
+ if (retries >= 8) {
+ // fatal error
+ m_data->error = true;
+ return false;
+ }
+ res = mad_frame_decode(&m_data->frame, &m_data->stream);
+ if (res != 0) {
+ if (m_data->stream.error == MAD_ERROR_BUFLEN) {
+ retries++;
+ if (!moreData(true)) return false;
+ }
+ else
+ if (m_data->stream.error == MAD_ERROR_LOSTSYNC)
+ {}
+ else
+ if (MAD_RECOVERABLE(m_data->stream.error)) {
+ #ifdef MPEG_DEBUG
+ cerr << "Invalid frame: " << mad_stream_errorstr(&m_data->stream) << "\n";
+ #endif
+ m_data->metaframe_filter(true);
+ }
+ goto first_frame;
+ }
+
+ m_data->config.sample_rate = m_data->frame.header.samplerate;
+ m_data->config.sample_width = 16;
+ setChannelConfiguration(m_data->config, m_data->frame.header.mode);
+
+ m_data->bitrate = m_data->frame.header.bitrate;
+ m_data->layer = m_data->frame.header.layer;
+
+ m_data->metaframe_filter(false);
+ }
+ else {
+ if (m_data->stream.buffer == 0 ||
+ m_data->stream.error==MAD_ERROR_BUFLEN ||
+ m_data->stream.error==MAD_ERROR_LOSTSYNC) if (!moreData()) return false;
+
+ int retries = 0;
+ bool sync = true;
+ retry:
+ // give up after 16 new pages
+ if (retries >= 16) {
+ // fatal error
+ m_data->error = true;
+ return false;
+ }
+ res = mad_frame_decode(&m_data->frame, &m_data->stream);
+
+ if (res != 0) {
+ if (m_data->stream.error == MAD_ERROR_BUFLEN) {
+ retries++;
+ if (moreData(!sync)) return false;
+ goto retry;
+ }
+ else
+ if (m_data->stream.error == MAD_ERROR_LOSTSYNC) {
+ #ifdef MPEG_DEBUG
+ cerr << "No sync\n";
+ #endif
+ sync = false;
+ goto retry;
+ }
+ else
+ if (MAD_RECOVERABLE(m_data->stream.error)) { // invalid frame
+ #ifdef MPEG_DEBUG
+ cerr << "Invalid frame: " << mad_stream_errorstr(&m_data->stream) << "\n";
+ #endif
+ m_data->metaframe_filter(true);
+ goto retry;
+ }
+ else {
+ // Unrecoverable error
+ m_data->error = true;
+ return false;
+ }
+ }
+ // fast check for metaframes
+ if (m_data->metaframe_filter(false))
+ goto retry;
+ }
+
+ if (m_data->bitrate && !m_data->xing_vbr)
+ if (m_data->bitrate != (int)m_data->frame.header.bitrate)
+ m_data->unknown_vbr = true;
+
+ mad_synth_frame(&m_data->synth, &m_data->frame);
+ mad_pcm *pcm = &m_data->synth.pcm;
+
+ // Has the format changed? (misread initial frame)
+ m_data->config.sample_rate = pcm->samplerate;
+ setChannelConfiguration(m_data->config, m_data->frame.header.mode);
+
+ int channels = pcm->channels;
+ long length = pcm->length;
+
+ frame->reserveSpace(&m_data->config, length);
+
+ // Scale into frame (could be reduced to copy if we used MADs internal format)
+ int16_t** data = (int16_t**)frame->data;
+ for(int j=0; j<channels; j++)
+ for(int i=0; i<length; i++)
+ data[j][i] = scale<16>(pcm->samples[j][i]);
+
+ m_data->position += length;
+ frame->pos = postotime(m_data->position, m_data->config.sample_rate);
+
+ return true;
+}
+
+static inline long time_madtoakode(mad_timer_t time) {
+ return mad_timer_count(time, MAD_UNITS_MILLISECONDS);
+}
+
+static float mpeg_length(MPEGDecoder::private_data *m_data) {
+ if (m_data->layer == 1)
+ return (m_data->xing.frames*384.0)/m_data->config.sample_rate;
+ else
+ return (m_data->xing.frames*1152.0)/m_data->config.sample_rate;
+}
+
+long MPEGDecoder::length() {
+ float len;
+ if (!m_data->initialized) return -1;
+ else {
+ if (m_data->xing_vbr || m_data->unknown_vbr) {
+ if (m_data->xing_vbr && m_data->xing.frames > 0) {
+ len = mpeg_length(m_data)*1000.0;
+ }
+ else { // VBR shot in the dark (based on average bitrate)
+ if (m_data->length > 0) {
+ float bytepos = m_data->src->position()/(float)m_data->length;
+ len = position()/bytepos;
+ } else
+ len = 0;
+ }
+ }
+ else {
+ if (m_data->length > 0)
+ len = ((float)m_data->length*8000.0)/((float)m_data->bitrate);
+ else
+ len = 0;
+ }
+ }
+ return (long)(len);
+}
+
+long MPEGDecoder::position() {
+ if (!m_data->initialized) return -1;
+ if (m_data->frame.header.samplerate > 0 && m_data->position >= 0)
+ return postotime(m_data->position, m_data->config.sample_rate);
+ else
+ return -1;
+}
+
+bool MPEGDecoder::eof() {
+ return m_data->eof;
+}
+
+bool MPEGDecoder::error() {
+ return m_data->error;
+}
+
+bool MPEGDecoder::seekable() {
+ return m_data->src->seekable();
+}
+
+bool MPEGDecoder::seek(long pos) {
+ if (!m_data->initialized) return false;
+ bool res = false;
+ // VBR with toc:
+ if (m_data->xing_vbr && m_data->xing.has_toc && m_data->xing.frames > 0) {
+ int procent = (int)((float)pos/(mpeg_length(m_data)*10));
+ float place = ((float)m_data->xing.toc[procent])/256.0;
+ long bpos = (long)(place * m_data->length);
+ #ifdef MPEG_DEBUG
+ cerr << "TOC seeking " << procent << "/100 -> " << (long)(place*256.0) << "/256\n" ;
+ #endif
+ res = m_data->src->seek(bpos);
+ if (res)
+ m_data->position = (long)(((float)procent/100.0)*mpeg_length(m_data)*m_data->config.sample_rate);
+ }
+ else { // CBR seeking (and VBR without TOC fallback)
+ #ifdef MPEG_DEBUG
+ cerr << "CBR seeking\n";
+ #endif
+ long bpos = (long)((((float)pos)*m_data->bitrate)/8000.0);
+ bpos += m_data->id3v2size;
+ res = m_data->src->seek(bpos);
+ if (res)
+ m_data->position = (long)(((float)pos*(float)m_data->config.sample_rate)/1000.0);
+ }
+ if (res) {
+ moreData(true);
+ sync();
+ }
+
+ return res;
+}
+
+const AudioConfiguration* MPEGDecoder::audioConfiguration() {
+ if (!m_data->initialized) return 0;
+ return &m_data->config;
+}
+
+} // namespace
diff --git a/akode/plugins/mpeg_decoder/mpeg_decoder.h b/akode/plugins/mpeg_decoder/mpeg_decoder.h
new file mode 100644
index 0000000..4d15ded
--- /dev/null
+++ b/akode/plugins/mpeg_decoder/mpeg_decoder.h
@@ -0,0 +1,69 @@
+/* aKode: MPEG-Format(MAD)
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ 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., 51 Franklin Steet, Fifth Floor, Boston,
+ MA 02110-1301, USA.
+*/
+
+#ifndef _AKODE_MPEG_DECODER_H
+#define _AKODE_MPEG_DECODER_H
+
+#include "decoder.h"
+
+namespace aKode {
+
+class File;
+class AudioFrame;
+
+class MPEGDecoder : public Decoder {
+public:
+ MPEGDecoder(File* src);
+ virtual ~MPEGDecoder();
+
+ virtual bool readFrame(AudioFrame*);
+ virtual long length();
+ virtual long position();
+ virtual bool seek(long);
+ virtual bool seekable();
+ virtual bool eof();
+ virtual bool error();
+
+ virtual const AudioConfiguration* audioConfiguration();
+
+ struct private_data;
+private:
+ private_data *m_data;
+ bool prepare();
+ bool sync();
+ bool skipID3v2();
+ bool moreData(bool flush = false);
+};
+
+
+class MPEGDecoderPlugin : public DecoderPlugin {
+public:
+ virtual bool canDecode(File*);
+ virtual MPEGDecoder* openDecoder(File* src)
+ {
+ return new MPEGDecoder(src);
+ };
+};
+
+extern "C" MPEGDecoderPlugin mpeg_decoder;
+
+} // namespace
+
+#endif
diff --git a/akode/plugins/oss_sink/Makefile.am b/akode/plugins/oss_sink/Makefile.am
new file mode 100644
index 0000000..c088c75
--- /dev/null
+++ b/akode/plugins/oss_sink/Makefile.am
@@ -0,0 +1,7 @@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(all_includes)
+
+lib_LTLIBRARIES = libakode_oss_sink.la
+
+libakode_oss_sink_la_SOURCES = oss_sink.cpp
+libakode_oss_sink_la_LDFLAGS = -module -avoid-version -no-undefined
+libakode_oss_sink_la_LIBADD = ../../lib/libakode.la $(LIBOSSAUDIO)
diff --git a/akode/plugins/oss_sink/Makefile.in b/akode/plugins/oss_sink/Makefile.in
new file mode 100644
index 0000000..104d913
--- /dev/null
+++ b/akode/plugins/oss_sink/Makefile.in
@@ -0,0 +1,659 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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@
+
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = akode/plugins/oss_sink
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/akode/lib/akode_export.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libakode_oss_sink_la_DEPENDENCIES = ../../lib/libakode.la \
+ $(am__DEPENDENCIES_1)
+am_libakode_oss_sink_la_OBJECTS = oss_sink.lo
+#>- libakode_oss_sink_la_OBJECTS = $(am_libakode_oss_sink_la_OBJECTS)
+#>+ 1
+libakode_oss_sink_la_OBJECTS = oss_sink.lo
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/akode/lib
+depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
+am__depfiles_maybe = depfiles
+#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 2
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+#>- $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 3
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+CXXLD = $(CXX)
+#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+#>+ 2
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libakode_oss_sink_la_SOURCES)
+DIST_SOURCES = $(libakode_oss_sink_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AKODE_LIBDL = @AKODE_LIBDL@
+ALSA_CFLAGS = @ALSA_CFLAGS@
+ALSA_LIBS = @ALSA_LIBS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVCODEC_CFLAGS = @AVCODEC_CFLAGS@
+AVCODEC_LDFLAGS = @AVCODEC_LDFLAGS@
+AVCODEC_LIBADD = @AVCODEC_LIBADD@
+AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@
+AVFORMAT_LDFLAGS = @AVFORMAT_LDFLAGS@
+AVFORMAT_LIBADD = @AVFORMAT_LIBADD@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LDFLAGS = @JACK_LDFLAGS@
+JACK_LIBADD = @JACK_LIBADD@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBFLAC = @LIBFLAC@
+LIBOBJS = @LIBOBJS@
+LIBOGGFLAC = @LIBOGGFLAC@
+LIBOSSAUDIO = @LIBOSSAUDIO@
+LIBPTHREAD = @LIBPTHREAD@
+LIBS = @LIBS@
+LIBSAMPLERATE = @LIBSAMPLERATE@
+LIBSEM = @LIBSEM@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MADLIBS = @MADLIBS@
+MAKEINFO = @MAKEINFO@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POLYP_CFLAGS = @POLYP_CFLAGS@
+POLYP_LDFLAGS = @POLYP_LDFLAGS@
+POLYP_LIBADD = @POLYP_LIBADD@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPEEXLIBS = @SPEEXLIBS@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+VERSION = @VERSION@
+VORBISFILE_LIBS = @VORBISFILE_LIBS@
+VORBIS_LIBS = @VORBIS_LIBS@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+akode_SUBDIR_included_FALSE = @akode_SUBDIR_included_FALSE@
+akode_SUBDIR_included_TRUE = @akode_SUBDIR_included_TRUE@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+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@
+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@
+include_alsa_sink_FALSE = @include_alsa_sink_FALSE@
+include_alsa_sink_TRUE = @include_alsa_sink_TRUE@
+include_ffmpeg_decoder_FALSE = @include_ffmpeg_decoder_FALSE@
+include_ffmpeg_decoder_TRUE = @include_ffmpeg_decoder_TRUE@
+include_jack_sink_FALSE = @include_jack_sink_FALSE@
+include_jack_sink_TRUE = @include_jack_sink_TRUE@
+include_mpeg_decoder_FALSE = @include_mpeg_decoder_FALSE@
+include_mpeg_decoder_TRUE = @include_mpeg_decoder_TRUE@
+include_oss_sink_FALSE = @include_oss_sink_FALSE@
+include_oss_sink_TRUE = @include_oss_sink_TRUE@
+include_polyp_sink_FALSE = @include_polyp_sink_FALSE@
+include_polyp_sink_TRUE = @include_polyp_sink_TRUE@
+include_src_resampler_FALSE = @include_src_resampler_FALSE@
+include_src_resampler_TRUE = @include_src_resampler_TRUE@
+include_sun_sink_FALSE = @include_sun_sink_FALSE@
+include_sun_sink_TRUE = @include_sun_sink_TRUE@
+include_xiph_decoder_FALSE = @include_xiph_decoder_FALSE@
+include_xiph_decoder_TRUE = @include_xiph_decoder_TRUE@
+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@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(all_includes)
+lib_LTLIBRARIES = libakode_oss_sink.la
+libakode_oss_sink_la_SOURCES = oss_sink.cpp
+#>- libakode_oss_sink_la_LDFLAGS = -module -avoid-version -no-undefined
+#>+ 1
+libakode_oss_sink_la_LDFLAGS = -module -avoid-version -no-undefined $(KDE_NO_UNDEFINED)
+libakode_oss_sink_la_LIBADD = ../../lib/libakode.la $(LIBOSSAUDIO)
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/oss_sink/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu akode/plugins/oss_sink/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/oss_sink/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/oss_sink/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/oss_sink/Makefile.in
+.PRECIOUS: 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: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_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
+#>- libakode_oss_sink.la: $(libakode_oss_sink_la_OBJECTS) $(libakode_oss_sink_la_DEPENDENCIES)
+#>+ 2
+@KDE_USE_CLOSURE_TRUE@libakode_oss_sink.la: libakode_oss_sink.la.closure $(libakode_oss_sink_la_OBJECTS) $(libakode_oss_sink_la_DEPENDENCIES)
+@KDE_USE_CLOSURE_FALSE@libakode_oss_sink.la: $(libakode_oss_sink_la_OBJECTS) $(libakode_oss_sink_la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(libdir) $(libakode_oss_sink_la_LDFLAGS) $(libakode_oss_sink_la_OBJECTS) $(libakode_oss_sink_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oss_sink.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+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: TAGS
+
+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; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+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
+
+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"; \
+ $(mkdir_p) "$(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)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+#>- mostlyclean-am
+#>+ 2
+clean-am: clean-closures clean-bcheck clean-generic clean-libLTLIBRARIES clean-libtool \
+ 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:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+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 uninstall-libLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool ctags 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-exec \
+ install-exec-am install-info install-info-am \
+ install-libLTLIBRARIES 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 \
+ uninstall-libLTLIBRARIES
+
+# 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:
+
+#>+ 8
+libakode_oss_sink.la.closure: $(libakode_oss_sink_la_OBJECTS) $(libakode_oss_sink_la_DEPENDENCIES)
+ @echo "int main() {return 0;}" > libakode_oss_sink_la_closure.cpp
+ @$(LTCXXCOMPILE) -c libakode_oss_sink_la_closure.cpp
+ $(CXXLINK) libakode_oss_sink_la_closure.lo $(libakode_oss_sink_la_LDFLAGS) $(libakode_oss_sink_la_OBJECTS) $(libakode_oss_sink_la_LIBADD) $(LIBS)
+ @rm -f libakode_oss_sink_la_closure.* libakode_oss_sink.la.closure
+ @echo "timestamp" > libakode_oss_sink.la.closure
+
+
+#>+ 2
+KDE_DIST=oss_sink.h Makefile.in Makefile.am
+
+#>+ 3
+clean-closures:
+ -rm -f libakode_oss_sink.la.closure
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/oss_sink/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/oss_sink/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/oss_sink/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXXCOMPILE) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/akode/plugins/oss_sink/oss_sink.cpp b/akode/plugins/oss_sink/oss_sink.cpp
new file mode 100644
index 0000000..758bcf9
--- /dev/null
+++ b/akode/plugins/oss_sink/oss_sink.cpp
@@ -0,0 +1,218 @@
+/* aKode: OSS-Sink
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <config.h>
+
+#if defined(HAVE_SYS_SOUNDCARD_H)
+#include <sys/soundcard.h>
+#elif defined(HAVE_SOUNDCARD_H)
+#include <soundcard.h>
+#endif
+
+#include <sys/ioctl.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include <audioframe.h>
+#include "oss_sink.h"
+
+#include <iostream>
+
+namespace aKode {
+
+extern "C" { OSSSinkPlugin oss_sink; }
+
+struct OSSSink::private_data
+{
+ private_data() : audio_fd(-1), device(0), valid(false), buffer(0), buffer_length(0) {};
+ int audio_fd;
+
+ const char *device;
+ AudioConfiguration config;
+ bool valid;
+
+ char* buffer;
+ int buffer_length;
+};
+
+
+static const char *_devices[] = {
+ "/dev/dsp",
+ "/dev/sound/dsp0",
+ "/dev/audio",
+ 0
+};
+
+OSSSink::OSSSink()
+{
+ d = new private_data;
+}
+
+OSSSink::~OSSSink()
+{
+ close();
+ delete d;
+}
+
+bool OSSSink::open()
+{
+ const char** device = _devices;
+ while (*device) {
+ if(::access(*device, F_OK) == 0) {
+ break;
+ }
+ device++;
+ }
+
+ if (!*device) {
+ std::cerr << "akode: No OSS device found\n";
+ d->valid = false;
+ return false;
+ }
+
+ return openDevice(*device);
+}
+
+bool OSSSink::openDevice(const char *device)
+{
+ d->device = device;
+
+ // Set non-blocking to not block on open
+ d->audio_fd = ::open(d->device, O_WRONLY | O_NONBLOCK, 0);
+
+ if (d->audio_fd == -1) {
+ std::cerr << "akode: Could not open " << d->device << " for writing\n";
+ goto failed;
+ }
+ // set blocking again to block on write
+ fcntl(d->audio_fd, F_SETFL, O_WRONLY);
+ d->valid = true;
+ return true;
+
+failed:
+ d->valid = false;
+ return false;
+}
+
+
+void OSSSink::close() {
+ if (d->audio_fd != -1) ::close(d->audio_fd);
+ d->audio_fd = -1;
+ delete d->buffer;
+ d->buffer = 0;
+ d->buffer_length = 0;
+ d->valid = false;
+}
+
+int OSSSink::setAudioConfiguration(const AudioConfiguration* config)
+{
+ d->config = *config;
+
+ int format = 0;
+
+ if (config->sample_width > 0 && config->sample_width <= 8)
+ format = AFMT_S8;
+ else
+ format = AFMT_S16_NE; // 16bit native endian
+
+ ioctl(d->audio_fd, SNDCTL_DSP_SETFMT, &format);
+
+ if (format == AFMT_S16_NE)
+ d->config.sample_width = 16;
+ else
+ if (format == AFMT_S8)
+ d->config.sample_width = 8;
+ else
+ return -1;
+
+ int stereo;
+ if (config->channels == 1)
+ stereo = 0;
+ else
+ stereo = 1;
+
+ ioctl(d->audio_fd, SNDCTL_DSP_STEREO, &stereo);
+
+ d->config.channel_config = MonoStereo;
+ if (stereo == 0)
+ d->config.channels = 1;
+ else
+ d->config.channels = 2;
+
+ ioctl(d->audio_fd, SNDCTL_DSP_SPEED, &d->config.sample_rate);
+
+ return 1;
+}
+
+const AudioConfiguration* OSSSink::audioConfiguration() const
+{
+ return &d->config;
+}
+
+bool OSSSink::writeFrame(AudioFrame* frame)
+{
+ if (!d->valid) return false;
+
+ if ( frame->sample_width != d->config.sample_width
+ || frame->channels != d->config.channels )
+ {
+ if (setAudioConfiguration(frame) < 0)
+ return false;
+ }
+
+ int channels = d->config.channels;
+ int length = frame->length;
+ int bytelen = length*channels*((d->config.sample_width+7)/8);
+
+ if (bytelen > d->buffer_length) {
+ delete d->buffer;
+ d->buffer = new char[bytelen];
+ d->buffer_length = bytelen;
+ }
+
+ if (d->config.sample_width == 8) {
+ int8_t *buffer = (int8_t*)d->buffer;
+ int8_t** data = (int8_t**)frame->data;
+ for(int i=0; i<length; i++)
+ for(int j=0; j<channels; j++)
+ buffer[i*channels+j] = data[j][i];
+ } else {
+ int16_t *buffer = (int16_t*)d->buffer;
+ int16_t** data = (int16_t**)frame->data;
+ for(int i=0; i<length; i++)
+ for(int j=0; j<channels; j++)
+ buffer[i*channels+j] = data[j][i];
+ }
+
+ int status = 0;
+ do {
+ status = ::write(d->audio_fd, d->buffer, bytelen);
+ if (status == -1) {
+// if (errno == EAGAIN) continue;
+ if (errno == EINTR) continue;
+ return false;
+ }
+ } while(false);
+
+ return true;
+}
+
+} // namespace
diff --git a/akode/plugins/oss_sink/oss_sink.h b/akode/plugins/oss_sink/oss_sink.h
new file mode 100644
index 0000000..814b391
--- /dev/null
+++ b/akode/plugins/oss_sink/oss_sink.h
@@ -0,0 +1,65 @@
+/* aKode: OSS-Sink
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _AKODE_OSS_SINK_H
+#define _AKODE_OSS_SINK_H
+
+#include "sink.h"
+
+#include "akode_export.h"
+
+namespace aKode {
+
+class AudioConfiguration;
+class AudioFrame;
+
+class OSSSink : public Sink {
+public:
+ OSSSink();
+ ~OSSSink();
+ bool open();
+ bool openDevice(const char*);
+ void close();
+ int setAudioConfiguration(const AudioConfiguration *config);
+ const AudioConfiguration* audioConfiguration() const;
+ // Writes blocking
+ bool writeFrame(AudioFrame *frame);
+
+// void pause();
+// void resume();
+
+ struct private_data;
+private:
+ template<class T> void _writeFrame(AudioFrame *frame);
+ private_data *d;
+};
+
+class OSSSinkPlugin : public SinkPlugin {
+public:
+ virtual OSSSink* openSink() {
+ return new OSSSink();
+ }
+};
+
+extern "C" AKODE_EXPORT OSSSinkPlugin oss_sink;
+
+} // namespace
+
+#endif
diff --git a/akode/plugins/polyp_sink/Makefile.am b/akode/plugins/polyp_sink/Makefile.am
new file mode 100644
index 0000000..b67602a
--- /dev/null
+++ b/akode/plugins/polyp_sink/Makefile.am
@@ -0,0 +1,7 @@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(POLYP_CFLAGS) $(all_includes)
+
+lib_LTLIBRARIES = libakode_polyp_sink.la
+
+libakode_polyp_sink_la_SOURCES = polyp_sink.cpp
+libakode_polyp_sink_la_LDFLAGS = -module -avoid-version -no-undefined $(POLYP_LDFLAGS)
+libakode_polyp_sink_la_LIBADD = ../../lib/libakode.la $(POLYP_LIBADD)
diff --git a/akode/plugins/polyp_sink/Makefile.in b/akode/plugins/polyp_sink/Makefile.in
new file mode 100644
index 0000000..dccd711
--- /dev/null
+++ b/akode/plugins/polyp_sink/Makefile.in
@@ -0,0 +1,659 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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@
+
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = akode/plugins/polyp_sink
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/akode/lib/akode_export.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libakode_polyp_sink_la_DEPENDENCIES = ../../lib/libakode.la \
+ $(am__DEPENDENCIES_1)
+am_libakode_polyp_sink_la_OBJECTS = polyp_sink.lo
+#>- libakode_polyp_sink_la_OBJECTS = $(am_libakode_polyp_sink_la_OBJECTS)
+#>+ 1
+libakode_polyp_sink_la_OBJECTS = polyp_sink.lo
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/akode/lib
+depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
+am__depfiles_maybe = depfiles
+#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 2
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+#>- $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 3
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+CXXLD = $(CXX)
+#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+#>+ 2
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libakode_polyp_sink_la_SOURCES)
+DIST_SOURCES = $(libakode_polyp_sink_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AKODE_LIBDL = @AKODE_LIBDL@
+ALSA_CFLAGS = @ALSA_CFLAGS@
+ALSA_LIBS = @ALSA_LIBS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVCODEC_CFLAGS = @AVCODEC_CFLAGS@
+AVCODEC_LDFLAGS = @AVCODEC_LDFLAGS@
+AVCODEC_LIBADD = @AVCODEC_LIBADD@
+AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@
+AVFORMAT_LDFLAGS = @AVFORMAT_LDFLAGS@
+AVFORMAT_LIBADD = @AVFORMAT_LIBADD@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LDFLAGS = @JACK_LDFLAGS@
+JACK_LIBADD = @JACK_LIBADD@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBFLAC = @LIBFLAC@
+LIBOBJS = @LIBOBJS@
+LIBOGGFLAC = @LIBOGGFLAC@
+LIBOSSAUDIO = @LIBOSSAUDIO@
+LIBPTHREAD = @LIBPTHREAD@
+LIBS = @LIBS@
+LIBSAMPLERATE = @LIBSAMPLERATE@
+LIBSEM = @LIBSEM@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MADLIBS = @MADLIBS@
+MAKEINFO = @MAKEINFO@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POLYP_CFLAGS = @POLYP_CFLAGS@
+POLYP_LDFLAGS = @POLYP_LDFLAGS@
+POLYP_LIBADD = @POLYP_LIBADD@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPEEXLIBS = @SPEEXLIBS@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+VERSION = @VERSION@
+VORBISFILE_LIBS = @VORBISFILE_LIBS@
+VORBIS_LIBS = @VORBIS_LIBS@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+akode_SUBDIR_included_FALSE = @akode_SUBDIR_included_FALSE@
+akode_SUBDIR_included_TRUE = @akode_SUBDIR_included_TRUE@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+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@
+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@
+include_alsa_sink_FALSE = @include_alsa_sink_FALSE@
+include_alsa_sink_TRUE = @include_alsa_sink_TRUE@
+include_ffmpeg_decoder_FALSE = @include_ffmpeg_decoder_FALSE@
+include_ffmpeg_decoder_TRUE = @include_ffmpeg_decoder_TRUE@
+include_jack_sink_FALSE = @include_jack_sink_FALSE@
+include_jack_sink_TRUE = @include_jack_sink_TRUE@
+include_mpeg_decoder_FALSE = @include_mpeg_decoder_FALSE@
+include_mpeg_decoder_TRUE = @include_mpeg_decoder_TRUE@
+include_oss_sink_FALSE = @include_oss_sink_FALSE@
+include_oss_sink_TRUE = @include_oss_sink_TRUE@
+include_polyp_sink_FALSE = @include_polyp_sink_FALSE@
+include_polyp_sink_TRUE = @include_polyp_sink_TRUE@
+include_src_resampler_FALSE = @include_src_resampler_FALSE@
+include_src_resampler_TRUE = @include_src_resampler_TRUE@
+include_sun_sink_FALSE = @include_sun_sink_FALSE@
+include_sun_sink_TRUE = @include_sun_sink_TRUE@
+include_xiph_decoder_FALSE = @include_xiph_decoder_FALSE@
+include_xiph_decoder_TRUE = @include_xiph_decoder_TRUE@
+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@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(POLYP_CFLAGS) $(all_includes)
+lib_LTLIBRARIES = libakode_polyp_sink.la
+libakode_polyp_sink_la_SOURCES = polyp_sink.cpp
+#>- libakode_polyp_sink_la_LDFLAGS = -module -avoid-version -no-undefined $(POLYP_LDFLAGS)
+#>+ 1
+libakode_polyp_sink_la_LDFLAGS = -module -avoid-version -no-undefined $(KDE_NO_UNDEFINED) $(POLYP_LDFLAGS)
+libakode_polyp_sink_la_LIBADD = ../../lib/libakode.la $(POLYP_LIBADD)
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/polyp_sink/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu akode/plugins/polyp_sink/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/polyp_sink/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/polyp_sink/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/polyp_sink/Makefile.in
+.PRECIOUS: 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: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_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
+#>- libakode_polyp_sink.la: $(libakode_polyp_sink_la_OBJECTS) $(libakode_polyp_sink_la_DEPENDENCIES)
+#>+ 2
+@KDE_USE_CLOSURE_TRUE@libakode_polyp_sink.la: libakode_polyp_sink.la.closure $(libakode_polyp_sink_la_OBJECTS) $(libakode_polyp_sink_la_DEPENDENCIES)
+@KDE_USE_CLOSURE_FALSE@libakode_polyp_sink.la: $(libakode_polyp_sink_la_OBJECTS) $(libakode_polyp_sink_la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(libdir) $(libakode_polyp_sink_la_LDFLAGS) $(libakode_polyp_sink_la_OBJECTS) $(libakode_polyp_sink_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polyp_sink.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+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: TAGS
+
+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; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+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
+
+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"; \
+ $(mkdir_p) "$(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)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+#>- mostlyclean-am
+#>+ 2
+clean-am: clean-closures clean-bcheck clean-generic clean-libLTLIBRARIES clean-libtool \
+ 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:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+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 uninstall-libLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool ctags 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-exec \
+ install-exec-am install-info install-info-am \
+ install-libLTLIBRARIES 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 \
+ uninstall-libLTLIBRARIES
+
+# 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:
+
+#>+ 8
+libakode_polyp_sink.la.closure: $(libakode_polyp_sink_la_OBJECTS) $(libakode_polyp_sink_la_DEPENDENCIES)
+ @echo "int main() {return 0;}" > libakode_polyp_sink_la_closure.cpp
+ @$(LTCXXCOMPILE) -c libakode_polyp_sink_la_closure.cpp
+ $(CXXLINK) libakode_polyp_sink_la_closure.lo $(libakode_polyp_sink_la_LDFLAGS) $(libakode_polyp_sink_la_OBJECTS) $(libakode_polyp_sink_la_LIBADD) $(LIBS)
+ @rm -f libakode_polyp_sink_la_closure.* libakode_polyp_sink.la.closure
+ @echo "timestamp" > libakode_polyp_sink.la.closure
+
+
+#>+ 2
+KDE_DIST=polyp_sink.h Makefile.in Makefile.am
+
+#>+ 3
+clean-closures:
+ -rm -f libakode_polyp_sink.la.closure
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/polyp_sink/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/polyp_sink/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/polyp_sink/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXXCOMPILE) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/akode/plugins/polyp_sink/polyp_sink.cpp b/akode/plugins/polyp_sink/polyp_sink.cpp
new file mode 100644
index 0000000..9376dac
--- /dev/null
+++ b/akode/plugins/polyp_sink/polyp_sink.cpp
@@ -0,0 +1,143 @@
+/* aKode: Polyp-Sink
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#elif defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#endif
+#include <polyp/polyplib-simple.h>
+
+#include "audioframe.h"
+#include "audiobuffer.h"
+#include "polyp_sink.h"
+
+#include <iostream>
+
+namespace aKode {
+
+extern "C" { PolypSinkPlugin polyp_sink; };
+
+struct PolypSink::private_data
+{
+ private_data() : server(0), error(false) {};
+
+ pa_simple *server;
+ pa_sample_spec sample_spec;
+
+ bool error;
+
+ AudioConfiguration config;
+};
+
+PolypSink::PolypSink()
+{
+ m_data = new private_data;
+ m_data->sample_spec.rate = 44100;
+ m_data->sample_spec.channels = 2;
+ m_data->sample_spec.format = PA_SAMPLE_S16NE;
+}
+
+bool PolypSink::open() {
+ int error = 0;
+ m_data->server = pa_simple_new(0, "akode-client", PA_STREAM_PLAYBACK, 0, "", &m_data->sample_spec, 0, 255, &error );
+ if (!m_data->server || error != 0) {
+ m_data->error = true;
+ close();
+ std::cout << "Cannot open client\n";
+ return false;
+ }
+
+
+ return true;
+}
+
+void PolypSink::close() {
+ if (m_data->server) {
+ pa_simple_free(m_data->server);
+ m_data->server = 0;
+ }
+}
+
+PolypSink::~PolypSink()
+{
+ close();
+ delete m_data;
+}
+
+int PolypSink::setAudioConfiguration(const AudioConfiguration* config)
+{
+ if (m_data->error) return -1;
+
+ int res = 0;
+ if (*config == m_data->config) return 0;
+ m_data->config = *config;
+
+ if (config->channel_config != MonoStereo ) return -1;
+ m_data->sample_spec.channels = config->channels;
+
+ if (config->sample_width != 16) {
+ res = 1;
+ m_data->config.sample_width = 16;
+ }
+
+ m_data->sample_spec.rate = config->sample_rate;
+
+ // create new connection
+ close();
+ open();
+
+ return res;
+}
+
+const AudioConfiguration* PolypSink::audioConfiguration() const
+{
+ return &m_data->config;
+}
+
+bool PolypSink::writeFrame(AudioFrame* frame)
+{
+ if ( m_data->error ) return false;
+
+ if ( frame->channels != m_data->config.channels || frame->sample_rate != m_data->config.sample_rate)
+ {
+ if (setAudioConfiguration(frame)!=0)
+ return false;
+ }
+
+ int channels = m_data->config.channels;
+ int length = frame->length;
+
+ int16_t *buffer = new int16_t[length*channels];
+ int16_t** data = (int16_t**)frame->data;
+ for(int i = 0; i<length; i++)
+ for(int j=0; j<channels; j++)
+ buffer[i*channels+j] = data[j][i];
+
+ int error = 0;
+ pa_simple_write(m_data->server, buffer, channels*length*2, &error);
+ delete[] buffer;
+
+ return (error == 0);
+}
+
+} // namespace
diff --git a/akode/plugins/polyp_sink/polyp_sink.h b/akode/plugins/polyp_sink/polyp_sink.h
new file mode 100644
index 0000000..e279ff6
--- /dev/null
+++ b/akode/plugins/polyp_sink/polyp_sink.h
@@ -0,0 +1,60 @@
+/* aKode: Polyp-Sink
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _AKODE_POLYP_SINK_H
+#define _AKODE_POLYP_SINK_H
+
+#include "sink.h"
+
+#include "akode_export.h"
+
+namespace aKode {
+
+class AudioConfiguration;
+class AudioFrame;
+
+class PolypSink : public Sink {
+public:
+ PolypSink();
+ ~PolypSink();
+ bool open();
+ void close();
+ int setAudioConfiguration(const AudioConfiguration *config);
+ const AudioConfiguration* audioConfiguration() const;
+ // Writes blocking
+ bool writeFrame(AudioFrame *frame);
+
+ struct private_data;
+private:
+ private_data *m_data;
+};
+
+class PolypSinkPlugin : public SinkPlugin {
+public:
+ virtual PolypSink* openSink() {
+ return new PolypSink();
+ }
+};
+
+extern "C" AKODE_EXPORT PolypSinkPlugin polyp_sink;
+
+} // namespace
+
+#endif
diff --git a/akode/plugins/src_resampler/Makefile.am b/akode/plugins/src_resampler/Makefile.am
new file mode 100644
index 0000000..f643a48
--- /dev/null
+++ b/akode/plugins/src_resampler/Makefile.am
@@ -0,0 +1,7 @@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib -I$(srcdir)/mppdec $(all_includes)
+
+lib_LTLIBRARIES = libakode_src_resampler.la
+
+libakode_src_resampler_la_SOURCES = src_resampler.cpp
+libakode_src_resampler_la_LDFLAGS = -module -avoid-version -no-undefined
+libakode_src_resampler_la_LIBADD = ../../lib/libakode.la $(LIBSAMPLERATE)
diff --git a/akode/plugins/src_resampler/Makefile.in b/akode/plugins/src_resampler/Makefile.in
new file mode 100644
index 0000000..e96956b
--- /dev/null
+++ b/akode/plugins/src_resampler/Makefile.in
@@ -0,0 +1,660 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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@
+
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = akode/plugins/src_resampler
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/akode/lib/akode_export.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libakode_src_resampler_la_DEPENDENCIES = ../../lib/libakode.la \
+ $(am__DEPENDENCIES_1)
+am_libakode_src_resampler_la_OBJECTS = src_resampler.lo
+#>- libakode_src_resampler_la_OBJECTS = \
+#>- $(am_libakode_src_resampler_la_OBJECTS)
+#>+ 1
+libakode_src_resampler_la_OBJECTS = src_resampler.lo
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/akode/lib
+depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
+am__depfiles_maybe = depfiles
+#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 2
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+#>- $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 3
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+CXXLD = $(CXX)
+#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+#>+ 2
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libakode_src_resampler_la_SOURCES)
+DIST_SOURCES = $(libakode_src_resampler_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AKODE_LIBDL = @AKODE_LIBDL@
+ALSA_CFLAGS = @ALSA_CFLAGS@
+ALSA_LIBS = @ALSA_LIBS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVCODEC_CFLAGS = @AVCODEC_CFLAGS@
+AVCODEC_LDFLAGS = @AVCODEC_LDFLAGS@
+AVCODEC_LIBADD = @AVCODEC_LIBADD@
+AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@
+AVFORMAT_LDFLAGS = @AVFORMAT_LDFLAGS@
+AVFORMAT_LIBADD = @AVFORMAT_LIBADD@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LDFLAGS = @JACK_LDFLAGS@
+JACK_LIBADD = @JACK_LIBADD@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBFLAC = @LIBFLAC@
+LIBOBJS = @LIBOBJS@
+LIBOGGFLAC = @LIBOGGFLAC@
+LIBOSSAUDIO = @LIBOSSAUDIO@
+LIBPTHREAD = @LIBPTHREAD@
+LIBS = @LIBS@
+LIBSAMPLERATE = @LIBSAMPLERATE@
+LIBSEM = @LIBSEM@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MADLIBS = @MADLIBS@
+MAKEINFO = @MAKEINFO@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POLYP_CFLAGS = @POLYP_CFLAGS@
+POLYP_LDFLAGS = @POLYP_LDFLAGS@
+POLYP_LIBADD = @POLYP_LIBADD@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPEEXLIBS = @SPEEXLIBS@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+VERSION = @VERSION@
+VORBISFILE_LIBS = @VORBISFILE_LIBS@
+VORBIS_LIBS = @VORBIS_LIBS@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+akode_SUBDIR_included_FALSE = @akode_SUBDIR_included_FALSE@
+akode_SUBDIR_included_TRUE = @akode_SUBDIR_included_TRUE@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+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@
+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@
+include_alsa_sink_FALSE = @include_alsa_sink_FALSE@
+include_alsa_sink_TRUE = @include_alsa_sink_TRUE@
+include_ffmpeg_decoder_FALSE = @include_ffmpeg_decoder_FALSE@
+include_ffmpeg_decoder_TRUE = @include_ffmpeg_decoder_TRUE@
+include_jack_sink_FALSE = @include_jack_sink_FALSE@
+include_jack_sink_TRUE = @include_jack_sink_TRUE@
+include_mpeg_decoder_FALSE = @include_mpeg_decoder_FALSE@
+include_mpeg_decoder_TRUE = @include_mpeg_decoder_TRUE@
+include_oss_sink_FALSE = @include_oss_sink_FALSE@
+include_oss_sink_TRUE = @include_oss_sink_TRUE@
+include_polyp_sink_FALSE = @include_polyp_sink_FALSE@
+include_polyp_sink_TRUE = @include_polyp_sink_TRUE@
+include_src_resampler_FALSE = @include_src_resampler_FALSE@
+include_src_resampler_TRUE = @include_src_resampler_TRUE@
+include_sun_sink_FALSE = @include_sun_sink_FALSE@
+include_sun_sink_TRUE = @include_sun_sink_TRUE@
+include_xiph_decoder_FALSE = @include_xiph_decoder_FALSE@
+include_xiph_decoder_TRUE = @include_xiph_decoder_TRUE@
+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@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib -I$(srcdir)/mppdec $(all_includes)
+lib_LTLIBRARIES = libakode_src_resampler.la
+libakode_src_resampler_la_SOURCES = src_resampler.cpp
+#>- libakode_src_resampler_la_LDFLAGS = -module -avoid-version -no-undefined
+#>+ 1
+libakode_src_resampler_la_LDFLAGS = -module -avoid-version -no-undefined $(KDE_NO_UNDEFINED)
+libakode_src_resampler_la_LIBADD = ../../lib/libakode.la $(LIBSAMPLERATE)
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/src_resampler/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu akode/plugins/src_resampler/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/src_resampler/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/src_resampler/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/src_resampler/Makefile.in
+.PRECIOUS: 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: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_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
+#>- libakode_src_resampler.la: $(libakode_src_resampler_la_OBJECTS) $(libakode_src_resampler_la_DEPENDENCIES)
+#>+ 2
+@KDE_USE_CLOSURE_TRUE@libakode_src_resampler.la: libakode_src_resampler.la.closure $(libakode_src_resampler_la_OBJECTS) $(libakode_src_resampler_la_DEPENDENCIES)
+@KDE_USE_CLOSURE_FALSE@libakode_src_resampler.la: $(libakode_src_resampler_la_OBJECTS) $(libakode_src_resampler_la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(libdir) $(libakode_src_resampler_la_LDFLAGS) $(libakode_src_resampler_la_OBJECTS) $(libakode_src_resampler_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/src_resampler.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+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: TAGS
+
+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; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+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
+
+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"; \
+ $(mkdir_p) "$(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)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+#>- mostlyclean-am
+#>+ 2
+clean-am: clean-closures clean-bcheck clean-generic clean-libLTLIBRARIES clean-libtool \
+ 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:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+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 uninstall-libLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool ctags 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-exec \
+ install-exec-am install-info install-info-am \
+ install-libLTLIBRARIES 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 \
+ uninstall-libLTLIBRARIES
+
+# 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:
+
+#>+ 8
+libakode_src_resampler.la.closure: $(libakode_src_resampler_la_OBJECTS) $(libakode_src_resampler_la_DEPENDENCIES)
+ @echo "int main() {return 0;}" > libakode_src_resampler_la_closure.cpp
+ @$(LTCXXCOMPILE) -c libakode_src_resampler_la_closure.cpp
+ $(CXXLINK) libakode_src_resampler_la_closure.lo $(libakode_src_resampler_la_LDFLAGS) $(libakode_src_resampler_la_OBJECTS) $(libakode_src_resampler_la_LIBADD) $(LIBS)
+ @rm -f libakode_src_resampler_la_closure.* libakode_src_resampler.la.closure
+ @echo "timestamp" > libakode_src_resampler.la.closure
+
+
+#>+ 2
+KDE_DIST=src_resampler.h Makefile.in Makefile.am
+
+#>+ 3
+clean-closures:
+ -rm -f libakode_src_resampler.la.closure
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/src_resampler/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/src_resampler/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/src_resampler/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXXCOMPILE) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/akode/plugins/src_resampler/src_resampler.cpp b/akode/plugins/src_resampler/src_resampler.cpp
new file mode 100644
index 0000000..2edb2ee
--- /dev/null
+++ b/akode/plugins/src_resampler/src_resampler.cpp
@@ -0,0 +1,177 @@
+/* aKode Resampler (Secret Rabbit Code)
+
+ Copyright (C) 2004,2006 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ 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., 51 Franklin Steet, Fifth Floor, Boston,
+ MA 02110-1301, USA.
+*/
+
+#include "akodelib.h"
+
+#include <samplerate.h>
+
+#include "arithmetic.h"
+#include "audioframe.h"
+#include "src_resampler.h"
+
+namespace aKode {
+
+SRCResampler* SRCResamplerPlugin::openResampler() {
+ return new SRCResampler();
+}
+
+extern "C" { SRCResamplerPlugin src_resampler; };
+
+SRCResampler::SRCResampler() : speed(1.0), sample_rate(44100) {};
+
+template<typename S>
+static void _convert1_FP(AudioFrame *in, float* outdata)
+{
+ long length = in->length;
+ int channels = in->channels;
+
+ S** indata = (S**)in->data;
+ for(int j=0; j<length; j++) {
+ for(int i=0; i<channels; i++) {
+ outdata[i+j*channels] = (float)(indata[i][j]);
+ }
+ }
+}
+
+template<typename S>
+static void _convert1_Int(AudioFrame *in, float* outdata)
+{
+ float scale = 1.0/(float)Arithm_Int<S>::max(in->sample_width);
+
+ long length = in->length;
+ int channels = in->channels;
+
+ S** indata = (S**)in->data;
+ for(int j=0; j<length; j++) {
+ for(int i=0; i<channels; i++) {
+ outdata[i+j*channels] = scale*indata[i][j];
+ }
+ }
+}
+
+// demux channels
+template<typename S>
+static void _convert2_FP(float *indata, AudioFrame* out)
+{
+ long length = out->length;
+ int channels = out->channels;
+
+ S** outdata = (S**)out->data;
+ for(int j=0; j<length; j++) {
+ for(int i=0; i<channels; i++) {
+ outdata[i][j] = (S)(indata[i+j*channels]);
+ }
+ }
+}
+
+template<typename S>
+static void _convert2_Int(float *indata, AudioFrame* out)
+{
+ float scale = Arithm_Int<S>::max(out->sample_width);
+
+ long length = out->length;
+ int channels = out->channels;
+
+ S** outdata = (S**)out->data;
+ for(int j=0; j<length; j++) {
+ for(int i=0; i<channels; i++) {
+ outdata[i][j] = (S)(scale*indata[i+j*channels]);
+ }
+ }
+}
+
+// A high quality resampling by using libsamplerate
+bool SRCResampler::doFrame(AudioFrame* in, AudioFrame* out)
+{
+ // Ouch, I dont like this much mallocing
+ float *tmp1 = new float[in->channels*in->length];
+
+ // convert to float frames
+ if (in->sample_width == -64) {
+ _convert1_FP<double>(in, tmp1);
+ } else
+ if (in->sample_width == -32) {
+ _convert1_FP<float>(in, tmp1);
+ } else
+ if (in->sample_width <= 8) {
+ _convert1_Int<int8_t>(in, tmp1);
+ } else
+ if (in->sample_width <= 16) {
+ _convert1_Int<int16_t>(in, tmp1);
+ } else
+ _convert1_Int<int32_t>(in, tmp1);
+
+ float ratio = (sample_rate/(float)in->sample_rate) / speed;
+ long outlength = (long)((in->length + ratio) * ratio); // max size
+ float *tmp2 = new float[in->channels*outlength];
+
+ // We should figure out if interleaving first is faster
+ // than making a call per channel
+// for (int i=0; i<in->channels; i++) {
+ SRC_DATA src_data;
+
+ src_data.data_in = tmp1;
+ src_data.data_out = tmp2;
+ src_data.input_frames = in->length;
+ src_data.output_frames = outlength;
+ src_data.src_ratio = ratio;
+
+ src_simple(&src_data, SRC_SINC_MEDIUM_QUALITY, in->channels);
+// }
+
+ AudioConfiguration config = *in;
+ config.sample_width = -32;
+ config.sample_rate = sample_rate;
+ out->reserveSpace(&config, src_data.output_frames_gen);
+ out->pos = in->pos;
+
+ // convert from float frames
+#if 0
+ if (out->sample_width > 0) {
+ if (out->sample_width <= 8) {
+ _convert2_Int<int8_t>(tmp2, out);
+ } else
+ if (out->sample_width <= 16) {
+ _convert2_Int<int16_t>(tmp2, out);
+ } else
+ _convert2_Int<int32_t>(tmp2, out);
+ } else
+ if (out->sample_width == -64)
+ _convert2_FP<double>(tmp2, out);
+ else
+#endif
+ _convert2_FP<float>(tmp2, out);
+
+
+ delete[] tmp1;
+ delete[] tmp2;
+
+ return true;
+}
+
+void SRCResampler::setSpeed(float value) {
+ speed = value;
+}
+
+void SRCResampler::setSampleRate(unsigned int rate) {
+ sample_rate = rate;
+}
+
+} // namespace
diff --git a/akode/plugins/src_resampler/src_resampler.h b/akode/plugins/src_resampler/src_resampler.h
new file mode 100644
index 0000000..7321c12
--- /dev/null
+++ b/akode/plugins/src_resampler/src_resampler.h
@@ -0,0 +1,57 @@
+/* aKode: Resampler (Secret Rabbit Code)
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ 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., 51 Franklin Steet, Fifth Floor, Boston,
+ MA 02110-1301, USA.
+*/
+#ifndef _AKODE_SRC_RESAMPLER_H
+#define _AKODE_SRC_RESAMPLER_H
+
+#include "akodelib.h"
+
+#include "resampler.h"
+
+namespace aKode {
+
+class AudioFrame;
+
+//! High quality resampler using the Secret Rabbit Code library also known as libsamplerate
+
+/*!
+ * This is the high quality resampler. Compared to the default resampler, it is
+ * lot slower, uses primarely float point, and is GPL.
+ */
+class SRCResampler : public Resampler {
+public:
+ SRCResampler();
+ bool doFrame(AudioFrame* in, AudioFrame* out);
+ void setSampleRate(unsigned int rate);
+ void setSpeed(float speed);
+
+ float speed;
+ unsigned int sample_rate;
+};
+
+class SRCResamplerPlugin : public ResamplerPlugin {
+public:
+ virtual SRCResampler* openResampler();
+};
+
+extern "C" SRCResamplerPlugin src_resampler;
+
+} // namespace
+
+#endif
diff --git a/akode/plugins/sun_sink/Makefile.am b/akode/plugins/sun_sink/Makefile.am
new file mode 100644
index 0000000..64806dd
--- /dev/null
+++ b/akode/plugins/sun_sink/Makefile.am
@@ -0,0 +1,7 @@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(all_includes)
+
+lib_LTLIBRARIES = libakode_sun_sink.la
+
+libakode_sun_sink_la_SOURCES = sun_sink.cpp
+libakode_sun_sink_la_LDFLAGS = -module -avoid-version -no-undefined
+libakode_sun_sink_la_LIBADD = ../../lib/libakode.la $(LIBSUNAUDIO)
diff --git a/akode/plugins/sun_sink/Makefile.in b/akode/plugins/sun_sink/Makefile.in
new file mode 100644
index 0000000..c9ead26
--- /dev/null
+++ b/akode/plugins/sun_sink/Makefile.in
@@ -0,0 +1,657 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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@
+
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = akode/plugins/sun_sink
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/akode/lib/akode_export.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libakode_sun_sink_la_DEPENDENCIES = ../../lib/libakode.la
+am_libakode_sun_sink_la_OBJECTS = sun_sink.lo
+#>- libakode_sun_sink_la_OBJECTS = $(am_libakode_sun_sink_la_OBJECTS)
+#>+ 1
+libakode_sun_sink_la_OBJECTS = sun_sink.lo
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/akode/lib
+depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
+am__depfiles_maybe = depfiles
+#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 2
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+#>- $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 3
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+CXXLD = $(CXX)
+#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+#>+ 2
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libakode_sun_sink_la_SOURCES)
+DIST_SOURCES = $(libakode_sun_sink_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AKODE_LIBDL = @AKODE_LIBDL@
+ALSA_CFLAGS = @ALSA_CFLAGS@
+ALSA_LIBS = @ALSA_LIBS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVCODEC_CFLAGS = @AVCODEC_CFLAGS@
+AVCODEC_LDFLAGS = @AVCODEC_LDFLAGS@
+AVCODEC_LIBADD = @AVCODEC_LIBADD@
+AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@
+AVFORMAT_LDFLAGS = @AVFORMAT_LDFLAGS@
+AVFORMAT_LIBADD = @AVFORMAT_LIBADD@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LDFLAGS = @JACK_LDFLAGS@
+JACK_LIBADD = @JACK_LIBADD@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBFLAC = @LIBFLAC@
+LIBOBJS = @LIBOBJS@
+LIBOGGFLAC = @LIBOGGFLAC@
+LIBOSSAUDIO = @LIBOSSAUDIO@
+LIBPTHREAD = @LIBPTHREAD@
+LIBS = @LIBS@
+LIBSAMPLERATE = @LIBSAMPLERATE@
+LIBSEM = @LIBSEM@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MADLIBS = @MADLIBS@
+MAKEINFO = @MAKEINFO@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POLYP_CFLAGS = @POLYP_CFLAGS@
+POLYP_LDFLAGS = @POLYP_LDFLAGS@
+POLYP_LIBADD = @POLYP_LIBADD@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPEEXLIBS = @SPEEXLIBS@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+VERSION = @VERSION@
+VORBISFILE_LIBS = @VORBISFILE_LIBS@
+VORBIS_LIBS = @VORBIS_LIBS@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+akode_SUBDIR_included_FALSE = @akode_SUBDIR_included_FALSE@
+akode_SUBDIR_included_TRUE = @akode_SUBDIR_included_TRUE@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+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@
+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@
+include_alsa_sink_FALSE = @include_alsa_sink_FALSE@
+include_alsa_sink_TRUE = @include_alsa_sink_TRUE@
+include_ffmpeg_decoder_FALSE = @include_ffmpeg_decoder_FALSE@
+include_ffmpeg_decoder_TRUE = @include_ffmpeg_decoder_TRUE@
+include_jack_sink_FALSE = @include_jack_sink_FALSE@
+include_jack_sink_TRUE = @include_jack_sink_TRUE@
+include_mpeg_decoder_FALSE = @include_mpeg_decoder_FALSE@
+include_mpeg_decoder_TRUE = @include_mpeg_decoder_TRUE@
+include_oss_sink_FALSE = @include_oss_sink_FALSE@
+include_oss_sink_TRUE = @include_oss_sink_TRUE@
+include_polyp_sink_FALSE = @include_polyp_sink_FALSE@
+include_polyp_sink_TRUE = @include_polyp_sink_TRUE@
+include_src_resampler_FALSE = @include_src_resampler_FALSE@
+include_src_resampler_TRUE = @include_src_resampler_TRUE@
+include_sun_sink_FALSE = @include_sun_sink_FALSE@
+include_sun_sink_TRUE = @include_sun_sink_TRUE@
+include_xiph_decoder_FALSE = @include_xiph_decoder_FALSE@
+include_xiph_decoder_TRUE = @include_xiph_decoder_TRUE@
+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@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(all_includes)
+lib_LTLIBRARIES = libakode_sun_sink.la
+libakode_sun_sink_la_SOURCES = sun_sink.cpp
+#>- libakode_sun_sink_la_LDFLAGS = -module -avoid-version -no-undefined
+#>+ 1
+libakode_sun_sink_la_LDFLAGS = -module -avoid-version -no-undefined $(KDE_NO_UNDEFINED)
+libakode_sun_sink_la_LIBADD = ../../lib/libakode.la $(LIBSUNAUDIO)
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/sun_sink/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu akode/plugins/sun_sink/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/sun_sink/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/sun_sink/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/sun_sink/Makefile.in
+.PRECIOUS: 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: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_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
+#>- libakode_sun_sink.la: $(libakode_sun_sink_la_OBJECTS) $(libakode_sun_sink_la_DEPENDENCIES)
+#>+ 2
+@KDE_USE_CLOSURE_TRUE@libakode_sun_sink.la: libakode_sun_sink.la.closure $(libakode_sun_sink_la_OBJECTS) $(libakode_sun_sink_la_DEPENDENCIES)
+@KDE_USE_CLOSURE_FALSE@libakode_sun_sink.la: $(libakode_sun_sink_la_OBJECTS) $(libakode_sun_sink_la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(libdir) $(libakode_sun_sink_la_LDFLAGS) $(libakode_sun_sink_la_OBJECTS) $(libakode_sun_sink_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_sink.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+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: TAGS
+
+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; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+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
+
+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"; \
+ $(mkdir_p) "$(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)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+#>- mostlyclean-am
+#>+ 2
+clean-am: clean-closures clean-bcheck clean-generic clean-libLTLIBRARIES clean-libtool \
+ 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:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+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 uninstall-libLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool ctags 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-exec \
+ install-exec-am install-info install-info-am \
+ install-libLTLIBRARIES 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 \
+ uninstall-libLTLIBRARIES
+
+# 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:
+
+#>+ 8
+libakode_sun_sink.la.closure: $(libakode_sun_sink_la_OBJECTS) $(libakode_sun_sink_la_DEPENDENCIES)
+ @echo "int main() {return 0;}" > libakode_sun_sink_la_closure.cpp
+ @$(LTCXXCOMPILE) -c libakode_sun_sink_la_closure.cpp
+ $(CXXLINK) libakode_sun_sink_la_closure.lo $(libakode_sun_sink_la_LDFLAGS) $(libakode_sun_sink_la_OBJECTS) $(libakode_sun_sink_la_LIBADD) $(LIBS)
+ @rm -f libakode_sun_sink_la_closure.* libakode_sun_sink.la.closure
+ @echo "timestamp" > libakode_sun_sink.la.closure
+
+
+#>+ 2
+KDE_DIST=sun_sink.h Makefile.in Makefile.am
+
+#>+ 3
+clean-closures:
+ -rm -f libakode_sun_sink.la.closure
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/sun_sink/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/sun_sink/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/sun_sink/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXXCOMPILE) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/akode/plugins/sun_sink/sun_sink.cpp b/akode/plugins/sun_sink/sun_sink.cpp
new file mode 100644
index 0000000..c8b6c57
--- /dev/null
+++ b/akode/plugins/sun_sink/sun_sink.cpp
@@ -0,0 +1,179 @@
+/* aKode: Sun-Sink
+
+ Copyright (C) 2005 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <config.h>
+
+#include <sys/audioio.h>
+
+#include <sys/ioctl.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <alloca.h>
+
+#include <audioframe.h>
+#include "sun_sink.h"
+
+#include <iostream>
+
+namespace aKode {
+
+extern "C" { SunSinkPlugin sun_sink; }
+
+struct SunSink::private_data
+{
+ private_data() : audio_fd(-1), device(0), valid(false) {};
+ int audio_fd;
+ audio_info_t auinfo;
+
+ const char *device;
+ AudioConfiguration config;
+ bool valid;
+};
+
+
+SunSink::SunSink()
+{
+ d = new private_data;
+}
+
+SunSink::~SunSink()
+{
+ close();
+ delete d;
+}
+
+bool SunSink::open()
+{
+ const char* device = getenv("AUDIODEV");
+ if (!device) device = "/dev/audio";
+
+ if (::access(device, F_OK) != 0) {
+ std::cerr << "akode: Device not found: " << device << "\n";
+ goto failed;
+ }
+
+ d->device = device;
+
+ d->audio_fd = ::open(d->device, O_WRONLY, 0);
+
+ if (d->audio_fd == -1) {
+ std::cerr << "akode: No write access to " << device << "\n";
+ goto failed;
+ }
+ d->valid = true;
+ return true;
+
+failed:
+ d->valid = false;
+ return false;
+}
+
+
+void SunSink::close() {
+ if (d->audio_fd != -1) ::close(d->audio_fd);
+ d->audio_fd = -1;
+ d->valid = false;
+}
+
+int SunSink::setAudioConfiguration(const AudioConfiguration* config)
+{
+ d->config = *config;
+
+ AUDIO_INITINFO(&d->auinfo)
+
+ if (ioctl(d->audio_fd, AUDIO_GETINFO, &d->auinfo) < 0)
+ {
+ d->valid = false;
+ return -1;
+ }
+
+ int width = config->sample_width;
+ if (width < 0 ) width = 16;
+ d->auinfo.play.precision = width;
+
+ d->auinfo.play.encoding = AUDIO_ENCODING_LINEAR;
+
+ d->auinfo.play.channels = config->channels;
+ d->auinfo.play.sample_rate = config->sample_rate;
+
+ if (ioctl(d->audio_fd, AUDIO_SETINFO, &d->auinfo) < 0)
+ {
+ d->valid = false;
+ return -1;
+ }
+
+ if (ioctl(d->audio_fd, AUDIO_GETINFO, &d->auinfo) < 0)
+ {
+ d->valid = false;
+ return -1;
+ }
+
+ d->config.sample_width = d->auinfo.play.precision;
+ d->config.channels = d->auinfo.play.channels;
+ d->config.sample_rate = d->auinfo.play.sample_rate;
+ if (d->config.channels <= 2) d->config.channel_config = MonoStereo;
+
+ if (d->config == *config)
+ return 0;
+ else
+ return 1;
+}
+
+const AudioConfiguration* SunSink::audioConfiguration() const
+{
+ return &d->config;
+}
+
+bool SunSink::writeFrame(AudioFrame* frame)
+{
+ if (!d->valid) return false;
+
+ if ( frame->sample_width != d->config.sample_width
+ || frame->channels != d->config.channels )
+ {
+ if (setAudioConfiguration(frame) < 0)
+ return false;
+ }
+
+ int channels = d->config.channels;
+ int length = frame->length;
+
+ int16_t *buffer = (int16_t*)alloca(length*channels*2);
+ int16_t** data = (int16_t**)frame->data;
+ for(int i = 0; i<length; i++)
+ for(int j=0; j<channels; j++)
+ buffer[i*channels+j] = data[j][i];
+
+// std::cerr << "Writing frame\n";
+ int status = 0;
+ do {
+ status = ::write(d->audio_fd, buffer, channels*length*2);
+ if (status == -1) {
+// if (errno == EAGAIN) continue;
+ if (errno == EINTR) continue;
+ return false;
+ }
+ } while(false);
+
+ return true;
+}
+
+} // namespace
diff --git a/akode/plugins/sun_sink/sun_sink.h b/akode/plugins/sun_sink/sun_sink.h
new file mode 100644
index 0000000..33b10cb
--- /dev/null
+++ b/akode/plugins/sun_sink/sun_sink.h
@@ -0,0 +1,64 @@
+/* aKode: Sun-Sink
+
+ Copyright (C) 2005 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _AKODE_SUN_SINK_H
+#define _AKODE_SUN_SINK_H
+
+#include "sink.h"
+
+#include "akode_export.h"
+
+namespace aKode {
+
+class AudioConfiguration;
+class AudioFrame;
+
+class SunSink : public Sink {
+public:
+ SunSink();
+ ~SunSink();
+ bool open();
+ void close();
+ int setAudioConfiguration(const AudioConfiguration *config);
+ const AudioConfiguration* audioConfiguration() const;
+ // Writes blocking
+ bool writeFrame(AudioFrame *frame);
+
+// void pause();
+// void resume();
+
+ struct private_data;
+private:
+ template<class T> void _writeFrame(AudioFrame *frame);
+ private_data *d;
+};
+
+class SunSinkPlugin : public SinkPlugin {
+public:
+ virtual SunSink* openSink() {
+ return new SunSink();
+ }
+};
+
+extern "C" AKODE_EXPORT SunSinkPlugin sun_sink;
+
+} // namespace
+
+#endif
diff --git a/akode/plugins/xiph_decoder/Makefile.am b/akode/plugins/xiph_decoder/Makefile.am
new file mode 100644
index 0000000..367760e
--- /dev/null
+++ b/akode/plugins/xiph_decoder/Makefile.am
@@ -0,0 +1,8 @@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(USER_INCLUDES) $(all_includes)
+
+lib_LTLIBRARIES = libakode_xiph_decoder.la
+
+libakode_xiph_decoder_la_SOURCES = flac_decoder.cpp flac113_decoder.cpp speex_decoder.cpp vorbis_decoder.cpp xiph_decoder.cpp
+
+libakode_xiph_decoder_la_LDFLAGS = -module -avoid-version -no-undefined $(USER_LDFLAGS)
+libakode_xiph_decoder_la_LIBADD = ../../lib/libakode.la $(LIBFLAC) $(LIBOGGFLAC) $(VORBIS_LIBS) $(VORBISFILE_LIBS) $(SPEEXLIBS) \ No newline at end of file
diff --git a/akode/plugins/xiph_decoder/Makefile.in b/akode/plugins/xiph_decoder/Makefile.in
new file mode 100644
index 0000000..b603541
--- /dev/null
+++ b/akode/plugins/xiph_decoder/Makefile.in
@@ -0,0 +1,689 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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@
+
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = akode/plugins/xiph_decoder
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h \
+ $(top_builddir)/akode/lib/akode_export.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libakode_xiph_decoder_la_DEPENDENCIES = ../../lib/libakode.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_libakode_xiph_decoder_la_OBJECTS = flac_decoder.lo \
+ flac113_decoder.lo speex_decoder.lo vorbis_decoder.lo \
+ xiph_decoder.lo
+#>- libakode_xiph_decoder_la_OBJECTS = \
+#>- $(am_libakode_xiph_decoder_la_OBJECTS)
+#>+ 6
+libakode_xiph_decoder_la_final_OBJECTS = libakode_xiph_decoder_la.all_cpp.lo
+libakode_xiph_decoder_la_nofinal_OBJECTS = flac_decoder.lo \
+ flac113_decoder.lo speex_decoder.lo vorbis_decoder.lo \
+ xiph_decoder.lo
+@KDE_USE_FINAL_FALSE@libakode_xiph_decoder_la_OBJECTS = $(libakode_xiph_decoder_la_nofinal_OBJECTS)
+@KDE_USE_FINAL_TRUE@libakode_xiph_decoder_la_OBJECTS = $(libakode_xiph_decoder_la_final_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/akode/lib
+depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
+am__depfiles_maybe = depfiles
+#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 2
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+#>- $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 3
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+CXXLD = $(CXX)
+#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+#>+ 2
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libakode_xiph_decoder_la_SOURCES)
+DIST_SOURCES = $(libakode_xiph_decoder_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AKODE_LIBDL = @AKODE_LIBDL@
+ALSA_CFLAGS = @ALSA_CFLAGS@
+ALSA_LIBS = @ALSA_LIBS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVCODEC_CFLAGS = @AVCODEC_CFLAGS@
+AVCODEC_LDFLAGS = @AVCODEC_LDFLAGS@
+AVCODEC_LIBADD = @AVCODEC_LIBADD@
+AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@
+AVFORMAT_LDFLAGS = @AVFORMAT_LDFLAGS@
+AVFORMAT_LIBADD = @AVFORMAT_LIBADD@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LDFLAGS = @JACK_LDFLAGS@
+JACK_LIBADD = @JACK_LIBADD@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBFLAC = @LIBFLAC@
+LIBOBJS = @LIBOBJS@
+LIBOGGFLAC = @LIBOGGFLAC@
+LIBOSSAUDIO = @LIBOSSAUDIO@
+LIBPTHREAD = @LIBPTHREAD@
+LIBS = @LIBS@
+LIBSAMPLERATE = @LIBSAMPLERATE@
+LIBSEM = @LIBSEM@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MADLIBS = @MADLIBS@
+MAKEINFO = @MAKEINFO@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POLYP_CFLAGS = @POLYP_CFLAGS@
+POLYP_LDFLAGS = @POLYP_LDFLAGS@
+POLYP_LIBADD = @POLYP_LIBADD@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPEEXLIBS = @SPEEXLIBS@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+VERSION = @VERSION@
+VORBISFILE_LIBS = @VORBISFILE_LIBS@
+VORBIS_LIBS = @VORBIS_LIBS@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+akode_SUBDIR_included_FALSE = @akode_SUBDIR_included_FALSE@
+akode_SUBDIR_included_TRUE = @akode_SUBDIR_included_TRUE@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+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@
+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@
+include_alsa_sink_FALSE = @include_alsa_sink_FALSE@
+include_alsa_sink_TRUE = @include_alsa_sink_TRUE@
+include_ffmpeg_decoder_FALSE = @include_ffmpeg_decoder_FALSE@
+include_ffmpeg_decoder_TRUE = @include_ffmpeg_decoder_TRUE@
+include_jack_sink_FALSE = @include_jack_sink_FALSE@
+include_jack_sink_TRUE = @include_jack_sink_TRUE@
+include_mpeg_decoder_FALSE = @include_mpeg_decoder_FALSE@
+include_mpeg_decoder_TRUE = @include_mpeg_decoder_TRUE@
+include_oss_sink_FALSE = @include_oss_sink_FALSE@
+include_oss_sink_TRUE = @include_oss_sink_TRUE@
+include_polyp_sink_FALSE = @include_polyp_sink_FALSE@
+include_polyp_sink_TRUE = @include_polyp_sink_TRUE@
+include_src_resampler_FALSE = @include_src_resampler_FALSE@
+include_src_resampler_TRUE = @include_src_resampler_TRUE@
+include_sun_sink_FALSE = @include_sun_sink_FALSE@
+include_sun_sink_TRUE = @include_sun_sink_TRUE@
+include_xiph_decoder_FALSE = @include_xiph_decoder_FALSE@
+include_xiph_decoder_TRUE = @include_xiph_decoder_TRUE@
+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@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(USER_INCLUDES) $(all_includes)
+lib_LTLIBRARIES = libakode_xiph_decoder.la
+libakode_xiph_decoder_la_SOURCES = flac_decoder.cpp flac113_decoder.cpp speex_decoder.cpp vorbis_decoder.cpp xiph_decoder.cpp
+#>- libakode_xiph_decoder_la_LDFLAGS = -module -avoid-version -no-undefined $(USER_LDFLAGS)
+#>+ 1
+libakode_xiph_decoder_la_LDFLAGS = -module -avoid-version -no-undefined $(KDE_NO_UNDEFINED) $(USER_LDFLAGS)
+libakode_xiph_decoder_la_LIBADD = ../../lib/libakode.la $(LIBFLAC) $(LIBOGGFLAC) $(VORBIS_LIBS) $(VORBISFILE_LIBS) $(SPEEXLIBS)
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/xiph_decoder/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu akode/plugins/xiph_decoder/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/xiph_decoder/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/xiph_decoder/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/xiph_decoder/Makefile.in
+.PRECIOUS: 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: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_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
+#>- libakode_xiph_decoder.la: $(libakode_xiph_decoder_la_OBJECTS) $(libakode_xiph_decoder_la_DEPENDENCIES)
+#>+ 2
+@KDE_USE_CLOSURE_TRUE@libakode_xiph_decoder.la: libakode_xiph_decoder.la.closure $(libakode_xiph_decoder_la_OBJECTS) $(libakode_xiph_decoder_la_DEPENDENCIES)
+@KDE_USE_CLOSURE_FALSE@libakode_xiph_decoder.la: $(libakode_xiph_decoder_la_OBJECTS) $(libakode_xiph_decoder_la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(libdir) $(libakode_xiph_decoder_la_LDFLAGS) $(libakode_xiph_decoder_la_OBJECTS) $(libakode_xiph_decoder_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flac113_decoder.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flac_decoder.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/speex_decoder.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vorbis_decoder.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiph_decoder.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+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: TAGS
+
+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; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+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
+
+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"; \
+ $(mkdir_p) "$(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)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+#>- mostlyclean-am
+#>+ 2
+clean-am: clean-closures clean-bcheck clean-final clean-generic clean-libLTLIBRARIES clean-libtool \
+ 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:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+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 uninstall-libLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool ctags 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-exec \
+ install-exec-am install-info install-info-am \
+ install-libLTLIBRARIES 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 \
+ uninstall-libLTLIBRARIES
+
+# 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:
+
+#>+ 8
+libakode_xiph_decoder.la.closure: $(libakode_xiph_decoder_la_OBJECTS) $(libakode_xiph_decoder_la_DEPENDENCIES)
+ @echo "int main() {return 0;}" > libakode_xiph_decoder_la_closure.cpp
+ @$(LTCXXCOMPILE) -c libakode_xiph_decoder_la_closure.cpp
+ $(CXXLINK) libakode_xiph_decoder_la_closure.lo $(libakode_xiph_decoder_la_LDFLAGS) $(libakode_xiph_decoder_la_OBJECTS) $(libakode_xiph_decoder_la_LIBADD) $(LIBS)
+ @rm -f libakode_xiph_decoder_la_closure.* libakode_xiph_decoder.la.closure
+ @echo "timestamp" > libakode_xiph_decoder.la.closure
+
+
+#>+ 2
+KDE_DIST=Makefile.in xiph_decoder.h vorbis_decoder.h flac_decoder.h Makefile.am speex_decoder.h
+
+#>+ 3
+clean-closures:
+ -rm -f libakode_xiph_decoder.la.closure
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu akode/plugins/xiph_decoder/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu akode/plugins/xiph_decoder/Makefile
+ cd $(top_srcdir) && perl admin/am_edit akode/plugins/xiph_decoder/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXXCOMPILE) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 11
+libakode_xiph_decoder_la.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/flac_decoder.cpp $(srcdir)/flac113_decoder.cpp $(srcdir)/speex_decoder.cpp $(srcdir)/vorbis_decoder.cpp $(srcdir)/xiph_decoder.cpp
+ @echo 'creating libakode_xiph_decoder_la.all_cpp.cpp ...'; \
+ rm -f libakode_xiph_decoder_la.all_cpp.files libakode_xiph_decoder_la.all_cpp.final; \
+ echo "#define KDE_USE_FINAL 1" >> libakode_xiph_decoder_la.all_cpp.final; \
+ for file in flac_decoder.cpp flac113_decoder.cpp speex_decoder.cpp vorbis_decoder.cpp xiph_decoder.cpp ; do \
+ echo "#include \"$$file\"" >> libakode_xiph_decoder_la.all_cpp.files; \
+ test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> libakode_xiph_decoder_la.all_cpp.final; \
+ done; \
+ cat libakode_xiph_decoder_la.all_cpp.final libakode_xiph_decoder_la.all_cpp.files > libakode_xiph_decoder_la.all_cpp.cpp; \
+ rm -f libakode_xiph_decoder_la.all_cpp.final libakode_xiph_decoder_la.all_cpp.files
+
+#>+ 3
+clean-final:
+ -rm -f libakode_xiph_decoder_la.all_cpp.cpp
+
+#>+ 3
+final:
+ $(MAKE) libakode_xiph_decoder_la_OBJECTS="$(libakode_xiph_decoder_la_final_OBJECTS)" all-am
+
+#>+ 3
+final-install:
+ $(MAKE) libakode_xiph_decoder_la_OBJECTS="$(libakode_xiph_decoder_la_final_OBJECTS)" install-am
+
+#>+ 3
+no-final:
+ $(MAKE) libakode_xiph_decoder_la_OBJECTS="$(libakode_xiph_decoder_la_nofinal_OBJECTS)" all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) libakode_xiph_decoder_la_OBJECTS="$(libakode_xiph_decoder_la_nofinal_OBJECTS)" install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/akode/plugins/xiph_decoder/flac113_decoder.cpp b/akode/plugins/xiph_decoder/flac113_decoder.cpp
new file mode 100644
index 0000000..46a46e2
--- /dev/null
+++ b/akode/plugins/xiph_decoder/flac113_decoder.cpp
@@ -0,0 +1,377 @@
+/* aKode: FLAC-Decoder (using libFLAC 1.1.3 API)
+
+ Copyright (C) 2004-2005 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "akodelib.h"
+
+#ifdef HAVE_LIBFLAC113
+
+#include <string.h>
+#include <iostream>
+
+#include <FLAC/format.h>
+#include <FLAC/stream_decoder.h>
+
+#include "audioframe.h"
+#include "decoder.h"
+#include "file.h"
+#include "flac_decoder.h"
+
+
+namespace aKode {
+
+class FLACDecoder;
+
+static bool checkFLAC(File *src) {
+ char header[6];
+ bool res = false;
+ src->seek(0);
+ if(src->read(header, 4) == 4) {
+ // skip id3v2 headers
+ if (memcmp(header, "ID3", 3) == 0) {
+ if (src->read(header, 6) != 6) goto end;
+ int size = 0;
+ if (header[1] & 0x10) size += 10;
+ size += header[5];
+ size += header[4] << 7;
+ size += header[3] << 14;
+ size += header[2] << 21;
+ src->seek(10+size);
+ if (src->read(header, 4) != 4) goto end;
+ }
+ if (memcmp(header, "fLaC",4) == 0 ) res = true;
+ }
+end:
+ return res;
+}
+
+static bool checkOggFLAC(File *src) {
+ char header[34];
+ bool res = false;
+ src->seek(0);
+ if (src->read(header, 34) == 34)
+ if (memcmp(header, "OggS",4) == 0 )
+ // old FLAC 1.1.0 format
+ if (memcmp(header+28, "fLaC",4) == 0) res = true;
+ else
+ // new FLAC 1.1.1 format
+ if (memcmp(header+29, "FLAC",4) == 0) res = true;
+ return res;
+}
+
+
+bool FLACDecoderPlugin::canDecode(File* src) {
+ src->openRO();
+ bool res = checkFLAC(src);
+ if (!res) res = checkOggFLAC(src);
+ src->close();
+ return res;
+}
+
+extern "C" { FLACDecoderPlugin flac_decoder; }
+extern "C" { FLACDecoderPlugin oggflac_decoder; }
+
+struct FLACDecoder::private_data {
+ private_data() : decoder(0), valid(false), out(0), source(0), eof(false), error(false) {};
+
+ FLAC__StreamDecoder *decoder;
+ const FLAC__StreamMetadata_StreamInfo* si;
+ const FLAC__StreamMetadata_VorbisComment* vc;
+
+ bool valid;
+ AudioFrame *out;
+ File *source;
+ AudioConfiguration config;
+
+ uint32_t max_block_size;
+ uint64_t position, length;
+
+ bool eof, error;
+};
+
+static FLAC__StreamDecoderReadStatus flac_read_callback(
+ const FLAC__StreamDecoder *,
+ FLAC__byte buffer[],
+ unsigned *bytes,
+ void *client_data)
+{
+ FLACDecoder::private_data *data = (FLACDecoder::private_data*)client_data;
+
+ long res = data->source->read((char*)buffer, *bytes);
+ if (res<=0) {
+ if (data->source->eof()) {
+ return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
+ }
+ else
+ return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
+ }
+ else {
+ *bytes = res;
+ return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
+ }
+}
+
+static FLAC__StreamDecoderSeekStatus flac_seek_callback(
+ const FLAC__StreamDecoder *,
+ FLAC__uint64 absolute_byte_offset,
+ void *client_data)
+{
+ FLACDecoder::private_data *data = (FLACDecoder::private_data*)client_data;
+
+ if(data->source->seek(absolute_byte_offset))
+ return FLAC__STREAM_DECODER_SEEK_STATUS_OK;
+ else
+ return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
+}
+
+static FLAC__StreamDecoderTellStatus flac_tell_callback(
+ const FLAC__StreamDecoder *,
+ FLAC__uint64 *absolute_byte_offset,
+ void *client_data)
+{
+ FLACDecoder::private_data *data = (FLACDecoder::private_data*)client_data;
+
+ long res = data->source->position();
+ if (res<0)
+ return FLAC__STREAM_DECODER_TELL_STATUS_ERROR;
+ else {
+ *absolute_byte_offset = res;
+ return FLAC__STREAM_DECODER_TELL_STATUS_OK;
+ }
+}
+
+static FLAC__StreamDecoderLengthStatus flac_length_callback(
+ const FLAC__StreamDecoder *,
+ FLAC__uint64 *stream_length,
+ void *client_data)
+{
+ FLACDecoder::private_data *data = (FLACDecoder::private_data*)client_data;
+
+ long res = data->source->length();
+ if (res<0)
+ return FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR;
+ else {
+ *stream_length = res;
+ return FLAC__STREAM_DECODER_LENGTH_STATUS_OK;
+ }
+}
+
+static FLAC__bool eof_callback(
+ const FLAC__StreamDecoder *,
+ void *client_data)
+{
+ FLACDecoder::private_data *data = (FLACDecoder::private_data*)client_data;
+
+ return data->source->eof();
+}
+
+static FLAC__StreamDecoderWriteStatus write_callback(
+ const FLAC__StreamDecoder *,
+ const FLAC__Frame *frame,
+ const FLAC__int32 * const buffer[],
+ void* client_data)
+{
+ FLACDecoder::private_data *data = (FLACDecoder::private_data*)client_data;
+
+ if (!data->out) // Handle spurious callbacks (happens during seeks)
+ data->out = new AudioFrame;
+
+ const long frameSize = frame->header.blocksize;
+ const char bits = frame->header.bits_per_sample;
+ const char channels = frame->header.channels;
+
+ AudioFrame* const outFrame = data->out;
+
+ outFrame->reserveSpace(channels, frameSize, bits);
+ outFrame->sample_rate = frame->header.sample_rate;
+
+ if (channels == 1 || channels == 2)
+ outFrame->channel_config = aKode::MonoStereo;
+ else if (channels > 2 && channels < 8)
+ outFrame->channel_config = aKode::Surround;
+ else
+ outFrame->channel_config = aKode::MultiChannel;
+
+ for(int i = 0; i<channels; i++) {
+ if (outFrame->data[i] == 0) break;
+ if (bits<=8) {
+ int8_t** data = (int8_t**)outFrame->data;
+ for(long j=0; j<frameSize; j++)
+ data[i][j] = buffer[i][j];
+ } else
+ if (bits<=16) {
+ int16_t** data = (int16_t**)outFrame->data;
+ for(long j=0; j<frameSize; j++)
+ data[i][j] = buffer[i][j];
+ } else {
+ int32_t** data = (int32_t**)outFrame->data;
+ for(long j=0; j<frameSize; j++)
+ data[i][j] = buffer[i][j];
+ }
+ }
+ data->position+=frameSize;
+ data->valid = true;
+ return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
+}
+
+static void metadata_callback(
+ const FLAC__StreamDecoder *,
+ const FLAC__StreamMetadata *metadata,
+ void* client_data)
+{
+ FLACDecoder::private_data *data = (FLACDecoder::private_data*)client_data;
+
+ if (metadata->type == FLAC__METADATA_TYPE_STREAMINFO) {
+ data->length = metadata->data.stream_info.total_samples;
+ data->config.sample_rate = metadata->data.stream_info.sample_rate;
+ data->config.sample_width = metadata->data.stream_info.bits_per_sample;
+ data->config.channels = metadata->data.stream_info.channels;
+ data->max_block_size = metadata->data.stream_info.max_blocksize;
+
+ if (data->config.channels <= 2)
+ data->config.channel_config = aKode::MonoStereo;
+ else if (data->config.channels <= 7)
+ data->config.channel_config = aKode::Surround;
+ else
+ data->config.channel_config = aKode::MultiChannel;
+
+ data->si = &metadata->data.stream_info;
+
+ data->position = 0;
+
+ } else
+ if (metadata->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) {
+ data->vc = &metadata->data.vorbis_comment;
+ }
+}
+
+static void error_callback(
+ const FLAC__StreamDecoder *,
+ FLAC__StreamDecoderErrorStatus status,
+ void* /* client_data */)
+{
+ std::cerr << "FLAC error: " << FLAC__StreamDecoderErrorStatusString[status] << "\n";
+ switch (status) {
+ case FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC:
+ break;
+ case FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER:
+ break;
+ case FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH:
+ break;
+ case FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM:
+ break;
+ }
+ //data->valid = false;
+}
+
+const AudioConfiguration* FLACDecoder::audioConfiguration() {
+ return &m_data->config;
+}
+
+FLACDecoder::FLACDecoder(File* src) {
+ m_data = new private_data;
+ m_data->out = 0;
+ m_data->decoder = FLAC__stream_decoder_new();
+ m_data->source = src;
+ m_data->source->openRO();
+ m_data->source->fadvise();
+ // ### check return value
+ FLAC__stream_decoder_init_stream(
+ m_data->decoder,
+ flac_read_callback,
+ flac_seek_callback,
+ flac_tell_callback,
+ flac_length_callback,
+ eof_callback,
+ write_callback,
+ metadata_callback,
+ error_callback,
+ m_data
+ );
+ FLAC__stream_decoder_process_until_end_of_metadata(m_data->decoder);
+}
+
+FLACDecoder::~FLACDecoder() {
+ FLAC__stream_decoder_finish(m_data->decoder);
+ FLAC__stream_decoder_delete(m_data->decoder);
+ m_data->source->close();
+ delete m_data;
+}
+
+bool FLACDecoder::readFrame(AudioFrame* frame) {
+ if (m_data->error || m_data->eof) return false;
+
+ if (m_data->out) { // Handle spurious callbacks
+ frame->freeSpace();
+ *frame = *m_data->out; // copy
+ m_data->out->data = 0; // nullify, don't free!
+ delete m_data->out;
+ m_data->out = 0;
+ return true;
+ }
+ m_data->valid = false;
+ m_data->out = frame;
+ bool ret = FLAC__stream_decoder_process_single(m_data->decoder);
+ m_data->out = 0;
+ if (ret && m_data->valid) {
+ frame->pos = position();
+ return true;
+ } else {
+ FLAC__StreamDecoderState state = FLAC__stream_decoder_get_state(m_data->decoder);
+ if (state == FLAC__STREAM_DECODER_END_OF_STREAM)
+ m_data->eof = true;
+ else
+ if (state > FLAC__STREAM_DECODER_END_OF_STREAM)
+ m_data->error = true;
+ return false;
+ }
+}
+
+long FLACDecoder::length() {
+ float pos = ((float)m_data->length)/m_data->config.sample_rate;
+ return (long)(pos*1000.0);
+}
+
+long FLACDecoder::position() {
+ float pos = ((float)m_data->position)/m_data->config.sample_rate;
+ return (long)(pos*1000.0);
+}
+
+bool FLACDecoder::eof() {
+ return m_data->eof;
+}
+
+bool FLACDecoder::error() {
+ return m_data->error;
+}
+
+bool FLACDecoder::seekable() {
+ return m_data->source->seekable();
+}
+
+bool FLACDecoder::seek(long pos) {
+ if (m_data->error) return false;
+ float samplePos = (float)pos * (float)m_data->config.sample_rate / 1000.0;
+ m_data->position = (uint64_t)samplePos;
+ return FLAC__stream_decoder_seek_absolute(m_data->decoder, m_data->position);
+}
+
+} // namespace
+
+#endif // HAVE_LIBFLAC113
diff --git a/akode/plugins/xiph_decoder/flac_decoder.cpp b/akode/plugins/xiph_decoder/flac_decoder.cpp
new file mode 100644
index 0000000..130e2a1
--- /dev/null
+++ b/akode/plugins/xiph_decoder/flac_decoder.cpp
@@ -0,0 +1,587 @@
+/* aKode: FLAC-Decoder
+
+ Copyright (C) 2004-2005 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "akodelib.h"
+
+#if defined(HAVE_LIBFLAC) && !defined(HAVE_LIBFLAC113)
+
+#include <string.h>
+#include <iostream>
+
+#include <FLAC/format.h>
+#include <FLAC/seekable_stream_decoder.h>
+
+#ifdef HAVE_LIBOGGFLAC
+ #include <OggFLAC/seekable_stream_decoder.h>
+#endif
+
+#include "audioframe.h"
+#include "decoder.h"
+#include "file.h"
+#include "flac_decoder.h"
+
+
+namespace aKode {
+
+class FLACDecoder;
+
+bool FLACDecoderPlugin::canDecode(File* src) {
+ char header[6];
+ bool res = false;
+ src->openRO();
+ if(src->read(header, 4) == 4) {
+ // skip id3v2 headers
+ if (memcmp(header, "ID3", 3) == 0) {
+ if (src->read(header, 6) != 6) goto end;
+ int size = 0;
+ if (header[1] & 0x10) size += 10;
+ size += header[5];
+ size += header[4] << 7;
+ size += header[3] << 14;
+ size += header[2] << 21;
+ src->seek(10+size);
+ if (src->read(header, 4) != 4) goto end;
+ }
+ if (memcmp(header, "fLaC",4) == 0 ) res = true;
+ }
+end:
+ src->close();
+ return res;
+}
+
+extern "C" { FLACDecoderPlugin flac_decoder; }
+
+#ifdef HAVE_LIBOGGFLAC
+bool OggFLACDecoderPlugin::canDecode(File* src) {
+ char header[34];
+ bool res = false;
+ src->openRO();
+ if (src->read(header, 34) == 34)
+ if (memcmp(header, "OggS",4) == 0 )
+ // old FLAC 1.1.0 format
+ if (memcmp(header+28, "fLaC",4) == 0) res = true;
+ else
+ // new FLAC 1.1.1 format
+ if (memcmp(header+29, "FLAC",4) == 0) res = true;
+ src->close();
+ return res;
+}
+extern "C" { OggFLACDecoderPlugin oggflac_decoder; }
+#endif
+
+struct FLACDecoder::private_data {
+ private_data() : decoder(0), valid(false), out(0), source(0), eof(false), error(false) {};
+
+ FLAC__SeekableStreamDecoder *decoder;
+ const FLAC__StreamMetadata_StreamInfo* si;
+ const FLAC__StreamMetadata_VorbisComment* vc;
+
+ bool valid;
+ AudioFrame *out;
+ File *source;
+ AudioConfiguration config;
+
+ uint32_t max_block_size;
+ uint64_t position, length;
+
+ bool eof, error;
+};
+
+#ifdef HAVE_LIBOGGFLAC
+struct OggFLACDecoder::private_data {
+ private_data() : decoder(0), valid(false), out(0), source(0), eof(false), error(false) {};
+
+ OggFLAC__SeekableStreamDecoder *decoder;
+ const FLAC__StreamMetadata_StreamInfo* si;
+ const FLAC__StreamMetadata_VorbisComment* vc;
+
+ bool valid;
+ AudioFrame *out;
+ File *source;
+ AudioConfiguration config;
+
+ uint32_t max_block_size;
+ uint64_t position, length;
+
+ bool eof, error;
+};
+#endif
+
+static FLAC__SeekableStreamDecoderReadStatus flac_read_callback(
+ const FLAC__SeekableStreamDecoder *,
+ FLAC__byte buffer[],
+ unsigned *bytes,
+ void *client_data)
+{
+ FLACDecoder::private_data *data = (FLACDecoder::private_data*)client_data;
+
+ long res = data->source->read((char*)buffer, *bytes);
+ if (res<=0) {
+ return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR;
+ }
+ else {
+ *bytes = res;
+ return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK;
+ }
+}
+
+#ifdef HAVE_LIBOGGFLAC
+// God, I hate people doing OO in C!
+static OggFLAC__SeekableStreamDecoderReadStatus oggflac_read_callback(
+ const OggFLAC__SeekableStreamDecoder *,
+ FLAC__byte buffer[],
+ unsigned *bytes,
+ void *client_data)
+{
+ OggFLACDecoder::private_data *data = (OggFLACDecoder::private_data*)client_data;
+
+ long res = data->source->read((char*)buffer, *bytes);
+ if (res<=0) {
+ return OggFLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR;
+ }
+ else {
+ *bytes = res;
+ return OggFLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK;
+ }
+}
+#endif
+
+static FLAC__SeekableStreamDecoderSeekStatus flac_seek_callback(
+ const FLAC__SeekableStreamDecoder *,
+ FLAC__uint64 absolute_byte_offset,
+ void *client_data)
+{
+ FLACDecoder::private_data *data = (FLACDecoder::private_data*)client_data;
+
+ if(data->source->seek(absolute_byte_offset))
+ return FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_OK;
+ else
+ return FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR;
+}
+
+#ifdef HAVE_LIBOGGFLAC
+static OggFLAC__SeekableStreamDecoderSeekStatus oggflac_seek_callback(
+ const OggFLAC__SeekableStreamDecoder *,
+ FLAC__uint64 absolute_byte_offset,
+ void *client_data)
+{
+ OggFLACDecoder::private_data *data = (OggFLACDecoder::private_data*)client_data;
+
+ if(data->source->seek(absolute_byte_offset))
+ return OggFLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_OK;
+ else
+ return OggFLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR;
+}
+#endif
+
+static FLAC__SeekableStreamDecoderTellStatus flac_tell_callback(
+ const FLAC__SeekableStreamDecoder *,
+ FLAC__uint64 *absolute_byte_offset,
+ void *client_data)
+{
+ FLACDecoder::private_data *data = (FLACDecoder::private_data*)client_data;
+
+ long res = data->source->position();
+ if (res<0)
+ return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR;
+ else {
+ *absolute_byte_offset = res;
+ return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK;
+ }
+}
+
+#ifdef HAVE_LIBOGGFLAC
+static OggFLAC__SeekableStreamDecoderTellStatus oggflac_tell_callback(
+ const OggFLAC__SeekableStreamDecoder *,
+ FLAC__uint64 *absolute_byte_offset,
+ void *client_data)
+{
+ OggFLACDecoder::private_data *data = (OggFLACDecoder::private_data*)client_data;
+
+ long res = data->source->position();
+ if (res<0)
+ return OggFLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR;
+ else {
+ *absolute_byte_offset = res;
+ return OggFLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK;
+ }
+}
+#endif
+
+static FLAC__SeekableStreamDecoderLengthStatus flac_length_callback(
+ const FLAC__SeekableStreamDecoder *,
+ FLAC__uint64 *stream_length,
+ void *client_data)
+{
+ FLACDecoder::private_data *data = (FLACDecoder::private_data*)client_data;
+
+ long res = data->source->length();
+ if (res<0)
+ return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR;
+ else {
+ *stream_length = res;
+ return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK;
+ }
+}
+
+#ifdef HAVE_LIBOGGFLAC
+static OggFLAC__SeekableStreamDecoderLengthStatus oggflac_length_callback(
+ const OggFLAC__SeekableStreamDecoder *,
+ FLAC__uint64 *stream_length,
+ void *client_data)
+{
+ OggFLACDecoder::private_data *data = (OggFLACDecoder::private_data*)client_data;
+
+ long res = data->source->length();
+ if (res<0)
+ return OggFLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR;
+ else {
+ *stream_length = res;
+ return OggFLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK;
+ }
+}
+#endif
+
+template<class S, class T>
+static FLAC__bool eof_callback(
+ const S *,
+ void *client_data)
+{
+ T *data = (T*)client_data;
+
+ return data->source->eof();
+}
+
+template<class S, class T>
+static FLAC__StreamDecoderWriteStatus write_callback(
+ const S *,
+ const FLAC__Frame *frame,
+ const FLAC__int32 * const buffer[],
+ void* client_data)
+{
+ T *data = (T*)client_data;
+ //FLACDecoder::private_data *data = (FLACDecoder::private_data*)client_data;
+
+ if (!data->out) // Handle spurious callbacks (happens during seeks)
+ data->out = new AudioFrame;
+
+ const long frameSize = frame->header.blocksize;
+ const char bits = frame->header.bits_per_sample;
+ const char channels = frame->header.channels;
+
+ AudioFrame* const outFrame = data->out;
+
+ outFrame->reserveSpace(channels, frameSize, bits);
+ outFrame->sample_rate = frame->header.sample_rate;
+
+ if (channels == 1 || channels == 2)
+ outFrame->channel_config = aKode::MonoStereo;
+ else if (channels > 2 && channels < 8)
+ outFrame->channel_config = aKode::Surround;
+ else
+ outFrame->channel_config = aKode::MultiChannel;
+
+ for(int i = 0; i<channels; i++) {
+ if (outFrame->data[i] == 0) break;
+ if (bits<=8) {
+ int8_t** data = (int8_t**)outFrame->data;
+ for(long j=0; j<frameSize; j++)
+ data[i][j] = buffer[i][j];
+ } else
+ if (bits<=16) {
+ int16_t** data = (int16_t**)outFrame->data;
+ for(long j=0; j<frameSize; j++)
+ data[i][j] = buffer[i][j];
+ } else {
+ int32_t** data = (int32_t**)outFrame->data;
+ for(long j=0; j<frameSize; j++)
+ data[i][j] = buffer[i][j];
+ }
+ }
+ data->position+=frameSize;
+ data->valid = true;
+ return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
+}
+
+template<class S, class T>
+static void metadata_callback(
+ const S *,
+ //const FLAC__SeekableStreamDecoder *decoder,
+ const FLAC__StreamMetadata *metadata,
+ void* client_data)
+{
+ T *data = (T*)client_data;
+// FLACDecoder::private_data *data = (FLACDecoder::private_data*)client_data;
+
+ if (metadata->type == FLAC__METADATA_TYPE_STREAMINFO) {
+ data->length = metadata->data.stream_info.total_samples;
+ data->config.sample_rate = metadata->data.stream_info.sample_rate;
+ data->config.sample_width = metadata->data.stream_info.bits_per_sample;
+ data->config.channels = metadata->data.stream_info.channels;
+ data->max_block_size = metadata->data.stream_info.max_blocksize;
+
+ if (data->config.channels <= 2)
+ data->config.channel_config = aKode::MonoStereo;
+ else if (data->config.channels <= 7)
+ data->config.channel_config = aKode::Surround;
+ else
+ data->config.channel_config = aKode::MultiChannel;
+
+ data->si = &metadata->data.stream_info;
+
+ data->position = 0;
+
+ } else
+ if (metadata->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) {
+ data->vc = &metadata->data.vorbis_comment;
+ }
+}
+
+template<class S, class T>
+static void error_callback(
+ const S *,
+ //const FLAC__SeekableStreamDecoder *decoder,
+ FLAC__StreamDecoderErrorStatus status,
+ void* /* client_data */)
+{
+ //T *data = (T*)client_data;
+ std::cerr << "FLAC error: " << FLAC__StreamDecoderErrorStatusString[status] << "\n";
+ switch (status) {
+ case FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC:
+ break;
+ case FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER:
+ break;
+ case FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH:
+ break;
+ }
+ //data->valid = false;
+}
+
+const AudioConfiguration* FLACDecoder::audioConfiguration() {
+ return &m_data->config;
+}
+
+#ifdef HAVE_LIBOGGFLAC
+const AudioConfiguration* OggFLACDecoder::audioConfiguration() {
+ return &m_data->config;
+}
+#endif
+
+FLACDecoder::FLACDecoder(File* src) {
+ m_data = new private_data;
+ m_data->out = 0;
+ m_data->decoder = FLAC__seekable_stream_decoder_new();
+ m_data->source = src;
+ m_data->source->openRO();
+ m_data->source->fadvise();
+ FLAC__seekable_stream_decoder_set_client_data(m_data->decoder, m_data);
+ FLAC__seekable_stream_decoder_set_read_callback (m_data->decoder, flac_read_callback);
+ FLAC__seekable_stream_decoder_set_seek_callback (m_data->decoder, flac_seek_callback);
+ FLAC__seekable_stream_decoder_set_tell_callback (m_data->decoder, flac_tell_callback);
+ FLAC__seekable_stream_decoder_set_length_callback (m_data->decoder, flac_length_callback);
+ FLAC__seekable_stream_decoder_set_eof_callback (m_data->decoder,
+ eof_callback<FLAC__SeekableStreamDecoder, private_data>);
+ FLAC__seekable_stream_decoder_set_write_callback (m_data->decoder,
+ write_callback<FLAC__SeekableStreamDecoder, private_data>);
+ FLAC__seekable_stream_decoder_set_error_callback (m_data->decoder,
+ error_callback<FLAC__SeekableStreamDecoder, private_data>);
+ FLAC__seekable_stream_decoder_set_metadata_callback(m_data->decoder,
+ metadata_callback<FLAC__SeekableStreamDecoder, private_data>);
+ FLAC__seekable_stream_decoder_set_metadata_respond (m_data->decoder, FLAC__METADATA_TYPE_VORBIS_COMMENT);
+
+ FLAC__seekable_stream_decoder_init(m_data->decoder);
+ FLAC__seekable_stream_decoder_process_until_end_of_metadata(m_data->decoder);
+}
+
+FLACDecoder::~FLACDecoder() {
+ FLAC__seekable_stream_decoder_finish(m_data->decoder);
+ FLAC__seekable_stream_decoder_delete(m_data->decoder);
+ m_data->source->close();
+ delete m_data;
+}
+
+#ifdef HAVE_LIBOGGFLAC
+OggFLACDecoder::OggFLACDecoder(File* src) {
+ m_data = new private_data;
+ m_data->out = 0;
+ m_data->decoder = OggFLAC__seekable_stream_decoder_new();
+ m_data->source = src;
+ m_data->source->openRO();
+ m_data->source->fadvise();
+ OggFLAC__seekable_stream_decoder_set_client_data(m_data->decoder, m_data);
+ OggFLAC__seekable_stream_decoder_set_read_callback (m_data->decoder, oggflac_read_callback);
+ OggFLAC__seekable_stream_decoder_set_seek_callback (m_data->decoder, oggflac_seek_callback);
+ OggFLAC__seekable_stream_decoder_set_tell_callback (m_data->decoder, oggflac_tell_callback);
+ OggFLAC__seekable_stream_decoder_set_length_callback (m_data->decoder, oggflac_length_callback);
+ OggFLAC__seekable_stream_decoder_set_eof_callback (m_data->decoder,
+ eof_callback<OggFLAC__SeekableStreamDecoder, private_data>);
+ OggFLAC__seekable_stream_decoder_set_write_callback (m_data->decoder,
+ write_callback<OggFLAC__SeekableStreamDecoder, private_data>);
+ OggFLAC__seekable_stream_decoder_set_error_callback (m_data->decoder,
+ error_callback<OggFLAC__SeekableStreamDecoder, private_data>);
+ OggFLAC__seekable_stream_decoder_set_metadata_callback(m_data->decoder,
+ metadata_callback<OggFLAC__SeekableStreamDecoder, private_data>);
+ OggFLAC__seekable_stream_decoder_set_metadata_respond (m_data->decoder, FLAC__METADATA_TYPE_VORBIS_COMMENT);
+
+ OggFLAC__seekable_stream_decoder_init(m_data->decoder);
+ OggFLAC__seekable_stream_decoder_process_until_end_of_metadata(m_data->decoder);
+}
+
+OggFLACDecoder::~OggFLACDecoder() {
+ OggFLAC__seekable_stream_decoder_finish(m_data->decoder);
+ OggFLAC__seekable_stream_decoder_delete(m_data->decoder);
+ m_data->source->close();
+ delete m_data;
+}
+#endif
+
+bool FLACDecoder::readFrame(AudioFrame* frame) {
+ if (m_data->error || m_data->eof) return false;
+
+ if (m_data->out) { // Handle spurious callbacks
+ frame->freeSpace();
+ *frame = *m_data->out; // copy
+ m_data->out->data = 0; // nullify, don't free!
+ delete m_data->out;
+ m_data->out = 0;
+ return true;
+ }
+ m_data->valid = false;
+ m_data->out = frame;
+ bool ret = FLAC__seekable_stream_decoder_process_single(m_data->decoder);
+ m_data->out = 0;
+ if (ret && m_data->valid) {
+ frame->pos = position();
+ return true;
+ } else {
+ FLAC__SeekableStreamDecoderState state = FLAC__seekable_stream_decoder_get_state(m_data->decoder);
+ switch (state) {
+ case FLAC__SEEKABLE_STREAM_DECODER_OK:
+ break;
+ case FLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM:
+ m_data->eof = true;
+ break;
+ default:
+ m_data->error = true;
+ break;
+ }
+ return false;
+ }
+}
+
+#ifdef HAVE_LIBOGGFLAC
+bool OggFLACDecoder::readFrame(AudioFrame* frame) {
+ if (m_data->error || m_data->eof) return false;
+
+ if (m_data->out) { // Handle spurious callbacks
+ frame->freeSpace();
+ *frame = *m_data->out; // copy
+ m_data->out->data = 0; // nullify, don't free!
+ delete m_data->out;
+ m_data->out = 0;
+ return true;
+ }
+ m_data->valid = false;
+ m_data->out = frame;
+ bool ret = OggFLAC__seekable_stream_decoder_process_single(m_data->decoder);
+ m_data->out = 0;
+ if (ret && m_data->valid) {
+ frame->pos = position();
+ return true;
+ } else {
+ OggFLAC__SeekableStreamDecoderState state = OggFLAC__seekable_stream_decoder_get_state(m_data->decoder);
+ switch (state) {
+ case OggFLAC__SEEKABLE_STREAM_DECODER_OK:
+ break;
+ case OggFLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM:
+ m_data->eof = true;
+ break;
+ default:
+ m_data->error = true;
+ break;
+ }
+ return false;
+ }
+}
+#endif
+
+long FLACDecoder::length() {
+ float pos = ((float)m_data->length)/m_data->config.sample_rate;
+ return (long)(pos*1000.0);
+}
+
+long FLACDecoder::position() {
+ float pos = ((float)m_data->position)/m_data->config.sample_rate;
+ return (long)(pos*1000.0);
+}
+
+bool FLACDecoder::eof() {
+ return m_data->eof;
+}
+
+bool FLACDecoder::error() {
+ return m_data->error;
+}
+
+bool FLACDecoder::seekable() {
+ return m_data->source->seekable();
+}
+
+bool FLACDecoder::seek(long pos) {
+ if (m_data->error) return false;
+ float samplePos = (float)pos * (float)m_data->config.sample_rate / 1000.0;
+ m_data->position = (uint64_t)samplePos;
+ return FLAC__seekable_stream_decoder_seek_absolute(m_data->decoder, m_data->position);
+}
+
+#ifdef HAVE_LIBOGGFLAC
+long OggFLACDecoder::length() {
+ float pos = ((float)m_data->length)/m_data->config.sample_rate;
+ return (long)(pos*1000.0);
+}
+
+long OggFLACDecoder::position() {
+ float pos = ((float)m_data->position)/m_data->config.sample_rate;
+ return (long)(pos*1000.0);
+}
+
+bool OggFLACDecoder::eof() {
+ return m_data->eof;
+}
+
+bool OggFLACDecoder::error() {
+ return m_data->error;
+}
+
+bool OggFLACDecoder::seekable() {
+ return m_data->source->seekable();
+}
+
+bool OggFLACDecoder::seek(long pos) {
+ if (m_data->error) return false;
+ float samplePos = (float)pos * (float)m_data->config.sample_rate / 1000.0;
+ m_data->position = (uint64_t)samplePos;
+ return OggFLAC__seekable_stream_decoder_seek_absolute(m_data->decoder, m_data->position);
+}
+#endif
+
+} // namespace
+
+#endif // HAVE_LIBFLAC
diff --git a/akode/plugins/xiph_decoder/flac_decoder.h b/akode/plugins/xiph_decoder/flac_decoder.h
new file mode 100644
index 0000000..68a4cd9
--- /dev/null
+++ b/akode/plugins/xiph_decoder/flac_decoder.h
@@ -0,0 +1,103 @@
+/* aKode: FLAC-Decoder
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _AKODE_FLAC_DECODER_H
+#define _AKODE_FLAC_DECODER_H
+
+#include "akodelib.h"
+#if defined(HAVE_LIBFLAC) || defined(HAVE_LIBFLAC113)
+
+#include "decoder.h"
+
+namespace aKode {
+
+class File;
+class AudioFrame;
+
+class FLACDecoder : public Decoder {
+public:
+ FLACDecoder(File* src);
+ virtual ~FLACDecoder();
+ virtual bool readFrame(AudioFrame*);
+ virtual long length();
+ virtual long position();
+ virtual bool seek(long);
+ virtual bool seekable();
+ virtual bool eof();
+ virtual bool error();
+
+ virtual const AudioConfiguration* audioConfiguration();
+
+ struct private_data;
+private:
+ private_data *m_data;
+};
+
+#ifdef HAVE_LIBOGGFLAC
+class OggFLACDecoder : public Decoder {
+public:
+ OggFLACDecoder(File* src);
+ virtual ~OggFLACDecoder();
+ virtual bool readFrame(AudioFrame*);
+ virtual long length();
+ virtual long position();
+ virtual bool seek(long);
+ virtual bool seekable();
+ virtual bool eof();
+ virtual bool error();
+
+ virtual const AudioConfiguration* audioConfiguration();
+
+ struct private_data;
+private:
+ private_data *m_data;
+};
+#endif
+
+class FLACDecoderPlugin : public DecoderPlugin {
+public:
+ virtual bool canDecode(File*);
+ virtual Decoder* openDecoder(File* fil) {
+ return new FLACDecoder(fil);
+ };
+};
+
+extern "C" FLACDecoderPlugin flac_decoder;
+#ifdef HAVE_LIBFLAC113
+extern "C" FLACDecoderPlugin oggflac_decoder;
+#endif
+
+#ifdef HAVE_LIBOGGFLAC
+class OggFLACDecoderPlugin : public DecoderPlugin {
+public:
+ virtual bool canDecode(File*);
+ virtual Decoder* openDecoder(File* fil) {
+ return new OggFLACDecoder(fil);
+ };
+};
+
+extern "C" OggFLACDecoderPlugin oggflac_decoder;
+#endif
+
+} // namespace
+
+
+#endif // HAVE_LIBFLAC
+#endif
diff --git a/akode/plugins/xiph_decoder/speex_decoder.cpp b/akode/plugins/xiph_decoder/speex_decoder.cpp
new file mode 100644
index 0000000..4c3d816
--- /dev/null
+++ b/akode/plugins/xiph_decoder/speex_decoder.cpp
@@ -0,0 +1,351 @@
+/* aKode: Speex-Decoder
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "akodelib.h"
+
+#ifdef HAVE_SPEEX
+
+extern "C" {
+#include <string.h>
+#include <stdlib.h>
+#include <speex.h>
+#include <speex_header.h>
+#include <speex_callbacks.h>
+#include <speex_stereo.h>
+#include <ogg/ogg.h>
+}
+
+#ifdef SPEEX_DEBUG
+#include <iostream>
+using std::cerr;
+#endif
+
+#include "file.h"
+#include "audioframe.h"
+#include "decoder.h"
+#include "speex_decoder.h"
+
+namespace aKode {
+
+bool SpeexDecoderPlugin::canDecode(File* src) {
+ char header[36];
+ bool res = false;
+ src->openRO();
+ if (src->read(header, 36) == 36)
+ if (memcmp(header, "OggS",4) == 0 )
+ if (memcmp(header+28, "Speex ",8) == 0) res = true;
+ src->close();
+ return res;
+};
+
+extern "C" { SpeexDecoderPlugin speex_decoder; };
+
+struct SpeexDecoder::private_data
+{
+ SpeexBits bits;
+ SpeexMode *mode;
+ SpeexStereoState stereo;
+
+ ogg_sync_state sync;
+ ogg_stream_state stream;
+ ogg_page page; // current page
+ ogg_packet packet; // current packet
+
+ void *dec_state;
+ File *src;
+#ifdef HAVE_SPEEX11
+ int16_t *out_buffer;
+#else
+ float *out_buffer;
+#endif
+
+ unsigned int bitrate;
+ int frame_size;
+ int frames_per_packet;
+ int frame_nr;
+ AudioConfiguration config;
+ int serialno;
+ long position;
+ bool seeked;
+
+ bool initialized;
+ bool error, eof;
+};
+
+SpeexDecoder::SpeexDecoder(File *src) {
+ m_data = new private_data;
+ m_data->src = src;
+ m_data->out_buffer = 0;
+
+ ogg_sync_init(&m_data->sync);
+
+ m_data->dec_state = 0;
+ SpeexStereoState initstereo = SPEEX_STEREO_STATE_INIT;
+ m_data->stereo = initstereo;
+
+ m_data->initialized = m_data->eof = m_data->error = false;
+ m_data->frame_nr = 100000;
+ m_data->position = 0;
+ m_data->seeked = false;
+
+ src->openRO();
+ src->fadvise();
+};
+
+SpeexDecoder::~SpeexDecoder() {
+ if (m_data->initialized) {
+ speex_bits_reset(&m_data->bits);
+ ogg_sync_clear(&m_data->sync);
+ ogg_stream_clear(&m_data->stream);
+ if (m_data->dec_state) speex_decoder_destroy(m_data->dec_state);
+ m_data->src->close();
+ delete[] m_data->out_buffer;
+ }
+ delete m_data;
+}
+
+bool SpeexDecoder::openFile() {
+ m_data->error = false;
+ while(ogg_sync_pageout(&m_data->sync, &m_data->page) != 1) {
+ char *buf = ogg_sync_buffer(&m_data->sync, 1024);
+ int read = m_data->src->read(buf, 1024);
+ if (read <= 0) {
+ m_data->error = true;
+ return false;
+ }
+ ogg_sync_wrote(&m_data->sync, read);
+ }
+ m_data->serialno = ogg_page_serialno(&m_data->page);
+ ogg_stream_init(&m_data->stream, m_data->serialno);
+ speex_bits_init(&m_data->bits);
+
+// ogg_stream_pagein(&m_data->stream, &m_data->page);
+ //ogg_stream_packetout(&m_data->stream, &m_data->packet);
+// ogg_stream_packetout(&m_data->stream, &m_data->packet);
+
+ if(!decodeHeader())
+ {
+ m_data->error = true;
+ return false;
+ }
+
+ m_data->initialized = true;
+ return true;
+}
+
+bool SpeexDecoder::readPage() {
+
+ while (ogg_sync_pageout(&m_data->sync, &m_data->page) != 1) {
+ char *buf = ogg_sync_buffer(&m_data->sync, 4096);
+ long read = m_data->src->read(buf, 4096);
+ if (read <= 0) return false;
+ ogg_sync_wrote(&m_data->sync, read);
+ }
+
+ ogg_stream_pagein(&m_data->stream, &m_data->page);
+// m_data->packets = ogg_page_packets(&m_data->page);
+ return true;
+}
+
+bool SpeexDecoder::readPacket() {
+ bool res = true;
+ while (ogg_stream_packetpeek(&m_data->stream, &m_data->packet) != 1 && res) {
+ res = readPage();
+ }
+ ogg_stream_packetout(&m_data->stream, &m_data->packet);
+ speex_bits_read_from(&m_data->bits, (char*)m_data->packet.packet, m_data->packet.bytes);
+ m_data->frame_nr = 0;
+
+ return res;
+}
+
+bool SpeexDecoder::decodeHeader() {
+
+ SpeexHeader *header;
+ header = speex_packet_to_header((char*)m_data->page.body, m_data->page.body_len);
+ if (!header) {
+ // invalid file
+ m_data->error = true;
+ #ifdef SPEEX_DEBUG
+ std::cerr << "Invalid file\n";
+ #endif
+ return false;
+ }
+
+ SpeexMode *mode = ( SpeexMode* )speex_mode_list[ header->mode ];
+ m_data->mode = mode;
+ m_data->config.channels = header->nb_channels;
+ m_data->config.channel_config = MonoStereo;
+ m_data->frames_per_packet = header->frames_per_packet;
+
+ if (mode->bitstream_version != header->mode_bitstream_version) {
+ // incompatible bitstream
+ m_data->error = true;
+ return false;
+ }
+
+ m_data->dec_state = speex_decoder_init(mode);
+ speex_decoder_ctl(m_data->dec_state, SPEEX_GET_FRAME_SIZE, &m_data->frame_size);
+ //m_data->bitrate = header->bitrate;
+ speex_decoder_ctl(m_data->dec_state, SPEEX_GET_BITRATE, &m_data->bitrate);
+ m_data->config.sample_rate = header->rate;
+ m_data->config.sample_width = 16;
+ speex_decoder_ctl(m_data->dec_state, SPEEX_SET_SAMPLING_RATE, &m_data->config.sample_rate);
+ //speex_decoder_ctl(m_data->dec_state, SPEEX_GET_SAMPLING_RATE, &m_data->sample_rate);
+
+ // Use the perceptial enhancement, which gives a subjectively better result
+ // but is technically further from the source.
+ int i = 1;
+ speex_decoder_ctl(m_data->dec_state, SPEEX_SET_ENH, &i);
+
+ // Handle the patched-on stereo stuff
+ if (m_data->config.channels != 1) {
+ SpeexCallback callback;
+ callback.callback_id = SPEEX_INBAND_STEREO;
+ callback.func = speex_std_stereo_request_handler;
+ callback.data = &m_data->stereo;
+ speex_decoder_ctl(m_data->dec_state, SPEEX_SET_HANDLER, &callback);
+ }
+ #ifdef HAVE_SPEEX11
+ m_data->out_buffer = new int16_t[m_data->frame_size*m_data->config.channels];
+ #else
+ m_data->out_buffer = new float[m_data->frame_size*m_data->config.channels];
+ #endif
+
+ free(header);
+ return true;
+}
+
+bool SpeexDecoder::readFrame(AudioFrame* frame)
+{
+ if (!m_data->initialized) openFile();
+
+ if (m_data->eof || m_data->error) return false;
+
+ if (m_data->frame_nr >= m_data->frames_per_packet) {
+ if (!readPacket()) {
+ m_data->eof = true;
+ return false;
+ }
+ }
+ #if defined(HAVE_SPEEX11) && !defined(BROKEN_SPEEX11)
+ speex_decode_int(m_data->dec_state, &m_data->bits, m_data->out_buffer);
+ #else
+ speex_decode(m_data->dec_state, &m_data->bits, m_data->out_buffer);
+ #endif
+
+ int channels = m_data->config.channels;
+ int length = m_data->frame_size;
+ frame->reserveSpace(&m_data->config, length);
+
+ if (m_data->config.channels == 2)
+ #if defined(HAVE_SPEEX11) && !defined(BROKEN_SPEEX11)
+ speex_decode_stereo_int(m_data->out_buffer, length, &m_data->stereo);
+ #else
+ speex_decode_stereo(m_data->out_buffer, length, &m_data->stereo);
+ #endif
+
+
+ for (int i=0; i<m_data->frame_size*m_data->config.channels; i++) {
+ if (m_data->out_buffer[i] > 32766) m_data->out_buffer[i] = 32767;
+ else
+ if (m_data->out_buffer[i] < -32767) m_data->out_buffer[i] = -32768;
+ else
+ m_data->out_buffer[i] = m_data->out_buffer[i];
+ };
+
+ // Decode into frame
+ int16_t** data = (int16_t**)frame->data;
+ for(int i=0; i<length; i++)
+ for(int j=0; j<channels; j++)
+ #if defined(HAVE_SPEEX11)
+ data[j][i] = m_data->out_buffer[i*channels+j];
+ #else
+ data[j][i] = (int16_t)(m_data->out_buffer[i*channels+j]+0.5);
+ #endif
+
+
+ m_data->position += m_data->frame_size;
+ frame->pos = position();
+ m_data->frame_nr++;
+ return true;
+}
+
+long SpeexDecoder::length() {
+ if (!m_data->bitrate || !m_data->initialized) return -1;
+ float spxlen = (8.0*m_data->src->length())/(float)m_data->bitrate;
+ return (long)(spxlen*1000.0);
+}
+
+long SpeexDecoder::position() {
+ if (!m_data->bitrate || !m_data->initialized) return -1;
+ float spxpos = ((float)m_data->position)/(float)m_data->config.sample_rate;
+
+ if (m_data->seeked) {
+ float tellpos = (8.0*m_data->src->position())/(float)m_data->bitrate;
+ // tellpos should always be somewhat ahead, if spxpos is worse use tellpos
+ if (tellpos < spxpos) {
+ spxpos = tellpos;
+ m_data->position = (long)(tellpos*m_data->config.sample_rate);
+ }
+ }
+
+ return (long)(spxpos*1000.0);
+}
+
+bool SpeexDecoder::eof() {
+ return m_data->eof || m_data->error;
+ /*return m_data->error || (m_data->src->eof() && m_data->frame_nr >= m_data->frames_per_packet); */
+}
+
+bool SpeexDecoder::error() {
+ return m_data->error;
+}
+
+bool SpeexDecoder::seekable() {
+ return m_data->src->seekable();
+}
+
+bool SpeexDecoder::seek(long pos) {
+ if(!m_data->initialized) return false;
+
+ long bpos = (long)(((float)pos*(float)m_data->bitrate)/8000.0);
+ if (m_data->src->seek(bpos)) {
+ speex_bits_reset(&m_data->bits);
+ ogg_sync_reset(&m_data->sync);
+ ogg_stream_reset(&m_data->stream);
+ readPage();
+ readPacket();
+ // We should now have read in a whole new page
+ bpos = (m_data->src->position()-m_data->page.body_len);
+ m_data->position = (long)((bpos*8.0*m_data->config.sample_rate)/(float)m_data->bitrate);
+ m_data->seeked = true;
+ return true;
+ }
+ return false;
+}
+
+const AudioConfiguration* SpeexDecoder::audioConfiguration() {
+ return &m_data->config;
+}
+
+} // namespace
+
+#endif // HAVE_SPEEX
diff --git a/akode/plugins/xiph_decoder/speex_decoder.h b/akode/plugins/xiph_decoder/speex_decoder.h
new file mode 100644
index 0000000..903f828
--- /dev/null
+++ b/akode/plugins/xiph_decoder/speex_decoder.h
@@ -0,0 +1,74 @@
+/* aKode: Speex-Format
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _AKODE_SPEEX_DECODER_H
+#define _AKODE_SPEEX_DECODER_H
+
+#include "akodelib.h"
+#ifdef HAVE_SPEEX
+
+#include "decoder.h"
+
+namespace aKode {
+
+class File;
+class AudioFrame;
+
+class SpeexDecoder : public Decoder {
+public:
+ SpeexDecoder(File* src);
+ virtual ~SpeexDecoder();
+ bool openFile();
+
+ virtual bool readFrame(AudioFrame*);
+ virtual long length();
+ virtual long position();
+ virtual bool seek(long);
+ virtual bool seekable();
+ virtual bool eof();
+ virtual bool error();
+
+ virtual const AudioConfiguration* audioConfiguration();
+
+ struct private_data;
+private:
+ bool readPage();
+ bool readPacket();
+ bool decodeHeader();
+
+ private_data *m_data;
+};
+
+
+class SpeexDecoderPlugin : public DecoderPlugin {
+public:
+ virtual bool canDecode(File*);
+ virtual Decoder* openDecoder(File* src) {
+ return new SpeexDecoder(src);
+ };
+};
+
+extern "C" SpeexDecoderPlugin speex_decoder;
+
+} // namespace
+
+
+#endif // HAVE_SPEEX
+#endif
diff --git a/akode/plugins/xiph_decoder/vorbis_decoder.cpp b/akode/plugins/xiph_decoder/vorbis_decoder.cpp
new file mode 100644
index 0000000..44329d0
--- /dev/null
+++ b/akode/plugins/xiph_decoder/vorbis_decoder.cpp
@@ -0,0 +1,277 @@
+/* aKode: Ogg Vorbis-Decoder
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "akodelib.h"
+#ifdef HAVE_OGG_VORBIS
+
+#include <vorbis/vorbisfile.h>
+
+#include "file.h"
+#include "audioframe.h"
+#include "decoder.h"
+#include "vorbis_decoder.h"
+
+//#include <iostream>
+
+namespace aKode {
+
+static size_t _read(void *ptr, size_t size, size_t nmemb, void *datasource) {
+ File *src = (File*)datasource;
+ return src->read((char*)ptr, size*nmemb);
+}
+
+static int _seek(void *datasource, ogg_int64_t offset, int whence) {
+ File *src = (File*)datasource;
+ if (src->seek(offset, whence))
+ return 0;
+ else
+ return -1;
+}
+
+static int _close(void *datasource) {
+ File *src = (File*)datasource;
+ src->close();
+ return 0;
+}
+
+static long _tell(void *datasource) {
+ File *src = (File*)datasource;
+ return src->position();
+}
+
+static ov_callbacks _callbacks = {_read, _seek, _close, _tell};
+
+bool VorbisDecoderPlugin::canDecode(File* src) {
+ OggVorbis_File vf;
+ src->openRO();
+ int r = ov_test_callbacks(src, &vf, 0, 0, _callbacks);
+ ov_clear(&vf);
+ src->close();
+ return r==0;
+}
+
+extern "C" { VorbisDecoderPlugin vorbis_decoder; }
+
+
+struct VorbisDecoder::private_data
+{
+ private_data() : bitstream(0), eof(false), error(false), initialized(false), retries(0), big_endian(0) {};
+ OggVorbis_File *vf;
+ vorbis_comment *vc;
+ vorbis_info *vi;
+
+ File *src;
+ AudioConfiguration config;
+
+ int bitstream;
+ bool eof, error;
+ char buffer[8192];
+ bool initialized;
+ int retries;
+
+ int big_endian;
+};
+
+VorbisDecoder::VorbisDecoder(File *src) {
+ m_data = new private_data;
+ m_data->vf = new OggVorbis_File;
+
+ m_data->src = src;
+ m_data->src->openRO();
+ m_data->src->fadvise();
+
+ unsigned short endian_test = 1;
+ m_data->big_endian = 1 - (*((char *)(&endian_test)));
+}
+
+VorbisDecoder::~VorbisDecoder() {
+ if (m_data->initialized)
+ ov_clear(m_data->vf);
+ delete m_data->vf;
+ delete m_data;
+}
+
+static void setAudioConfiguration(AudioConfiguration *config, vorbis_info *vi)
+{
+ config->channels = vi->channels;
+ config->sample_rate = vi->rate;
+ config->sample_width = 16;
+
+ if (config->channels <= 2) {
+ config->channel_config = MonoStereo;
+ config->surround_config = 0;
+ } else
+ if (config->channels <= 6) {
+ config->channel_config = Surround;
+ SurroundConfiguration surround_config;
+ switch (config->channels) {
+ case 3:
+ surround_config.front_channels = 3;
+ break;
+ case 4:
+ surround_config.front_channels = 2;
+ surround_config.rear_channels = 2;
+ break;
+ case 5:
+ surround_config.front_channels = 3;
+ surround_config.rear_channels = 2;
+ break;
+ case 6:
+ surround_config.front_channels = 3;
+ surround_config.rear_channels = 2;
+ surround_config.LFE_channel = 1;
+ break;
+ }
+ config->surround_config = surround_config;
+ }
+ else {
+ config->channel_config = MultiChannel;
+ config->surround_config = 0;
+ }
+}
+
+bool VorbisDecoder::openFile() {
+ int status;
+
+ status = ov_open_callbacks(m_data->src, m_data->vf, 0, 0, _callbacks);
+ if (status != 0) goto fault;
+
+ m_data->vi = ov_info(m_data->vf, -1);
+ //m_data->vc = ov_comment(m_data->vf, -1);
+ setAudioConfiguration(&m_data->config, m_data->vi);
+
+ m_data->initialized = true;
+ m_data->error = false;
+ m_data->retries = 0;
+ return true;
+fault:
+ m_data->initialized = false;
+ m_data->error = true;
+ return false;
+}
+
+// translation from vorbis channel-layout to akodelib channel-layout
+static int vorbis_channel[7][6] = {
+ {-1, -1, -1, -1, -1, -1},
+ {0, -1, -1, -1, -1, -1},
+ {0, 1, -1, -1, -1, -1},
+ {0, 2, 1, -1, -1, -1},
+ {0, 1, 2, 3, -1, -1},
+ {0, 2, 1, 3, 4, -1},
+ {0, 2, 1, 3, 4, 5}
+};
+
+bool VorbisDecoder::readFrame(AudioFrame* frame)
+{
+ if (!m_data->initialized) {
+ if (!openFile()) return false;
+ }
+
+ int old_bitstream = m_data->bitstream;
+ long v = ov_read(m_data->vf, (char*)m_data->buffer, 8192, m_data->big_endian, 2, 1, &m_data->bitstream);
+
+ if (v == 0 || v == OV_EOF ) {
+ // vorbisfile sometimes return 0 even though EOF is not yet reached
+ if (m_data->src->eof() || m_data->src->error() || ++m_data->retries >= 16)
+ m_data->eof = true;
+// std::cerr << "akode-vorbis: EOF\n";
+ }
+ else
+ if (v == OV_HOLE) {
+ if (++m_data->retries >= 16) m_data->error = true;
+// std::cerr << "akode-vorbis: Hole\n";
+ }
+ else
+ if (v < 0) {
+ m_data->error = true;
+// std::cerr << "akode-vorbis: Error\n";
+ }
+
+ if (v <= 0) return false;
+ m_data->retries = 0;
+
+ if (old_bitstream != m_data->bitstream) { // changing streams, update info
+ m_data->vi = ov_info(m_data->vf, -1);
+ //m_data->vc = ov_comment(m_data->vf, -1);
+ setAudioConfiguration(&m_data->config, m_data->vi);
+ }
+
+ int channels = m_data->config.channels;
+ long length = v/(channels*2);
+ frame->reserveSpace(&m_data->config, length);
+
+ // Demux into frame
+ int16_t* buffer = (int16_t*)m_data->buffer;
+ int16_t** data = (int16_t**)frame->data;
+ if (channels <= 6) {
+ int *trans = vorbis_channel[channels];
+ for(int i=0; i<length; i++)
+ for(int j=0; j<channels; j++)
+ data [trans[j]] [i] = buffer[i*channels+j];
+ }
+ else
+ for(int i=0; i<length; i++)
+ for(int j=0; j<channels; j++)
+ data[j][i] = buffer[i*channels+j];
+
+ frame->pos = position();
+ return true;
+}
+
+long VorbisDecoder::length() {
+ if (!m_data->initialized) return -1;
+ // -1 return total length of all bitstreams.
+ // Should we take them one at a time instead?
+ double ogglen = ov_time_total(m_data->vf,-1);
+ return (long)(ogglen*1000.0);
+}
+
+long VorbisDecoder::position() {
+ if (!m_data->initialized) return -1;
+ double oggpos = ov_time_tell(m_data->vf);
+ return (long)(oggpos*1000.0);
+}
+
+bool VorbisDecoder::eof() {
+ return m_data->eof;
+}
+
+bool VorbisDecoder::error() {
+ return m_data->error;
+}
+
+bool VorbisDecoder::seekable() {
+ return m_data->src->seekable();
+}
+
+bool VorbisDecoder::seek(long pos) {
+ if (!m_data->initialized) return false;
+ int r = ov_time_seek(m_data->vf, pos/1000.0);
+ return r == 0;
+}
+
+const AudioConfiguration* VorbisDecoder::audioConfiguration() {
+ if (!m_data->initialized) return 0;
+ return &m_data->config;
+}
+
+} // namespace
+
+#endif //OGG_VORBIS
diff --git a/akode/plugins/xiph_decoder/vorbis_decoder.h b/akode/plugins/xiph_decoder/vorbis_decoder.h
new file mode 100644
index 0000000..5dd6790
--- /dev/null
+++ b/akode/plugins/xiph_decoder/vorbis_decoder.h
@@ -0,0 +1,70 @@
+/* aKode: Ogg Vorbis-Format
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _AKODE_VORBISFORMAT_H
+#define _AKODE_VORBISFORMAT_H
+
+#include "akodelib.h"
+#ifdef HAVE_OGG_VORBIS
+
+#include "decoder.h"
+
+namespace aKode {
+
+class File;
+class AudioFrame;
+
+class VorbisDecoder : public Decoder {
+public:
+ VorbisDecoder(File* src);
+ virtual ~VorbisDecoder();
+
+ virtual bool openFile();
+
+ virtual bool readFrame(AudioFrame*);
+ virtual long length();
+ virtual long position();
+ virtual bool seek(long);
+ virtual bool seekable();
+ virtual bool eof();
+ virtual bool error();
+
+ virtual const AudioConfiguration* audioConfiguration();
+
+ struct private_data;
+private:
+ private_data *m_data;
+};
+
+
+class VorbisDecoderPlugin : public DecoderPlugin {
+public:
+ virtual bool canDecode(File*);
+ virtual VorbisDecoder* openDecoder(File* src) {
+ return new VorbisDecoder(src);
+ };
+};
+
+extern "C" VorbisDecoderPlugin vorbis_decoder;
+
+} // namespace
+
+#endif // HAVE_VORBIS
+#endif
diff --git a/akode/plugins/xiph_decoder/xiph_decoder.cpp b/akode/plugins/xiph_decoder/xiph_decoder.cpp
new file mode 100644
index 0000000..841656d
--- /dev/null
+++ b/akode/plugins/xiph_decoder/xiph_decoder.cpp
@@ -0,0 +1,84 @@
+/* aKode: Xiph-Format
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the src COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "akodelib.h"
+
+#include "file.h"
+#include "audioframe.h"
+#include "decoder.h"
+
+#include "xiph_decoder.h"
+#include "flac_decoder.h"
+#include "vorbis_decoder.h"
+#include "speex_decoder.h"
+
+namespace aKode {
+
+bool XiphDecoderPlugin::canDecode(File* src) {
+#if defined(HAVE_LIBFLAC) || defined(HAVE_LIBFLAC113)
+ if (flac_decoder.canDecode(src))
+ return true;
+ else
+#endif
+#ifdef HAVE_LIBOGGFLAC
+ if (oggflac_decoder.canDecode(src))
+ return true;
+ else
+#endif
+#ifdef HAVE_OGG_VORBIS
+ if (vorbis_decoder.canDecode(src))
+ return true;
+ else
+#endif
+#ifdef HAVE_SPEEX
+ if (speex_decoder.canDecode(src))
+ return true;
+ else
+#endif
+ return false;
+}
+
+Decoder* XiphDecoderPlugin::openDecoder(File* src) {
+#if defined(HAVE_LIBFLAC) || defined(HAVE_LIBFLAC113)
+ if (flac_decoder.canDecode(src))
+ return flac_decoder.openDecoder(src);
+ else
+#endif
+#ifdef HAVE_LIBOGGFLAC
+ if (oggflac_decoder.canDecode(src))
+ return oggflac_decoder.openDecoder(src);
+ else
+#endif
+#ifdef HAVE_OGG_VORBIS
+ if (vorbis_decoder.canDecode(src))
+ return vorbis_decoder.openDecoder(src);
+ else
+#endif
+#ifdef HAVE_SPEEX
+ if (speex_decoder.canDecode(src))
+ return speex_decoder.openDecoder(src);
+ else
+#endif
+ return 0;
+}
+
+extern "C" { XiphDecoderPlugin xiph_decoder; }
+
+} // namespace
diff --git a/akode/plugins/xiph_decoder/xiph_decoder.h b/akode/plugins/xiph_decoder/xiph_decoder.h
new file mode 100644
index 0000000..bef9fc8
--- /dev/null
+++ b/akode/plugins/xiph_decoder/xiph_decoder.h
@@ -0,0 +1,42 @@
+/* aKode: Xiph-Format (parent for various Xiph formats)
+
+ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _AKODE_XIPH_DECODER_H
+#define _AKODE_XIPH_DECODER_H
+
+#include "akodelib.h"
+
+#include "decoder.h"
+
+namespace aKode {
+
+class File;
+
+class XiphDecoderPlugin : public DecoderPlugin {
+public:
+ virtual bool canDecode(File*);
+ virtual Decoder* openDecoder(File* src);
+};
+
+extern "C" XiphDecoderPlugin xiph_decoder;
+
+} // namespace
+
+#endif