From dd7595a3475407a7fa96a97393bae8c5220e8762 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 4 Jan 2012 18:41:13 +1000 Subject: Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje. Note that embryo wont be used, but I'm not sure yet if you can build edje without it. --- .../edje/src/modules/eet_snd_reader/Makefile.am | 17 + .../edje/src/modules/eet_snd_reader/Makefile.in | 634 +++++++++++++++++++++ .../src/modules/eet_snd_reader/eet_snd_reader.c | 498 ++++++++++++++++ 3 files changed, 1149 insertions(+) create mode 100644 libraries/edje/src/modules/eet_snd_reader/Makefile.am create mode 100644 libraries/edje/src/modules/eet_snd_reader/Makefile.in create mode 100644 libraries/edje/src/modules/eet_snd_reader/eet_snd_reader.c (limited to 'libraries/edje/src/modules/eet_snd_reader') diff --git a/libraries/edje/src/modules/eet_snd_reader/Makefile.am b/libraries/edje/src/modules/eet_snd_reader/Makefile.am new file mode 100644 index 0000000..c154dc2 --- /dev/null +++ b/libraries/edje/src/modules/eet_snd_reader/Makefile.am @@ -0,0 +1,17 @@ +MAINTAINERCLEANFILES = Makefile.in + +pkglibdir = $(REMIX_PLUGIN_DIR) + +AM_CPPFLAGS = \ +-I. \ +-DPACKAGE_LIB_DIR=\"$(libdir)/remix\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/remix\" \ +@EDJE_CFLAGS@ \ +@REMIX_CFLAGS@ + +pkgdir = $(REMIX_PLUGIN_DIR) +pkg_LTLIBRARIES = libeet_sndfile_reader.la + +libeet_sndfile_reader_la_SOURCES = eet_snd_reader.c +libeet_sndfile_reader_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version @EDJE_LIBS@ @REMIX_LIBS@ +libeet_sndfile_reader_la_LIBTOOLFLAGS = --tag=disable-static diff --git a/libraries/edje/src/modules/eet_snd_reader/Makefile.in b/libraries/edje/src/modules/eet_snd_reader/Makefile.in new file mode 100644 index 0000000..f4d99bb --- /dev/null +++ b/libraries/edje/src/modules/eet_snd_reader/Makefile.in @@ -0,0 +1,634 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/eet_snd_reader +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ + $(top_srcdir)/m4/efl_binary.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_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 = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(pkg_LTLIBRARIES) +libeet_sndfile_reader_la_LIBADD = +am_libeet_sndfile_reader_la_OBJECTS = \ + libeet_sndfile_reader_la-eet_snd_reader.lo +libeet_sndfile_reader_la_OBJECTS = \ + $(am_libeet_sndfile_reader_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +libeet_sndfile_reader_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(libeet_sndfile_reader_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libeet_sndfile_reader_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libeet_sndfile_reader_la_SOURCES) +DIST_SOURCES = $(libeet_sndfile_reader_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +pkglibdir = $(REMIX_PLUGIN_DIR) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_IMF_CFLAGS = @ECORE_IMF_CFLAGS@ +ECORE_IMF_LIBS = @ECORE_IMF_LIBS@ +EDJE_CC_CFLAGS = @EDJE_CC_CFLAGS@ +EDJE_CC_LIBS = @EDJE_CC_LIBS@ +EDJE_CC_PRG = @EDJE_CC_PRG@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_DECC_CFLAGS = @EDJE_DECC_CFLAGS@ +EDJE_DECC_LIBS = @EDJE_DECC_LIBS@ +EDJE_DECC_PRG = @EDJE_DECC_PRG@ +EDJE_EXTERNAL_INSPECTOR_CFLAGS = @EDJE_EXTERNAL_INSPECTOR_CFLAGS@ +EDJE_EXTERNAL_INSPECTOR_LIBS = @EDJE_EXTERNAL_INSPECTOR_LIBS@ +EDJE_EXTERNAL_INSPECTOR_PRG = @EDJE_EXTERNAL_INSPECTOR_PRG@ +EDJE_INSPECTOR_CFLAGS = @EDJE_INSPECTOR_CFLAGS@ +EDJE_INSPECTOR_LIBS = @EDJE_INSPECTOR_LIBS@ +EDJE_INSPECTOR_PRG = @EDJE_INSPECTOR_PRG@ +EDJE_LIBS = @EDJE_LIBS@ +EDJE_PLAYER_CFLAGS = @EDJE_PLAYER_CFLAGS@ +EDJE_PLAYER_LIBS = @EDJE_PLAYER_LIBS@ +EDJE_PLAYER_PRG = @EDJE_PLAYER_PRG@ +EDJE_RECC_PRG = @EDJE_RECC_PRG@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_EDJE_BUILD = @EFL_EDJE_BUILD@ +EGREP = @EGREP@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LUA_CFLAGS = @LUA_CFLAGS@ +LUA_LIBS = @LUA_LIBS@ +MAKEINFO = @MAKEINFO@ +MINIMAL_CFLAGS = @MINIMAL_CFLAGS@ +MINIMAL_LIBS = @MINIMAL_LIBS@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +REMIX_CFLAGS = @REMIX_CFLAGS@ +REMIX_LIBS = @REMIX_LIBS@ +REMIX_PLUGIN_DIR = @REMIX_PLUGIN_DIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ +SNDFILE_LIBS = @SNDFILE_LIBS@ +STRIP = @STRIP@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +VORBISENC_CFLAGS = @VORBISENC_CFLAGS@ +VORBISENC_LIBS = @VORBISENC_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +exec_prefix = @exec_prefix@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +lua_libs = @lua_libs@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +release_info = @release_info@ +requirement_edje = @requirement_edje@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +vimdir = @vimdir@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-DPACKAGE_LIB_DIR=\"$(libdir)/remix\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/remix\" \ +@EDJE_CFLAGS@ \ +@REMIX_CFLAGS@ + +pkgdir = $(REMIX_PLUGIN_DIR) +pkg_LTLIBRARIES = libeet_sndfile_reader.la +libeet_sndfile_reader_la_SOURCES = eet_snd_reader.c +libeet_sndfile_reader_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version @EDJE_LIBS@ @REMIX_LIBS@ +libeet_sndfile_reader_la_LIBTOOLFLAGS = --tag=disable-static +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .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 ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/eet_snd_reader/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/eet_snd_reader/Makefile +.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 +$(am__aclocal_m4_deps): +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_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 +libeet_sndfile_reader.la: $(libeet_sndfile_reader_la_OBJECTS) $(libeet_sndfile_reader_la_DEPENDENCIES) + $(AM_V_CCLD)$(libeet_sndfile_reader_la_LINK) -rpath $(pkgdir) $(libeet_sndfile_reader_la_OBJECTS) $(libeet_sndfile_reader_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeet_sndfile_reader_la-eet_snd_reader.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libeet_sndfile_reader_la-eet_snd_reader.lo: eet_snd_reader.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libeet_sndfile_reader_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libeet_sndfile_reader_la-eet_snd_reader.lo -MD -MP -MF $(DEPDIR)/libeet_sndfile_reader_la-eet_snd_reader.Tpo -c -o libeet_sndfile_reader_la-eet_snd_reader.lo `test -f 'eet_snd_reader.c' || echo '$(srcdir)/'`eet_snd_reader.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeet_sndfile_reader_la-eet_snd_reader.Tpo $(DEPDIR)/libeet_sndfile_reader_la-eet_snd_reader.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eet_snd_reader.c' object='libeet_sndfile_reader_la-eet_snd_reader.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(libeet_sndfile_reader_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libeet_sndfile_reader_la-eet_snd_reader.lo `test -f 'eet_snd_reader.c' || echo '$(srcdir)/'`eet_snd_reader.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; 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) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pkgLTLIBRARIES 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-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/edje/src/modules/eet_snd_reader/eet_snd_reader.c b/libraries/edje/src/modules/eet_snd_reader/eet_snd_reader.c new file mode 100644 index 0000000..4e2dec9 --- /dev/null +++ b/libraries/edje/src/modules/eet_snd_reader/eet_snd_reader.c @@ -0,0 +1,498 @@ +/* + * RemixSnd_eetfile: a libsnd EET Virtual file handler + * + * Govindaraju SM , August 2011 + * Prince Kumar Dubey , August 2011 + */ + +#include "config.h" +#include +#include +#include +#include + +#define PATH_KEY 1 +#define SOUND_ID_KEY 2 +#define SPEED_KEY 3 +#define BLOCK_FRAMES 8192 + +static RemixBase *remix_eet_sndfile_optimise(RemixEnv *env, RemixBase *sndfile); + +typedef struct _VIO_DATA VIO_DATA; +typedef struct _SndInstanceData SndInstanceData; + +struct _VIO_DATA +{ + sf_count_t offset, length; + const char *data; +}; + +struct _SndInstanceData +{ + /* plugin parameters */ + char *path; + char *sound_id; + double speed; + + /* Edj & Sndfile Reader */ + Eet_File *efp; + SNDFILE *pcm_fp; + SF_INFO *snd_info; + VIO_DATA *vio_data; + + /* PCM buffers */ + RemixPCM *readbuf; + RemixPCM *inbuf; + RemixPCM *outbuf; + + /* Resample stuffs */ + RemixPCM prevreadbuf[2]; + int enable_resample; + double rs_ratio; + RemixCount resample_len; + RemixCount in_avail; + RemixCount out_generated; + RemixCount required_resamples; +}; + +static sf_count_t +eet_snd_file_get_length(void *user_data) +{ + VIO_DATA *vf = user_data; + return vf->length; +} + +static sf_count_t +eet_snd_file_seek(sf_count_t offset, int whence, void *user_data) +{ + VIO_DATA *vf = user_data; + + switch (whence) + { + case SEEK_SET: + vf->offset = offset; + break; + case SEEK_CUR: + vf->offset += offset; + break; + case SEEK_END: + vf->offset = vf->length + offset; + break; + default: + break; + } + return vf->offset; +} + +static sf_count_t +eet_snd_file_read(void *ptr, sf_count_t count, void *user_data) +{ + VIO_DATA *vf = user_data; + + if ((vf->offset + count) > vf->length) + count = vf->length - vf->offset; + memcpy(ptr, vf->data + vf->offset, count); + vf->offset += count; + return count; +} + +static sf_count_t +eet_snd_file_tell(void *user_data) +{ + VIO_DATA *vf = user_data; + return vf->offset; +} + +static int +remix_init_resampler_data(RemixEnv *env, RemixBase *base) +{ + SndInstanceData *si = remix_base_get_instance_data(env, base); + + si->rs_ratio = remix_get_samplerate(env) / si->snd_info->samplerate; + si->rs_ratio /= si->speed; + si->resample_len = (si->snd_info->frames * si->rs_ratio); + + si->outbuf = malloc(sizeof(RemixPCM) * BLOCK_FRAMES * 2); + if (!si->outbuf) return 0; + if ((si->rs_ratio == 1.0)/* && (si->snd_info->channels == 2)*/) + { + si->enable_resample = 0; + return 1; + } + else + si->enable_resample = 1; + + si->in_avail = 0; + si->out_generated = 0; + si->inbuf = malloc(sizeof(RemixPCM) * BLOCK_FRAMES * + si->snd_info->channels); + if (!si->inbuf) return 0; + return 1; +} + +static RemixBase * +remix_eet_sndfile_create(RemixEnv *env, RemixBase *sndfile, const char *path, const char *sound_id, const double speed) +{ + SF_VIRTUAL_IO *eet_vio = NULL; + SndInstanceData *si; + const void *sound_data; + int sound_size; + + if ((!path) || (!sound_id)) return NULL; + + si = calloc(1, sizeof(SndInstanceData)); + if (!si) goto err; + remix_base_set_instance_data(env, sndfile, si); + + si->path = strdup(path); + si->sound_id = strdup(sound_id); + si->speed = speed; + + si->efp = eet_open(path, EET_FILE_MODE_READ); + if (!si->efp) goto err; + + // xxx: eet_read_direct does not work on Threads, using eet_read. + sound_data = eet_read(si->efp, sound_id, &(sound_size)); + eet_close(si->efp); + si->efp = NULL; + if (sound_data == NULL) goto err; + + eet_vio = calloc(1, sizeof(SF_VIRTUAL_IO)); + if (!eet_vio) goto err; + + /* Set up func pointers to read snd file directly from EET. */ + eet_vio->get_filelen = eet_snd_file_get_length; + eet_vio->seek = eet_snd_file_seek; + eet_vio->read = eet_snd_file_read; + eet_vio->tell = eet_snd_file_tell; + + si->vio_data = calloc(1, sizeof(VIO_DATA)); + if (!si->vio_data) goto err; + si->vio_data->offset = 0; + si->vio_data->length = sound_size; + si->vio_data->data = sound_data; + + si->snd_info = calloc(1, sizeof(SF_INFO)); + if (!si->snd_info) goto err; + + si->pcm_fp = sf_open_virtual(eet_vio, SFM_READ, si->snd_info, si->vio_data); + if (!si->pcm_fp) goto err; + free(eet_vio); + eet_vio = NULL; + + if (!remix_init_resampler_data(env, sndfile)) goto err; + si->out_generated = 0; + + return sndfile; + +err: + if (eet_vio) free(eet_vio); + remix_set_error(env, REMIX_ERROR_SYSTEM); + remix_destroy(env, (RemixBase *)sndfile); + return RemixNone; +} + +static RemixBase * +remix_eet_sndfile_reader_init(RemixEnv *env, RemixBase *base, CDSet *parameters) +{ + char *file_path, *sound_id; + double speed; + + file_path = (cd_set_find(env, parameters, PATH_KEY)).s_string; + sound_id = (cd_set_find(env, parameters, SOUND_ID_KEY)).s_string; + speed = (cd_set_find(env, parameters, SPEED_KEY)).s_double; + + if (!remix_eet_sndfile_create(env, base, file_path, sound_id, speed)) + return RemixNone; + remix_eet_sndfile_optimise (env, base); + return base; +} + +static RemixBase * +remix_eet_sndfile_clone(RemixEnv *env, RemixBase *base) +{ + SndInstanceData *si = remix_base_get_instance_data(env, base); + RemixBase *new_sndfile = remix_base_new(env); + + remix_eet_sndfile_create(env, new_sndfile, si->path, si->sound_id, si->speed); + remix_eet_sndfile_optimise(env, new_sndfile); + return new_sndfile; +} + +static int +remix_eet_sndfile_destroy(RemixEnv *env, RemixBase *base) +{ + SndInstanceData *si = remix_base_get_instance_data(env, base); + if (si) + { + sf_close (si->pcm_fp); + eet_close(si->efp); + if (si->path) free(si->path); + if (si->sound_id) free(si->sound_id); + if (si->snd_info) free(si->snd_info); + if (si->efp) eet_close(si->efp); + if (si->inbuf) free(si->inbuf); + if (si->outbuf) free(si->outbuf); + if (si->vio_data) free(si->vio_data); + free(si); + } + if (base) free (base); + return 0; +} + +static int +remix_pcm_resample(SndInstanceData *si) +{ + RemixPCM *src, *dst, *srcbase; + int i = 0, in_samples, pos, total, chnum, reqsamp, avail; + int interp = 1; + + dst = si->outbuf + (si->out_generated * 2); + in_samples = (double)si->required_resamples / si->rs_ratio; + chnum = si->snd_info->channels; + reqsamp = si->required_resamples; + avail = si->in_avail; + srcbase = si->readbuf; + if ((interp) && (si->rs_ratio >= 1.0)) + { + // linear interpolation of resampling for lower quality samples + // so they don't get high requency aliasing effects + for (i = 0; i < reqsamp; i++) + { + float fpos, fpos1; + RemixPCM psam[2]; + + fpos = (float)(i * in_samples) / (float)reqsamp; + pos = fpos; + if (pos >= avail) break; + fpos -= pos; + fpos1 = 1.0 - fpos; + src = srcbase + (pos * chnum); + if (chnum == 2) + { + if (pos == 0) + { + psam[0] = si->prevreadbuf[0]; + psam[1] = si->prevreadbuf[1]; + } + else + { + psam[0] = src[0 - 2]; + psam[1] = src[1 - 2]; + } + *dst++ = (src[0] * fpos) + (psam[0] * fpos1); + *dst++ = (src[1] * fpos) + (psam[1] * fpos1); + } + else + { + if (pos == 0) + psam[0] = si->prevreadbuf[0]; + else + psam[0] = src[0 - 1]; + *dst++ = (src[0] * fpos) + (psam[0] * fpos1); + } + } + } + else + { + // simple sample-picking/nearest. faster and simpler + for (i = 0; i < reqsamp; i++) + { + pos = (i * in_samples) / reqsamp; + if (pos >= avail) break; + src = srcbase + (pos * chnum); + if (chnum == 2) + { + *dst++ = src[0]; + *dst++ = src[1]; + } + else + *dst++ = src[0]; + } + } + si->out_generated += i; + total = (i * in_samples) / reqsamp; + si->readbuf += total * chnum; + si->in_avail -= total; + return total; +} + +/* An RemixChunkFunc for creating sndfile */ +static RemixCount +remix_eet_sndfile_read_update(RemixEnv *env, RemixBase *sndfile, RemixCount count) +{ + SndInstanceData *si = remix_base_get_instance_data(env, sndfile); + + si->out_generated = 0; + if (si->enable_resample) + { + RemixCount gen = 0; + + while (gen < count) + { + if (si->in_avail <= 0) + { + si->in_avail = sf_readf_float(si->pcm_fp, si->inbuf, BLOCK_FRAMES); + si->readbuf = si->inbuf; + } + si->required_resamples = (count - gen); + remix_pcm_resample(si); + if (si->snd_info->channels == 2) + { + si->prevreadbuf[0] = si->readbuf[-2]; + si->prevreadbuf[1] = si->readbuf[-1]; + } + else + { + si->prevreadbuf[0] = si->readbuf[-1]; + } + gen += si->out_generated; + } + si->out_generated = gen; + } + else + { + si->out_generated = sf_readf_float(si->pcm_fp, si->outbuf, count); + } + return si->out_generated; +} + +static RemixCount +remix_eet_sndfile_read_into_chunk(RemixEnv *env, RemixChunk *chunk, RemixCount offset, RemixCount count, int channelname, void *data) +{ + RemixBase *sndfile = data; + SndInstanceData *si = remix_base_get_instance_data(env, sndfile); + RemixPCM *d, *p; + RemixCount remaining = count, written = 0, n, i; + + d = &chunk->data[offset]; + n = MIN(remaining, BLOCK_FRAMES); + // Need parameter support to advance the data reading + if (channelname == 0) + remix_eet_sndfile_read_update(env, sndfile, n); + n = MIN(si->out_generated, remaining); + p = si->outbuf; + if (si->snd_info->channels > 1) p += channelname; + for (i = 0; i < n; i++) + { + *d++ = *p; + p += si->snd_info->channels; + } + if (n == 0) n = _remix_pcm_set(d, 0.0, remaining); + remaining -= n; + written += n; + return written; +} + +static RemixCount +remix_eet_sndfile_reader_process(RemixEnv *env, RemixBase *base, RemixCount count, RemixStream *input __UNUSED__, RemixStream *output) +{ + return remix_stream_chunkfuncify(env, output, count, + remix_eet_sndfile_read_into_chunk, + base); +} + +static RemixCount +remix_eet_sndfile_length(RemixEnv *env, RemixBase *base) +{ + SndInstanceData *si = remix_base_get_instance_data(env, base); + return si->resample_len; +} + +static RemixCount +remix_eet_sndfile_seek(RemixEnv *env, RemixBase *base, RemixCount offset) +{ + SndInstanceData *si = remix_base_get_instance_data(env, base); + return sf_seek(si->pcm_fp, offset, SEEK_SET); +} + +static struct _RemixMethods _remix_eet_sndfile_reader_methods = +{ + remix_eet_sndfile_clone, + remix_eet_sndfile_destroy, + NULL, /* ready */ + NULL, /* prepare */ + remix_eet_sndfile_reader_process, + remix_eet_sndfile_length, + remix_eet_sndfile_seek, + NULL, /* flush */ +}; + +static RemixBase * +remix_eet_sndfile_optimise(RemixEnv *env, RemixBase *sndfile) +{ + remix_base_set_methods(env, sndfile, &_remix_eet_sndfile_reader_methods); + return sndfile; +} + +static struct _RemixParameterScheme path_scheme = +{ + "path", + "Path to sound file", + REMIX_TYPE_STRING, + REMIX_CONSTRAINT_TYPE_NONE, + {NULL}, + REMIX_HINT_FILENAME, +}; + +static struct _RemixParameterScheme sound_id_scheme = +{ + "sound_id", + "Sound Id (Key) inside EET", + REMIX_TYPE_STRING, + REMIX_CONSTRAINT_TYPE_NONE, + {NULL}, + REMIX_HINT_DEFAULT, +}; + +static struct _RemixParameterScheme speed_scheme = +{ + "speed", + "Sound Play Speed", + REMIX_TYPE_FLOAT, + REMIX_CONSTRAINT_TYPE_NONE, + {NULL}, + REMIX_HINT_DEFAULT, +}; + +static struct _RemixMetaText eet_sndfile_reader_metatext = +{ + "eet_sndfile_reader", + "File:: Sound file Reader from EET", + "Reads PCM audio files from EET bundle using libsndfile", + "Copyright (C) 2011, Samsung Electronics Co., Ltd.", + "http://www.samsung.com", + REMIX_ONE_AUTHOR ("govi.sm@samsung.com", "prince.dubey@samsung.com"), +}; + +static struct _RemixPlugin eet_sndfile_reader_plugin = +{ + &eet_sndfile_reader_metatext, + REMIX_FLAGS_NONE, + CD_EMPTY_SET, /* init scheme */ + remix_eet_sndfile_reader_init, + CD_EMPTY_SET, /* process scheme */ + NULL, /* suggests */ + NULL, /* plugin data */ + NULL /* destroy */ +}; + +EAPI CDList * +remix_load(RemixEnv *env) +{ + CDList *plugins = cd_list_new(env); + + eet_sndfile_reader_plugin.init_scheme = + cd_set_insert(env, eet_sndfile_reader_plugin.init_scheme, PATH_KEY, + CD_POINTER(&path_scheme)); + eet_sndfile_reader_plugin.init_scheme = + cd_set_insert(env, eet_sndfile_reader_plugin.init_scheme, SOUND_ID_KEY, + CD_POINTER(&sound_id_scheme)); + eet_sndfile_reader_plugin.init_scheme = + cd_set_insert(env, eet_sndfile_reader_plugin.init_scheme, SPEED_KEY, + CD_POINTER(&speed_scheme)); + + plugins = cd_list_prepend(env, plugins, + CD_POINTER(&eet_sndfile_reader_plugin)); + return plugins; +} -- cgit v1.1