From 0556a39f8a37da68f21772da896ebfdf15b6057d Mon Sep 17 00:00:00 2001 From: waker Date: Sun, 23 Oct 2011 17:05:43 +0200 Subject: gme: added support for intro_length and loop_length --- plugins/gme/cgme.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'plugins') diff --git a/plugins/gme/cgme.c b/plugins/gme/cgme.c index 6a28a878..e94a4773 100644 --- a/plugins/gme/cgme.c +++ b/plugins/gme/cgme.c @@ -41,6 +41,7 @@ int _Unwind_GetIPInfo; static DB_decoder_t plugin; static DB_functions_t *deadbeef; static int conf_fadeout = 10; +static int conf_loopcount = 2; typedef struct { DB_fileinfo_t info; @@ -322,10 +323,10 @@ cgme_insert (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname) { DB_playItem_t *it = deadbeef->pl_item_alloc_init (fname, plugin.plugin.id); char str[1024]; if (inf->song[0]) { - snprintf (str, 1024, "%d %s - %s", i, inf->game, inf->song); + snprintf (str, sizeof(str), "%d %s - %s", i, inf->game, inf->song); } else { - snprintf (str, 1024, "%d %s - ?", i, inf->game); + snprintf (str, sizeof(str), "%d %s - ?", i, inf->game); } trace ("track subtune %d %s, length=%d\n", i, str, inf->length); deadbeef->pl_set_meta_int (it, ":TRACKNUM", i); @@ -349,9 +350,26 @@ cgme_insert (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname) { char trk[10]; snprintf (trk, 10, "%d", i+1); cgme_add_meta (it, "track", trk); + snprintf (str, sizeof(str), "%d", inf->length); + deadbeef->pl_add_meta (it, ":GME_LENGTH", str); + snprintf (str, sizeof(str), "%d", inf->intro_length); + deadbeef->pl_add_meta (it, ":GME_INTRO_LENGTH", str); + snprintf (str, sizeof(str), "%d", inf->loop_length); + deadbeef->pl_add_meta (it, ":GME_LOOP_LENGTH", str); if (inf->length == -1 || inf->length == 0) { - float songlength = deadbeef->conf_get_float ("gme.songlength", 3); - deadbeef->plt_set_item_duration (plt, it, songlength * 60.f); + float songlength; + + if (inf->loop_length > 0 && conf_loopcount > 0) { + songlength = inf->intro_length / 1000.f; + if (songlength < 0) { + songlength = 0; + } + songlength += (inf->loop_length * conf_loopcount) / 1000.f; + } + else { + songlength = deadbeef->conf_get_float ("gme.songlength", 3) * 60.f; + } + deadbeef->plt_set_item_duration (plt, it, songlength); } else { deadbeef->plt_set_item_duration (plt, it, (float)inf->length/1000.f); @@ -425,6 +443,7 @@ cgme_message (uint32_t id, uintptr_t ctx, uint32_t p1, uint32_t p2) { switch (id) { case DB_EV_CONFIGCHANGED: conf_fadeout = deadbeef->conf_get_int ("gme.fadeout", 10); + conf_loopcount = deadbeef->conf_get_int ("gme.loopcount", 2); break; } return 0; @@ -433,6 +452,7 @@ cgme_message (uint32_t id, uintptr_t ctx, uint32_t p1, uint32_t p2) { static const char settings_dlg[] = "property \"Max song length (in minutes)\" entry gme.songlength 3;\n" "property \"Fadeout length (seconds)\" entry gme.fadeout 10;\n" + "property \"Play loops nr. of times (if available)\" entry gme.loopcount 2;\n" ; // define plugin interface -- cgit v1.2.3 From 2d7bb0979b2e34403925a8e2903773f9c8ad8b8f Mon Sep 17 00:00:00 2001 From: waker Date: Sun, 23 Oct 2011 17:32:01 +0200 Subject: readded DUMB, AOPSF and SHN plugins to tarball --- configure.ac | 26 +++++++++++- plugins/ao/Makefile | 33 --------------- plugins/ao/Makefile.am | 27 ++++++++++++ plugins/dumb/Makefile | 96 ------------------------------------------ plugins/dumb/Makefile.am | 107 +++++++++++++++++++++++++++++++++++++++++++++++ plugins/shn/Makefile | 23 ---------- plugins/shn/Makefile.am | 10 +++++ scripts/quickinstall.sh | 6 +-- 8 files changed, 172 insertions(+), 156 deletions(-) delete mode 100644 plugins/ao/Makefile create mode 100644 plugins/ao/Makefile.am delete mode 100644 plugins/dumb/Makefile create mode 100644 plugins/dumb/Makefile.am delete mode 100644 plugins/shn/Makefile create mode 100644 plugins/shn/Makefile.am (limited to 'plugins') diff --git a/configure.ac b/configure.ac index e53e44d9..842406df 100644 --- a/configure.ac +++ b/configure.ac @@ -104,6 +104,9 @@ AC_ARG_ENABLE(m3u, [AS_HELP_STRING([--enable-m3u ], [build m3u plugin AC_ARG_ENABLE(vfs-zip, [AS_HELP_STRING([--enable-vfs-zip ], [build vfs_zip plugin (default: auto)])], [enable_vfs_zip=$enableval], [enable_vfs_zip=yes]) AC_ARG_ENABLE(converter, [AS_HELP_STRING([--enable-converter ], [build converter plugin (default: auto)])], [enable_converter=$enableval], [enable_converter=yes]) AC_ARG_ENABLE(artwork-imlib2, [AS_HELP_STRING([--enable-artwork-imlib2 ], [use imlib2 in artwork plugin (default: auto)])], [enable_artwork_imlib2=$enableval], [enable_artwork_imlib2=yes]) +AC_ARG_ENABLE(dumb, [AS_HELP_STRING([--enable-dumb ], [build DUMB plugin (default: auto)])], [enable_dumb=$enableval], [enable_dumb=yes]) +AC_ARG_ENABLE(shn, [AS_HELP_STRING([--enable-shn ], [build SHN plugin (default: auto)])], [enable_shn=$enableval], [enable_shn=yes]) +AC_ARG_ENABLE(psf, [AS_HELP_STRING([--enable-psf ], [build AOSDK-based PSF(,QSF,SSF,DSF) plugin (default: auto)])], [enable_psf=$enableval], [enable_psf=yes]) if test "x$enable_staticlink" != "xno" ; then AC_DEFINE_UNQUOTED([STATICLINK], [1], [Define if building static version]) @@ -547,7 +550,19 @@ if test "x$enable_converter" != "xno" ; then fi fi -PLUGINS_DIRS="plugins/lastfm plugins/mpgmad plugins/vorbis plugins/flac plugins/wavpack plugins/sndfile plugins/vfs_curl plugins/cdda plugins/gtkui plugins/alsa plugins/ffmpeg plugins/hotkeys plugins/oss plugins/artwork plugins/adplug plugins/ffap plugins/sid plugins/nullout plugins/supereq plugins/vtx plugins/gme plugins/pulse plugins/notify plugins/musepack plugins/wildmidi plugins/tta plugins/dca plugins/aac plugins/mms plugins/shellexec plugins/dsp_libsrc plugins/m3u plugins/vfs_zip plugins/converter" +if test "x$enable_dumb" != "xno" ; then + HAVE_DUMB=yes +fi + +if test "x$enable_shn" != "xno" ; then + HAVE_SHN=yes +fi + +if test "x$enable_psf" != "xno" ; then + HAVE_PSF=yes +fi + +PLUGINS_DIRS="plugins/lastfm plugins/mpgmad plugins/vorbis plugins/flac plugins/wavpack plugins/sndfile plugins/vfs_curl plugins/cdda plugins/gtkui plugins/alsa plugins/ffmpeg plugins/hotkeys plugins/oss plugins/artwork plugins/adplug plugins/ffap plugins/sid plugins/nullout plugins/supereq plugins/vtx plugins/gme plugins/pulse plugins/notify plugins/musepack plugins/wildmidi plugins/tta plugins/dca plugins/aac plugins/mms plugins/shellexec plugins/dsp_libsrc plugins/m3u plugins/vfs_zip plugins/converter plugins/dumb plugins/shn plugins/ao" AM_CONDITIONAL(HAVE_VORBIS, test "x$HAVE_VORBISPLUGIN" = "xyes") AM_CONDITIONAL(HAVE_FLAC, test "x$HAVE_FLACPLUGIN" = "xyes") @@ -592,6 +607,9 @@ AM_CONDITIONAL(HAVE_IMLIB2, test "x$HAVE_IMLIB2" = "xyes") AM_CONDITIONAL(HAVE_JPEG, test "x$HAVE_JPEG" = "xyes") AM_CONDITIONAL(HAVE_PNG, test "x$HAVE_PNG" = "xyes") AM_CONDITIONAL(HAVE_YASM, test "x$HAVE_YASM" = "xyes") +AM_CONDITIONAL(HAVE_DUMB, test "x$HAVE_DUMB" = "xyes") +AM_CONDITIONAL(HAVE_PSF, test "x$HAVE_PSF" = "xyes") +AM_CONDITIONAL(HAVE_SHN, test "x$HAVE_SHN" = "xyes") AC_SUBST(PLUGINS_DIRS) @@ -652,6 +670,9 @@ PRINT_PLUGIN_INFO([dsp_src],[High quality samplerate conversion using libsampler PRINT_PLUGIN_INFO([m3u],[M3U and PLS playlist support],[test "x$HAVE_M3U" = "xyes"]) PRINT_PLUGIN_INFO([vfs_zip],[zip archive support],[test "x$HAVE_VFS_ZIP" = "xyes"]) PRINT_PLUGIN_INFO([converter],[plugin for converting files to any formats],[test "x$HAVE_CONVERTER" = "xyes"]) +PRINT_PLUGIN_INFO([psf],[PSF format plugin, using AOSDK],[test "x$HAVE_PSF" = "xyes"]) +PRINT_PLUGIN_INFO([dumb],[DUMB module plugin, for MOD, S3M, etc],[test "x$HAVE_DUMB" = "xyes"]) +PRINT_PLUGIN_INFO([shn],[SHN plugin based on xmms-shn],[test "x$HAVE_SHN" = "xyes"]) echo @@ -693,6 +714,9 @@ plugins/dsp_libsrc/Makefile plugins/m3u/Makefile plugins/vfs_zip/Makefile plugins/converter/Makefile +plugins/dumb/Makefile +plugins/ao/Makefile +plugins/shn/Makefile intl/Makefile po/Makefile.in deadbeef.desktop diff --git a/plugins/ao/Makefile b/plugins/ao/Makefile deleted file mode 100644 index d188294d..00000000 --- a/plugins/ao/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -OUT=ddb_aopsf.so - -CC?=gcc - -ZLIB_LIBS?=-lz - -CFLAGS?=-O2 -fomit-frame-pointer -CFLAGS+=-Wall -fPIC -DPATH_MAX=1024 -DHAS_PSXCPU=1 -I../.. -I./ -Ieng_ssf -Ieng_qsf -Ieng_dsf -CFLAGS+=$(STATIC_CFLAGS) - -LDFLAGS+=-module -shared -lm - -SOURCES=plugin.c main.c corlett.c\ -eng_dsf/eng_dsf.c eng_dsf/dc_hw.c eng_dsf/aica.c eng_dsf/aicadsp.c eng_dsf/arm7.c eng_dsf/arm7i.c\ -eng_ssf/m68kcpu.c eng_ssf/m68kopac.c eng_ssf/m68kopdm.c eng_ssf/m68kopnz.c eng_ssf/m68kops.c \ -eng_ssf/scsp.c eng_ssf/scspdsp.c eng_ssf/sat_hw.c eng_ssf/eng_ssf.c\ -eng_qsf/eng_qsf.c eng_qsf/kabuki.c eng_qsf/qsound.c eng_qsf/z80.c eng_qsf/z80dasm.c\ -eng_psf/eng_psf.c eng_psf/psx.c eng_psf/psx_hw.c eng_psf/peops/spu.c \ -eng_psf/eng_psf2.c eng_psf/peops2/spu2.c eng_psf/peops2/dma2.c eng_psf/peops2/registers2.c\ -eng_psf/eng_spu.c - -OBJECTS=$(SOURCES:.c=.o) - -all: $(SOURCES) $(OUT) - -$(OUT): $(OBJECTS) - $(CC) $(LDFLAGS) $(OBJECTS) -o $@ $(ZLIB_LIBS) - -.c.o: - $(CC) $(CFLAGS) $< -c -o $@ - -clean: - rm $(OBJECTS) $(OUT) diff --git a/plugins/ao/Makefile.am b/plugins/ao/Makefile.am new file mode 100644 index 00000000..62df2b2c --- /dev/null +++ b/plugins/ao/Makefile.am @@ -0,0 +1,27 @@ +if HAVE_PSF +aodir = $(libdir)/$(PACKAGE) +pkglib_LTLIBRARIES = ddb_aopsf.la +ddb_aopsf_la_SOURCES = plugin.c main.c corlett.c\ +eng_dsf/eng_dsf.c eng_dsf/dc_hw.c eng_dsf/aica.c eng_dsf/aicadsp.c eng_dsf/arm7.c eng_dsf/arm7i.c\ +eng_ssf/m68kcpu.c eng_ssf/m68kopac.c eng_ssf/m68kopdm.c eng_ssf/m68kopnz.c eng_ssf/m68kops.c \ +eng_ssf/scsp.c eng_ssf/scspdsp.c eng_ssf/sat_hw.c eng_ssf/eng_ssf.c\ +eng_qsf/eng_qsf.c eng_qsf/kabuki.c eng_qsf/qsound.c eng_qsf/z80.c eng_qsf/z80dasm.c\ +eng_psf/eng_psf.c eng_psf/psx.c eng_psf/psx_hw.c eng_psf/peops/spu.c \ +eng_psf/eng_psf2.c eng_psf/peops2/spu2.c eng_psf/peops2/dma2.c eng_psf/peops2/registers2.c\ +eng_psf/eng_spu.c\ +ao.h corlett.h cpuintrf.h eng_protos.h mem.h osd_cpu.h\ +eng_dsf/aicadsp.h eng_dsf/aica.h eng_dsf/arm7.h eng_dsf/arm7i.h eng_dsf/arm7thumb.h eng_dsf/dc_hw.h\ +eng_ssf/m68kconf.h eng_ssf/m68kcpu.h eng_ssf/m68k.h eng_ssf/m68kmame.h eng_ssf/m68kops.h eng_ssf/sat_hw.h eng_ssf/scspdsp.h eng_ssf/scsp.h \ +eng_qsf/qsound.h eng_qsf/z80dasm.h eng_qsf/z80.h\ +eng_psf/cpuintrf.h eng_psf/mamemem.h eng_psf/psx.h\ +eng_psf/peops/adsr.h eng_psf/peops/dma.h eng_psf/peops/externals.h eng_psf/peops/gauss_i.h eng_psf/peops/registers.h eng_psf/peops/regs.h eng_psf/peops/spu.h eng_psf/peops/stdafx.h\ +eng_psf/peops2/adsr.h eng_psf/peops2/dma.h eng_psf/peops2/externals.h eng_psf/peops2/gauss_i.h eng_psf/peops2/psemuxa.h eng_psf/peops2/registers.h eng_psf/peops2/regs.h eng_psf/peops2/reverb.h eng_psf/peops2/spu.h eng_psf/peops2/stdafx.h + +ddb_aopsf_la_LDFLAGS = -module -fPIC + +EXTRA_DIST=eng_psf/peops/reverb.c eng_psf/peops/adsr.c eng_psf/peops/registers.c eng_psf/peops/dma.c eng_psf/peops2/spu2.c eng_psf/peops2/reverb2.c eng_psf/peops2/adsr2.c eng_dsf/arm7memil.c eng_dsf/aicalfo.c eng_ssf/scsplfo.c + +ddb_aopsf_la_LIBADD = $(LDADD) +AM_CFLAGS = $(CFLAGS) -Wall -DPATH_MAX=1024 -DHAS_PSXCPU=1 -I.. -Ieng_ssf -Ieng_qsf -Ieng_dsf -lm $(ZLIB_LIBS) +endif + diff --git a/plugins/dumb/Makefile b/plugins/dumb/Makefile deleted file mode 100644 index e993012f..00000000 --- a/plugins/dumb/Makefile +++ /dev/null @@ -1,96 +0,0 @@ -OUT=ddb_dumb.so - -CC?=gcc - -dumbpath=dumb-kode54 - -CFLAGS+=-Wall -fPIC -D_GNU_SOURCE -I$(dumbpath)/include -std=c99 - -LDFLAGS+=-module -shared -lm - -SOURCES=\ -dumb-kode54/src/it/readam.c\ -dumb-kode54/src/it/readstm.c\ -dumb-kode54/src/it/loads3m.c\ -dumb-kode54/src/it/loadxm.c\ -dumb-kode54/src/it/ptmeffect.c\ -dumb-kode54/src/it/loadstm.c\ -dumb-kode54/src/it/readxm.c\ -dumb-kode54/src/it/itorder.c\ -dumb-kode54/src/it/loadpsm.c\ -dumb-kode54/src/it/itload.c\ -dumb-kode54/src/it/loadasy2.c\ -dumb-kode54/src/it/readasy.c\ -dumb-kode54/src/it/loadasy.c\ -dumb-kode54/src/it/read669.c\ -dumb-kode54/src/it/readdsmf.c\ -dumb-kode54/src/it/reads3m.c\ -dumb-kode54/src/it/readriff.c\ -dumb-kode54/src/it/load6692.c\ -dumb-kode54/src/it/read6692.c\ -dumb-kode54/src/it/readmod2.c\ -dumb-kode54/src/it/loadriff2.c\ -dumb-kode54/src/it/xmeffect.c\ -dumb-kode54/src/it/loadmod2.c\ -dumb-kode54/src/it/itread.c\ -dumb-kode54/src/it/itunload.c\ -dumb-kode54/src/it/loadmtm2.c\ -dumb-kode54/src/it/loadptm.c\ -dumb-kode54/src/it/itload2.c\ -dumb-kode54/src/it/loadmtm.c\ -dumb-kode54/src/it/loadoldpsm.c\ -dumb-kode54/src/it/loadstm2.c\ -dumb-kode54/src/it/readstm2.c\ -dumb-kode54/src/it/readptm.c\ -dumb-kode54/src/it/itrender.c\ -dumb-kode54/src/it/readoldpsm.c\ -dumb-kode54/src/it/reads3m2.c\ -dumb-kode54/src/it/readpsm.c\ -dumb-kode54/src/it/itread2.c\ -dumb-kode54/src/it/loads3m2.c\ -dumb-kode54/src/it/loadpsm2.c\ -dumb-kode54/src/it/loadxm2.c\ -dumb-kode54/src/it/loadptm2.c\ -dumb-kode54/src/it/readxm2.c\ -dumb-kode54/src/it/itmisc.c\ -dumb-kode54/src/it/loadoldpsm2.c\ -dumb-kode54/src/it/readmod.c\ -dumb-kode54/src/it/loadmod.c\ -dumb-kode54/src/it/loadriff.c\ -dumb-kode54/src/it/readmtm.c\ -dumb-kode54/src/it/load669.c\ -dumb-kode54/src/core/rendduh.c\ -dumb-kode54/src/core/readduh.c\ -dumb-kode54/src/core/duhlen.c\ -dumb-kode54/src/core/loadduh.c\ -dumb-kode54/src/core/unload.c\ -dumb-kode54/src/core/duhtag.c\ -dumb-kode54/src/core/register.c\ -dumb-kode54/src/core/rawsig.c\ -dumb-kode54/src/core/dumbfile.c\ -dumb-kode54/src/core/rendsig.c\ -dumb-kode54/src/core/makeduh.c\ -dumb-kode54/src/core/atexit.c\ -dumb-kode54/src/helpers/clickrem.c\ -dumb-kode54/src/helpers/silence.c\ -dumb-kode54/src/helpers/stdfile.c\ -dumb-kode54/src/helpers/resample.c\ -dumb-kode54/src/helpers/riff.c\ -dumb-kode54/src/helpers/memfile.c\ -dumb-kode54/src/helpers/sampbuf.c\ -dumb-kode54/src/helpers/barray.c\ -cdumb.c - -OBJECTS=$(SOURCES:.c=.o) - -all: $(SOURCES) $(OUT) - -$(OUT): $(OBJECTS) - $(CC) $(LDFLAGS) $(OBJECTS) -o $@ - -.c.o: - $(CC) $(CFLAGS) $< -c -o $@ - -clean: - rm $(OBJECTS) $(OUT) - diff --git a/plugins/dumb/Makefile.am b/plugins/dumb/Makefile.am new file mode 100644 index 00000000..38e6d830 --- /dev/null +++ b/plugins/dumb/Makefile.am @@ -0,0 +1,107 @@ +if HAVE_DUMB +dumbpath=@top_srcdir@/plugins/dumb/dumb-kode54 + +EXTRA_DIST = $(dumbpath)/readme.txt $(dumbpath)/ChangeLog $(dumbpath)/licence.txt $(dumbpath)/release.txt $(dumbpath)/todo.txt + +pkglib_LTLIBRARIES = ddb_dumb.la + +AM_CFLAGS = $(CFLAGS) -I$(dumbpath)/include -std=c99 +ddb_dumb_la_LDFLAGS = -module -lm + +ddb_dumb_la_SOURCES =\ +dumb-kode54/src/it/readam.c\ +dumb-kode54/src/it/readstm.c\ +dumb-kode54/src/it/loads3m.c\ +dumb-kode54/src/it/loadxm.c\ +dumb-kode54/src/it/ptmeffect.c\ +dumb-kode54/src/it/loadstm.c\ +dumb-kode54/src/it/readxm.c\ +dumb-kode54/src/it/itorder.c\ +dumb-kode54/src/it/loadpsm.c\ +dumb-kode54/src/it/itload.c\ +dumb-kode54/src/it/loadasy2.c\ +dumb-kode54/src/it/readasy.c\ +dumb-kode54/src/it/loadasy.c\ +dumb-kode54/src/it/read669.c\ +dumb-kode54/src/it/readdsmf.c\ +dumb-kode54/src/it/reads3m.c\ +dumb-kode54/src/it/readriff.c\ +dumb-kode54/src/it/load6692.c\ +dumb-kode54/src/it/read6692.c\ +dumb-kode54/src/it/readmod2.c\ +dumb-kode54/src/it/loadriff2.c\ +dumb-kode54/src/it/xmeffect.c\ +dumb-kode54/src/it/loadmod2.c\ +dumb-kode54/src/it/itread.c\ +dumb-kode54/src/it/itunload.c\ +dumb-kode54/src/it/loadmtm2.c\ +dumb-kode54/src/it/loadptm.c\ +dumb-kode54/src/it/itload2.c\ +dumb-kode54/src/it/loadmtm.c\ +dumb-kode54/src/it/loadoldpsm.c\ +dumb-kode54/src/it/loadstm2.c\ +dumb-kode54/src/it/readstm2.c\ +dumb-kode54/src/it/readptm.c\ +dumb-kode54/src/it/itrender.c\ +dumb-kode54/src/it/readoldpsm.c\ +dumb-kode54/src/it/reads3m2.c\ +dumb-kode54/src/it/readpsm.c\ +dumb-kode54/src/it/itread2.c\ +dumb-kode54/src/it/loads3m2.c\ +dumb-kode54/src/it/loadpsm2.c\ +dumb-kode54/src/it/loadxm2.c\ +dumb-kode54/src/it/loadptm2.c\ +dumb-kode54/src/it/readxm2.c\ +dumb-kode54/src/it/itmisc.c\ +dumb-kode54/src/it/loadoldpsm2.c\ +dumb-kode54/src/it/readmod.c\ +dumb-kode54/src/it/loadmod.c\ +dumb-kode54/src/it/loadriff.c\ +dumb-kode54/src/it/readmtm.c\ +dumb-kode54/src/it/load669.c\ +dumb-kode54/src/core/rendduh.c\ +dumb-kode54/src/core/readduh.c\ +dumb-kode54/src/core/duhlen.c\ +dumb-kode54/src/core/loadduh.c\ +dumb-kode54/src/core/unload.c\ +dumb-kode54/src/core/duhtag.c\ +dumb-kode54/src/core/register.c\ +dumb-kode54/src/core/rawsig.c\ +dumb-kode54/src/core/dumbfile.c\ +dumb-kode54/src/core/rendsig.c\ +dumb-kode54/src/core/makeduh.c\ +dumb-kode54/src/core/atexit.c\ +dumb-kode54/src/helpers/clickrem.c\ +dumb-kode54/src/helpers/silence.c\ +dumb-kode54/src/helpers/stdfile.c\ +dumb-kode54/src/helpers/resample.c\ +dumb-kode54/src/helpers/riff.c\ +dumb-kode54/src/helpers/memfile.c\ +dumb-kode54/src/helpers/sampbuf.c\ +dumb-kode54/src/helpers/barray.c\ +dumb-kode54/studio/include/guitop.h\ +dumb-kode54/studio/include/dumbgui.h\ +dumb-kode54/studio/include/options.h\ +dumb-kode54/studio/include/subclip.h\ +dumb-kode54/studio/include/main.h\ +dumb-kode54/studio/include/guiproc.h\ +dumb-kode54/studio/include/dumbmenu.h\ +dumb-kode54/studio/include/dumbdesk.h\ +dumb-kode54/src/tools/it/modulus.h\ +dumb-kode54/include/internal/it.h\ +dumb-kode54/include/internal/dumb.h\ +dumb-kode54/include/internal/barray.h\ +dumb-kode54/include/internal/riff.h\ +dumb-kode54/include/internal/aldumb.h\ +dumb-kode54/include/dumb.h\ +dumb-kode54/include/aldumb.h\ +dumb-kode54/winamp/in_duh.h\ +dumb-kode54/winamp/in2.h\ +dumb-kode54/winamp/resource.h\ +dumb-kode54/winamp/out.h\ +dumb-kode54/winamp/gui.h\ +dumb-kode54/src/helpers/resample.inc\ +dumb-kode54/src/helpers/resamp2.inc\ +dumb-kode54/src/helpers/resamp3.inc\ +cdumb.c +endif diff --git a/plugins/shn/Makefile b/plugins/shn/Makefile deleted file mode 100644 index d76c8427..00000000 --- a/plugins/shn/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -OUT=ddb_shn.so - -CC?=gcc - -CFLAGS?=-I../.. -CFLAGS+=-Wall -fPIC -std=c99 -D_GNU_SOURCE -DHAVE_CONFIG_H -I. - -LDFLAGS+=-module -shared -lm - -SOURCES=array.c convert.c misc.c output.c seek.c shn.c shorten.c sulawalaw.c vario.c wave.c - -OBJECTS=$(SOURCES:.c=.o) - -all: $(SOURCES) $(OUT) - -$(OUT): $(OBJECTS) - $(CC) $(LDFLAGS) $(OBJECTS) -o $@ - -.c.o: - $(CC) $(CFLAGS) $< -c -o $@ - -clean: - rm $(OBJECTS) $(OUT) diff --git a/plugins/shn/Makefile.am b/plugins/shn/Makefile.am new file mode 100644 index 00000000..acc597ef --- /dev/null +++ b/plugins/shn/Makefile.am @@ -0,0 +1,10 @@ +if HAVE_SHN +shndir = $(libdir)/$(PACKAGE) +pkglib_LTLIBRARIES = ddb_shn.la +ddb_shn_la_SOURCES = array.c convert.c misc.c output.c seek.c shn.c shn.h shorten.c shorten.h sulawalaw.c vario.c wave.c bitshift.h + +ddb_shn_la_LDFLAGS = -module + +ddb_shn_la_LIBADD = $(LDADD) -lm +AM_CFLAGS = $(CFLAGS) -std=c99 +endif diff --git a/scripts/quickinstall.sh b/scripts/quickinstall.sh index 05f4eabb..1681e2b2 100755 --- a/scripts/quickinstall.sh +++ b/scripts/quickinstall.sh @@ -24,7 +24,7 @@ cp ./plugins/pulse/.libs/pulse.so /usr/local/lib/deadbeef/ cp ./plugins/artwork/.libs/artwork.so /usr/local/lib/deadbeef/ cp ./plugins/supereq/.libs/supereq.so /usr/local/lib/deadbeef/ cp ./plugins/gme/.libs/gme.so /usr/local/lib/deadbeef/ -cp ./plugins/dumb/dumb.so /usr/local/lib/deadbeef/ +cp ./plugins/dumb/.libs/ddb_dumb.so /usr/local/lib/deadbeef/ cp ./plugins/notify/.libs/notify.so /usr/local/lib/deadbeef/ cp ./plugins/musepack/.libs/musepack.so /usr/local/lib/deadbeef/ cp ./plugins/wildmidi/.libs/wildmidi.so /usr/local/lib/deadbeef/ @@ -32,8 +32,8 @@ cp ./plugins/tta/.libs/tta.so /usr/local/lib/deadbeef/ cp ./plugins/dca/.libs/dca.so /usr/local/lib/deadbeef/ cp ./plugins/aac/.libs/aac.so /usr/local/lib/deadbeef/ cp ./plugins/mms/.libs/mms.so /usr/local/lib/deadbeef/ -cp ./plugins/shn/shn.so /usr/local/lib/deadbeef/ -cp ./plugins/ao/ao.so /usr/local/lib/deadbeef/ +cp ./plugins/shn/.libs/ddb_shn.so /usr/local/lib/deadbeef/ +cp ./plugins/ao/.libs/ddb_aopsf.so /usr/local/lib/deadbeef/ cp ./plugins/shellexec/.libs/shellexec.so /usr/local/lib/deadbeef/ cp ./plugins/dsp_libsrc/.libs/dsp_libsrc.so /usr/local/lib/deadbeef/ cp ./plugins/m3u/.libs/m3u.so /usr/local/lib/deadbeef/ -- cgit v1.2.3 From e456e4f6294d829633982105888f77bda1cb1e48 Mon Sep 17 00:00:00 2001 From: waker Date: Sun, 23 Oct 2011 17:59:27 +0200 Subject: set default pulseaudio buffer size to 8192 --- plugins/pulse/pulse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/pulse/pulse.c b/plugins/pulse/pulse.c index 98f446ca..76baf98c 100644 --- a/plugins/pulse/pulse.c +++ b/plugins/pulse/pulse.c @@ -353,7 +353,7 @@ DB_plugin_t * pulse_load(DB_functions_t *api) static const char settings_dlg[] = "property \"PulseAudio server\" entry " CONFSTR_PULSE_SERVERADDR " default;\n" - "property \"Preferred buffer size\" entry " CONFSTR_PULSE_BUFFERSIZE " 4096;\n"; + "property \"Preferred buffer size\" entry " CONFSTR_PULSE_BUFFERSIZE " 8192;\n"; static DB_output_t plugin = { -- cgit v1.2.3 From 0a0f6f591163203c8156d5079061ab2010acbdd3 Mon Sep 17 00:00:00 2001 From: waker Date: Sun, 23 Oct 2011 18:32:00 +0200 Subject: few compile fixes; added mono2stereo into tarball --- configure.ac | 10 +++++++++- messagepump.h | 2 +- plugins/ao/main.c | 2 +- plugins/ao/plugin.c | 2 +- plugins/dumb/cdumb.c | 2 +- plugins/mono2stereo/Makefile | 23 ----------------------- plugins/mono2stereo/Makefile.am | 8 ++++++++ plugins/mono2stereo/mono2stereo.c | 2 +- plugins/shn/shn.c | 2 +- scripts/quickinstall.sh | 2 +- 10 files changed, 24 insertions(+), 31 deletions(-) delete mode 100644 plugins/mono2stereo/Makefile create mode 100644 plugins/mono2stereo/Makefile.am (limited to 'plugins') diff --git a/configure.ac b/configure.ac index 842406df..9e2b179d 100644 --- a/configure.ac +++ b/configure.ac @@ -107,6 +107,7 @@ AC_ARG_ENABLE(artwork-imlib2, [AS_HELP_STRING([--enable-artwork-imlib2 ], [ AC_ARG_ENABLE(dumb, [AS_HELP_STRING([--enable-dumb ], [build DUMB plugin (default: auto)])], [enable_dumb=$enableval], [enable_dumb=yes]) AC_ARG_ENABLE(shn, [AS_HELP_STRING([--enable-shn ], [build SHN plugin (default: auto)])], [enable_shn=$enableval], [enable_shn=yes]) AC_ARG_ENABLE(psf, [AS_HELP_STRING([--enable-psf ], [build AOSDK-based PSF(,QSF,SSF,DSF) plugin (default: auto)])], [enable_psf=$enableval], [enable_psf=yes]) +AC_ARG_ENABLE(mono2stereo, [AS_HELP_STRING([--enable-mono2stereo ], [build mono2stereo DSP plugin (default: auto)])], [enable_mono2stereo=$enableval], [enable_mono2stereo=yes]) if test "x$enable_staticlink" != "xno" ; then AC_DEFINE_UNQUOTED([STATICLINK], [1], [Define if building static version]) @@ -562,7 +563,11 @@ if test "x$enable_psf" != "xno" ; then HAVE_PSF=yes fi -PLUGINS_DIRS="plugins/lastfm plugins/mpgmad plugins/vorbis plugins/flac plugins/wavpack plugins/sndfile plugins/vfs_curl plugins/cdda plugins/gtkui plugins/alsa plugins/ffmpeg plugins/hotkeys plugins/oss plugins/artwork plugins/adplug plugins/ffap plugins/sid plugins/nullout plugins/supereq plugins/vtx plugins/gme plugins/pulse plugins/notify plugins/musepack plugins/wildmidi plugins/tta plugins/dca plugins/aac plugins/mms plugins/shellexec plugins/dsp_libsrc plugins/m3u plugins/vfs_zip plugins/converter plugins/dumb plugins/shn plugins/ao" +if test "x$enable_mono2stereo" != "xno" ; then + HAVE_MONO2STEREO=yes +fi + +PLUGINS_DIRS="plugins/lastfm plugins/mpgmad plugins/vorbis plugins/flac plugins/wavpack plugins/sndfile plugins/vfs_curl plugins/cdda plugins/gtkui plugins/alsa plugins/ffmpeg plugins/hotkeys plugins/oss plugins/artwork plugins/adplug plugins/ffap plugins/sid plugins/nullout plugins/supereq plugins/vtx plugins/gme plugins/pulse plugins/notify plugins/musepack plugins/wildmidi plugins/tta plugins/dca plugins/aac plugins/mms plugins/shellexec plugins/dsp_libsrc plugins/m3u plugins/vfs_zip plugins/converter plugins/dumb plugins/shn plugins/ao plugins/mono2stereo" AM_CONDITIONAL(HAVE_VORBIS, test "x$HAVE_VORBISPLUGIN" = "xyes") AM_CONDITIONAL(HAVE_FLAC, test "x$HAVE_FLACPLUGIN" = "xyes") @@ -610,6 +615,7 @@ AM_CONDITIONAL(HAVE_YASM, test "x$HAVE_YASM" = "xyes") AM_CONDITIONAL(HAVE_DUMB, test "x$HAVE_DUMB" = "xyes") AM_CONDITIONAL(HAVE_PSF, test "x$HAVE_PSF" = "xyes") AM_CONDITIONAL(HAVE_SHN, test "x$HAVE_SHN" = "xyes") +AM_CONDITIONAL(HAVE_MONO2STEREO, test "x$HAVE_MONO2STEREO" = "xyes") AC_SUBST(PLUGINS_DIRS) @@ -673,6 +679,7 @@ PRINT_PLUGIN_INFO([converter],[plugin for converting files to any formats],[test PRINT_PLUGIN_INFO([psf],[PSF format plugin, using AOSDK],[test "x$HAVE_PSF" = "xyes"]) PRINT_PLUGIN_INFO([dumb],[DUMB module plugin, for MOD, S3M, etc],[test "x$HAVE_DUMB" = "xyes"]) PRINT_PLUGIN_INFO([shn],[SHN plugin based on xmms-shn],[test "x$HAVE_SHN" = "xyes"]) +PRINT_PLUGIN_INFO([mono2stereo],[mono2stereo DSP plugin],[test "x$HAVE_MONO2STEREO" = "xyes"]) echo @@ -717,6 +724,7 @@ plugins/converter/Makefile plugins/dumb/Makefile plugins/ao/Makefile plugins/shn/Makefile +plugins/mono2stereo/Makefile intl/Makefile po/Makefile.in deadbeef.desktop diff --git a/messagepump.h b/messagepump.h index 30f43c5e..b044b72c 100644 --- a/messagepump.h +++ b/messagepump.h @@ -19,7 +19,7 @@ #define __MESSAGEPUMP_H #include -#include +#include "deadbeef.h" int messagepump_init (void); void messagepump_free (void); diff --git a/plugins/ao/main.c b/plugins/ao/main.c index 18067410..a4da36d0 100644 --- a/plugins/ao/main.c +++ b/plugins/ao/main.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include "../../deadbeef.h" #include "ao.h" #include "eng_protos.h" diff --git a/plugins/ao/plugin.c b/plugins/ao/plugin.c index 65b3e1c8..dee8c4a6 100644 --- a/plugins/ao/plugin.c +++ b/plugins/ao/plugin.c @@ -18,7 +18,7 @@ */ #include #include -#include +#include "../../deadbeef.h" #include "ao.h" #include "eng_protos.h" diff --git a/plugins/dumb/cdumb.c b/plugins/dumb/cdumb.c index f947d94a..0ae7f4d4 100644 --- a/plugins/dumb/cdumb.c +++ b/plugins/dumb/cdumb.c @@ -23,7 +23,7 @@ #include #include "dumb.h" #include "internal/it.h" -#include +#include "../../deadbeef.h" //#define trace(...) { fprintf(stderr, __VA_ARGS__); } #define trace(fmt,...) diff --git a/plugins/mono2stereo/Makefile b/plugins/mono2stereo/Makefile deleted file mode 100644 index 0dceaa3a..00000000 --- a/plugins/mono2stereo/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -CC?=gcc - -CFLAGS+=-Wall -fPIC -D_GNU_SOURCE -std=c99 - -LDFLAGS+=-module -shared -lm - -SOURCES=mono2stereo.c - -OBJECTS=$(SOURCES:.c=.o) - -OUT?=ddb_mono2stereo.so - -all: $(SOURCES) $(OUT) - -$(OUT): $(OBJECTS) - $(CC) $(LDFLAGS) $(OBJECTS) -o $@ - -.c.o: - $(CC) $(CFLAGS) $< -c -o $@ - -clean: - rm $(OBJECTS) $(OUT) - diff --git a/plugins/mono2stereo/Makefile.am b/plugins/mono2stereo/Makefile.am new file mode 100644 index 00000000..ccbbf846 --- /dev/null +++ b/plugins/mono2stereo/Makefile.am @@ -0,0 +1,8 @@ +if HAVE_MONO2STEREO +pkglib_LTLIBRARIES = ddb_mono2stereo.la +ddb_mono2stereo_la_SOURCES = mono2stereo.c +ddb_mono2stereo_la_LDFLAGS = -module + +ddb_mono2stereo_la_LIBADD = $(LDADD) +AM_CFLAGS = $(CFLAGS) -std=c99 +endif diff --git a/plugins/mono2stereo/mono2stereo.c b/plugins/mono2stereo/mono2stereo.c index 23d0b0d5..66168bed 100644 --- a/plugins/mono2stereo/mono2stereo.c +++ b/plugins/mono2stereo/mono2stereo.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include "../../deadbeef.h" enum { M2S_PARAM_LEFTMIX, diff --git a/plugins/shn/shn.c b/plugins/shn/shn.c index 504f283c..c9d4acaf 100644 --- a/plugins/shn/shn.c +++ b/plugins/shn/shn.c @@ -23,7 +23,7 @@ #include #include #include "shorten.h" -#include +#include "../../deadbeef.h" #include "bitshift.h" //#define trace(...) { fprintf(stderr, __VA_ARGS__); } diff --git a/scripts/quickinstall.sh b/scripts/quickinstall.sh index 1681e2b2..0528ae7c 100755 --- a/scripts/quickinstall.sh +++ b/scripts/quickinstall.sh @@ -43,4 +43,4 @@ cp ./plugins/converter/.libs/converter_gtk2.so /usr/local/lib/deadbeef/ cp ./plugins/converter/.libs/converter_gtk3.so /usr/local/lib/deadbeef/ cp ./plugins/soundtouch/ddb_soundtouch.so /usr/local/lib/deadbeef/ cp ./plugins/vfs_zip/.libs/vfs_zip.so /usr/local/lib/deadbeef/ -cp ./plugins/mono2stereo/mono2stereo.so /usr/local/lib/deadbeef/ +cp ./plugins/mono2stereo/.libs/ddb_mono2stereo.so /usr/local/lib/deadbeef/ -- cgit v1.2.3 From aae1d98a73eb7441301af7f757fe96c6e088fc07 Mon Sep 17 00:00:00 2001 From: waker Date: Sun, 23 Oct 2011 18:56:40 +0200 Subject: shn compile fix --- plugins/shn/shn.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/shn/shn.h b/plugins/shn/shn.h index e7d3bba8..518334bc 100644 --- a/plugins/shn/shn.h +++ b/plugins/shn/shn.h @@ -28,7 +28,7 @@ #include #include #include -#include +#include "../../deadbeef.h" extern DB_functions_t *deadbeef; -- cgit v1.2.3 From ae1925da0c0efe560853ac48d0437c276d437e25 Mon Sep 17 00:00:00 2001 From: waker Date: Mon, 24 Oct 2011 20:53:30 +0200 Subject: aac: fixed filetype overriding bug --- plugins/aac/aac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/aac/aac.c b/plugins/aac/aac.c index f42b9d2f..db3280dd 100644 --- a/plugins/aac/aac.c +++ b/plugins/aac/aac.c @@ -598,7 +598,7 @@ aac_init (DB_fileinfo_t *_info, DB_playItem_t *it) { return -1; } trace("parse_aac_stream returned %x\n", offs); - deadbeef->pl_replace_meta (it, ":FILETYPE", "AAC"); + deadbeef->pl_replace_meta (it, "!FILETYPE", "AAC"); } if (offs >= 0) { -- cgit v1.2.3 From 7abd7ecec457f388d0f876650b1d1a0ffb3cff7f Mon Sep 17 00:00:00 2001 From: Tydus Date: Wed, 26 Oct 2011 00:40:02 +0800 Subject: Implemented extracting album art from FLAC metadata --- plugins/artwork/Makefile.am | 9 ++++-- plugins/artwork/artwork.c | 77 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/artwork/Makefile.am b/plugins/artwork/Makefile.am index 53cda944..74155a1c 100644 --- a/plugins/artwork/Makefile.am +++ b/plugins/artwork/Makefile.am @@ -12,6 +12,11 @@ else ARTWORK_DEPS=$(JPEG_DEPS_LIBS) $(PNG_DEPS_LIBS) endif -AM_CFLAGS = $(CFLAGS) $(ARTWORK_CFLAGS) -std=c99 -artwork_la_LIBADD = $(LDADD) $(ARTWORK_DEPS) +if HAVE_FLAC +FLAC_DEPS=$(FLAC_LIBS) +FLAC_CFLAGS=-DUSE_METAFLAC +endif + +AM_CFLAGS = $(CFLAGS) $(ARTWORK_CFLAGS) $(FLAC_CFLAGS) -std=c99 +artwork_la_LIBADD = $(LDADD) $(ARTWORK_DEPS) $(FLAC_DEPS) endif diff --git a/plugins/artwork/artwork.c b/plugins/artwork/artwork.c index 1ed09611..62503d86 100644 --- a/plugins/artwork/artwork.c +++ b/plugins/artwork/artwork.c @@ -25,6 +25,10 @@ static uintptr_t imlib_mutex; #include #endif +#ifdef USE_METAFLAC +#include +#endif + #define min(x,y) ((x)<(y)?(x):(y)) //#define trace(...) { fprintf(stderr, __VA_ARGS__); } @@ -958,6 +962,79 @@ fetcher_thread (void *none) deadbeef->fclose (fp); } } + +#ifdef USE_METAFLAC + { + // try to load embedded from flac metadata + FLAC__StreamMetadata *meta=NULL; + do{ + trace ("trying to load artwork flac metadata for %s\n", param->fname); + + if(!FLAC__metadata_get_picture( + param->fname, // filename + &meta, // picture + FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER, // type + NULL, // mime_type + NULL, // description + (unsigned)(-1), // max_width + (unsigned)(-1), // max_height + (unsigned)(-1), // max_depth + (unsigned)(-1) // max_colors + )){ + trace ("%s don't have an embedded cover\n",param->fname); + + if(!FLAC__metadata_get_picture( + param->fname, // filename + &meta, // picture + -1, // type + NULL, // mime_type + NULL, // description + (unsigned)(-1), // max_width + (unsigned)(-1), // max_height + (unsigned)(-1), // max_depth + (unsigned)(-1) // max_colors + )){ + trace ("%s don't have an embedded album art\n",param->fname); + break; + } + + } + FLAC__StreamMetadata_Picture *pic=&(meta->data.picture); + + trace ("found flac cover art of %d bytes (%s)\n", pic->data_length, pic->description); + char tmp_path[1024]; + char cache_path[1024]; + make_cache_path (cache_path, sizeof (cache_path), param->album, param->artist, -1); + trace ("will write flac cover art into %s\n", cache_path); + snprintf (tmp_path, sizeof (tmp_path), "%s.part", cache_path); + FILE *out = fopen (tmp_path, "w+b"); + if (!out) { + trace ("artwork: failed to open %s for writing\n", tmp_path); + break; + } + if (fwrite (pic->data, 1, pic->data_length, out) != pic->data_length) { + trace ("artwork: failed to write flac picture into %s\n", tmp_path); + fclose (out); + unlink (tmp_path); + break; + } + fclose (out); + int err = rename (tmp_path, cache_path); + if (err != 0) { + trace ("Failed not move %s to %s: %s\n", tmp_path, cache_path, strerror (err)); + unlink (tmp_path); + break; + } + unlink (tmp_path); + got_pic = 1; + }while(0); + + if(meta!=NULL){ + trace ("release flac metadata block\n"); + FLAC__metadata_object_delete(meta); + } + } +#endif } if (!got_pic && artwork_enable_local) { -- cgit v1.2.3 From 9e4a5021eb7bd880b90fde42b6b19bbeda7ffd01 Mon Sep 17 00:00:00 2001 From: waker Date: Thu, 3 Nov 2011 18:46:02 +0100 Subject: some formatting clean-up in artwork code --- plugins/artwork/artwork.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'plugins') diff --git a/plugins/artwork/artwork.c b/plugins/artwork/artwork.c index 62503d86..63861f0d 100644 --- a/plugins/artwork/artwork.c +++ b/plugins/artwork/artwork.c @@ -966,11 +966,11 @@ fetcher_thread (void *none) #ifdef USE_METAFLAC { // try to load embedded from flac metadata - FLAC__StreamMetadata *meta=NULL; - do{ + FLAC__StreamMetadata *meta = NULL; + do { trace ("trying to load artwork flac metadata for %s\n", param->fname); - if(!FLAC__metadata_get_picture( + if (!FLAC__metadata_get_picture ( param->fname, // filename &meta, // picture FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER, // type @@ -983,7 +983,7 @@ fetcher_thread (void *none) )){ trace ("%s don't have an embedded cover\n",param->fname); - if(!FLAC__metadata_get_picture( + if (!FLAC__metadata_get_picture ( param->fname, // filename &meta, // picture -1, // type @@ -999,7 +999,7 @@ fetcher_thread (void *none) } } - FLAC__StreamMetadata_Picture *pic=&(meta->data.picture); + FLAC__StreamMetadata_Picture *pic = &meta->data.picture; trace ("found flac cover art of %d bytes (%s)\n", pic->data_length, pic->description); char tmp_path[1024]; @@ -1027,11 +1027,11 @@ fetcher_thread (void *none) } unlink (tmp_path); got_pic = 1; - }while(0); + } while (0); - if(meta!=NULL){ + if (meta != NULL) { trace ("release flac metadata block\n"); - FLAC__metadata_object_delete(meta); + FLAC__metadata_object_delete (meta); } } #endif -- cgit v1.2.3