Projects
Multimedia
deadbeef
Sign Up
Log In
Username
Password
Problem getting expanded diff: bad link: conflict in file deadbeef.spec
×
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 3
View file
deadbeef.changes
Changed
@@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Sat Jun 4 16:16:16 UTC 2011 - andrea@opensuse.org + +- New upstream version 0.5.1 + +------------------------------------------------------------------- Mon May 16 09:02:32 UTC 2011 - andrea@opensuse.org - New upstream version 0.5.0
View file
deadbeef.spec
Changed
@@ -3,7 +3,7 @@ %bcond_with restricted Name: deadbeef -Version: 0.5.0 +Version: 0.5.1 Release: 1 Summary: GTK2 audio player Group: Productivity/Multimedia/Sound/Players
View file
deadbeef-0.5.0-fix-strcmp.patch
Added
@@ -0,0 +1,12 @@ +diff -uNr old-deadbeef-0.5.0/plugins/aac/aac.c deadbeef-0.5.0/plugins/aac/aac.c +--- old-deadbeef-0.5.0/plugins/aac/aac.c 2011-05-09 09:00:07.000000000 +0200 ++++ deadbeef-0.5.0/plugins/aac/aac.c 2011-05-22 11:33:52.256709089 +0200 +@@ -1256,7 +1256,7 @@ + MP4Close (mp4); + #endif + } +- else if (ftype == "aac") { ++ else if (strcmp(ftype, "aac") == 0) { + int apeerr = deadbeef->junk_apev2_read (it, fp); + int v2err = deadbeef->junk_id3v2_read (it, fp); + int v1err = deadbeef->junk_id3v1_read (it, fp);
View file
_link
Changed
@@ -1,4 +1,4 @@ -<link project="openSUSE.org:X11:lxde" package="deadbeef" baserev="b35f0447b73b99a94797bcf8a1d42260"> +<link project="openSUSE.org:X11:lxde" package="deadbeef" baserev="6f9878fb977f49bb3986a84124e3668a"> <patches> <branch/> </patches>
View file
deadbeef-0.5.0.tar.bz2/ChangeLog -> deadbeef-0.5.1.tar.bz2/ChangeLog
Changed
@@ -1,3 +1,32 @@ +version 0.5.1 + fixed crash bug after deleting playlists + fixed importing fb2k EQ presets + fixed bug causing garbage output when DSP plugins were changing channels count + added oggenc --ignorelength bug workaround to converter + added new mono2stereo DSP plugin + fixed numerous bugs in multichannel support, down/upmixing, sampleformat conversions, etc + fixed updating window titlebar after editing current track metadata + fixed wrong middle mouse button double-click reaction in tray icon + fixed scrobbling last track in "don't loop" mode + fixed shuffle albums mode when user starts album from the middle + added connection timeout to libmms to prevent several-minutes freezes on unresolved hosts + fixed inconsistent gui reaction when going from 1st track to previos in "don't loop" mode + removed -s option from bundled AAC encoder preset, for compatibility with older versions of FAAC + fixed multiple selection "sticking" when pressing left+right mouse buttons, or trying to play missing file + fixed syncing converter DSP preset list with the list from Preferences DSP tab + FLAC plugin can now play files which report zero size, but have samples in them + fixed playback of U8 wav files, and all the libsndfile formats that were not working in raw reading mode + added option (on by default) to convert 8 bit samples to 16 bit + added automatic samplerate option to SRC plugin + restored "use ALSA resampling" option in ALSA plugin + fixed several output format bugs in ALSA plugin + added support for creating directory tree in converter plugin (Jan D. Behrens) + set converter output folder to $HOME when it's empty + added new DSP plugin method "can_bypass", to detect when DSP plugins can be bypassed by streamer + improved check for multiple instances + fixed loading cuesheets from archives + added automatic resampler setup on 1st run with empty dsp chain, to simulate 0.4.4 behaviour + version 0.5.0 added support for multichannel output added support for output in 8,24,32,float32 bits per sample formats
View file
deadbeef-0.5.0.tar.bz2/configure -> deadbeef-0.5.1.tar.bz2/configure
Changed
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for deadbeef 0.5.0. +# Generated by GNU Autoconf 2.68 for deadbeef 0.5.1. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -627,8 +627,8 @@ # Identity of this package. PACKAGE_NAME='deadbeef' PACKAGE_TARNAME='deadbeef' -PACKAGE_VERSION='0.5.0' -PACKAGE_STRING='deadbeef 0.5.0' +PACKAGE_VERSION='0.5.1' +PACKAGE_STRING='deadbeef 0.5.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1617,7 +1617,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures deadbeef 0.5.0 to adapt to many kinds of systems. +\`configure' configures deadbeef 0.5.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1687,7 +1687,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of deadbeef 0.5.0:";; + short | recursive ) echo "Configuration of deadbeef 0.5.1:";; esac cat <<\_ACEOF @@ -1889,7 +1889,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -deadbeef configure 0.5.0 +deadbeef configure 0.5.1 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2607,7 +2607,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by deadbeef $as_me 0.5.0, which was +It was created by deadbeef $as_me 0.5.1, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -3430,7 +3430,7 @@ # Define the identity of the package. PACKAGE='deadbeef' - VERSION='0.5.0' + VERSION='0.5.1' cat >>confdefs.h <<_ACEOF @@ -25799,7 +25799,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by deadbeef $as_me 0.5.0, which was +This file was extended by deadbeef $as_me 0.5.1, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -25865,7 +25865,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -deadbeef config.status 0.5.0 +deadbeef config.status 0.5.1 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\"
View file
deadbeef-0.5.0.tar.bz2/configure.ac -> deadbeef-0.5.1.tar.bz2/configure.ac
Changed
@@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([deadbeef], [0.5.0]) +AC_INIT([deadbeef], [0.5.1]) AC_CONFIG_HEADER(config.h)
View file
deadbeef-0.5.0.tar.bz2/deadbeef.desktop -> deadbeef-0.5.1.tar.bz2/deadbeef.desktop
Changed
@@ -1,5 +1,4 @@ [Desktop Entry] -Encoding=UTF-8 Name=DeaDBeeF GenericName=Audio Player GenericName[pt_BR]=Reprodutor de áudio
View file
deadbeef-0.5.0.tar.bz2/deadbeef.desktop.in -> deadbeef-0.5.1.tar.bz2/deadbeef.desktop.in
Changed
@@ -1,5 +1,4 @@ [Desktop Entry] -Encoding=UTF-8 Name=DeaDBeeF GenericName=Audio Player GenericName[pt_BR]=Reprodutor de áudio
View file
deadbeef-0.5.0.tar.bz2/deadbeef.h -> deadbeef-0.5.1.tar.bz2/deadbeef.h
Changed
@@ -61,6 +61,8 @@ // api version history: // 9.9 -- devel +// 1.1 -- deadbeef-0.5.1 +// adds pass_through method to dsp plugins for optimization purposes // 1.0 -- deadbeef-0.5.0 // 0.10 -- deadbeef-0.4.4-portable-r1 (note: 0.4.4 uses api v0.9) // 0.9 -- deadbeef-0.4.3-portable-build3 @@ -74,7 +76,7 @@ // 0.1 -- deadbeef-0.2.0 #define DB_API_VERSION_MAJOR 1 -#define DB_API_VERSION_MINOR 0 +#define DB_API_VERSION_MINOR 1 #define DDB_PLUGIN_SET_API_VERSION\ .plugin.api_vmajor = DB_API_VERSION_MAJOR,\ @@ -212,7 +214,7 @@ ddb_event_t ev; DB_playItem_t *track; float playtime; // for SONGFINISHED event -- for how many seconds track was playing - time_t started_timestamp; // result of calling time(NULL) on playback start + time_t started_timestamp; // time when "track" started playing } ddb_event_track_t; typedef struct { @@ -220,7 +222,7 @@ DB_playItem_t *from; DB_playItem_t *to; float playtime; // for SONGCHANGED event -- for how many seconds prev track was playing - time_t started_timestamp; // result of calling time(NULL) on playback start + time_t started_timestamp; // time when "from" started playing } ddb_event_trackchange_t; typedef struct { @@ -986,6 +988,12 @@ // config dialog implementation uses set/get param, so they must be // implemented if this is nonzero const char *configdialog; + + // can_bypass is available since 1.1 api + // can be NULL + // should return 1 if the DSP plugin will not touch data with the current parameters; + // 0 otherwise + int (*can_bypass) (ddb_dsp_context_t *ctx, ddb_waveformat_t *fmt); } DB_dsp_t; // misc plugin
View file
deadbeef-0.5.0.tar.bz2/junklib.c -> deadbeef-0.5.1.tar.bz2/junklib.c
Changed
@@ -2999,6 +2999,7 @@ uint8_t *tag = malloc (size); if (!tag) { fprintf (stderr, "junklib: out of memory while reading id3v2, tried to alloc %d bytes\n", size); + goto error; } if (deadbeef->fread (tag, 1, size, fp) != size) { goto error; // bad size
View file
deadbeef-0.5.0.tar.bz2/main.c -> deadbeef-0.5.1.tar.bz2/main.c
Changed
@@ -421,6 +421,7 @@ switch (msg) { case DB_EV_REINIT_SOUND: plug_reinit_sound (); + streamer_reset (1); conf_save (); break; case DB_EV_TERMINATE: @@ -440,6 +441,12 @@ output->stop (); pl_playqueue_clear (); streamer_set_nextsong (p1, 1); + if (pl_get_order () == PLAYBACK_ORDER_SHUFFLE_ALBUMS) { + int pl = streamer_get_current_playlist (); + playlist_t *plt = plt_get_for_idx (pl); + plt_init_shuffle_albums (plt, p1); + plt_unref (plt); + } break; case DB_EV_STOP: streamer_set_nextsong (-2, 0); @@ -599,6 +606,8 @@ e--; } *e = 0; +#else + strcpy (dbinstalldir, PREFIX); #endif #ifdef __linux__ @@ -812,6 +821,11 @@ // } close(s); + // become a server + if (server_start () < 0) { + exit (-1); + } + // hack: report nowplaying if (!strcmp (cmdline, "--nowplaying")) { char nothing[] = "nothing"; @@ -819,7 +833,6 @@ return 0; } - pl_init (); conf_init (); conf_load (); // required by some plugins at startup @@ -850,10 +863,6 @@ } } - // become a server - if (server_start () < 0) { - exit (-1); - } #if 0 signal (SIGTERM, sigterm_handler); atexit (atexit_handler); // helps to save in simple cases
View file
deadbeef-0.5.0.tar.bz2/playlist.c -> deadbeef-0.5.1.tar.bz2/playlist.c
Changed
@@ -109,7 +109,7 @@ void pl_set_order (int order) { - if (pl_order != order && (pl_order == PLAYBACK_ORDER_SHUFFLE_TRACKS || PLAYBACK_ORDER_SHUFFLE_ALBUMS)) { + if (pl_order != order || pl_order == PLAYBACK_ORDER_SHUFFLE_TRACKS || pl_order == PLAYBACK_ORDER_SHUFFLE_ALBUMS) { pl_order = order; for (playlist_t *plt = playlists_head; plt; plt = plt->next) { plt_reshuffle (plt, NULL, NULL); @@ -274,6 +274,7 @@ void plt_unref (playlist_t *plt) { LOCK; + assert (plt->refc > 0); plt->refc--; if (plt->refc < 0) { trace ("\033[0;31mplaylist: bad refcount on playlist %p (%s)\033[37;0m\n", plt, plt->title); @@ -410,6 +411,7 @@ prev = p; p = p->next; } + streamer_notify_playlist_deleted (p); if (!plt_loading) { // move files (will decrease number of files by 1) for (int i = plt+1; i < playlists_count; i++) { @@ -603,7 +605,6 @@ void plt_free (playlist_t *plt) { LOCK; - streamer_notify_playlist_deleted (plt); plt_clear (plt); free (plt->title); @@ -1129,31 +1130,33 @@ char cuename[len+5]; strcpy (cuename, fname); strcpy (cuename+len, ".cue"); - FILE *fp = fopen (cuename, "rb"); + DB_FILE *fp = vfs_fopen (cuename); if (!fp) { char *ptr = cuename + len-1; while (ptr >= cuename && *ptr != '.') { ptr--; } strcpy (ptr+1, "cue"); - fp = fopen (cuename, "rb"); + fp = vfs_fopen (cuename); if (!fp) { return NULL; } } - fseek (fp, 0, SEEK_END); - size_t sz = ftell (fp); + size_t sz = vfs_fgetlength (fp); if (sz == 0) { - fclose (fp); + vfs_fclose (fp); return NULL; } - rewind (fp); - uint8_t buf[sz]; - if (fread (buf, 1, sz, fp) != sz) { - fclose (fp); + uint8_t *buf = alloca(sz); + if (!buf) { + vfs_fclose (fp); return NULL; } - fclose (fp); + if (vfs_fread (buf, 1, sz, fp) != sz) { + vfs_fclose (fp); + return NULL; + } + vfs_fclose (fp); return plt_insert_cue_from_buffer (plt, after, origin, buf, sz, numsamples, samplerate); } @@ -1936,6 +1939,7 @@ pl_item_alloc (void) { playItem_t *it = malloc (sizeof (playItem_t)); memset (it, 0, sizeof (playItem_t)); + it->_duration = -1; it->_refc = 1; return it; } @@ -2702,11 +2706,6 @@ } void -pl_reshuffle (playItem_t **ppmin, playItem_t **ppmax) { - plt_reshuffle (playlist, ppmin, ppmax); -} - -void plt_set_item_duration (playlist_t *playlist, playItem_t *it, float duration) { LOCK; if (it->in_playlist) { @@ -3872,3 +3871,25 @@ UNLOCK; return NULL; } + +// this function must be called user starts track manually in shuffle albums mode +// r is an index of current track +// mark previous songs in the album as played +void +plt_init_shuffle_albums (playlist_t *plt, int r) { + pl_lock (); + playItem_t *first = plt_get_item_for_idx (plt, r, PL_MAIN); + if (first->played) { + plt_reshuffle (plt, NULL, NULL); + } + if (first) { + int rating = first->shufflerating; + playItem_t *it = first->prev[PL_MAIN]; + pl_item_unref (first); + while (it && rating == it->shufflerating) { + it->played = 1; + it = it->prev[PL_MAIN]; + } + } + pl_unlock (); +}
View file
deadbeef-0.5.0.tar.bz2/playlist.h -> deadbeef-0.5.1.tar.bz2/playlist.h
Changed
@@ -304,9 +304,6 @@ void plt_reshuffle (playlist_t *playlist, playItem_t **ppmin, playItem_t **ppmax); -void -pl_reshuffle (playItem_t **ppmin, playItem_t **ppmax); - // required to calculate total playtime void plt_set_item_duration (playlist_t *playlist, playItem_t *it, float duration); @@ -437,4 +434,7 @@ playlist_t * pl_get_playlist (playItem_t *it); +void +plt_init_shuffle_albums (playlist_t *plt, int r); + #endif // __PLAYLIST_H
View file
deadbeef-0.5.0.tar.bz2/plugins.c -> deadbeef-0.5.1.tar.bz2/plugins.c
Changed
@@ -57,8 +57,8 @@ // deadbeef api static DB_functions_t deadbeef_api = { - .vmajor = 1, - .vminor = 0, + .vmajor = DB_API_VERSION_MAJOR, + .vminor = DB_API_VERSION_MINOR, .md5 = plug_md5, .md5_to_str = plug_md5_to_str, .md5_init = (void (*)(DB_md5_t *s))md5_init,
View file
deadbeef-0.5.0.tar.bz2/plugins/aac/aac.c -> deadbeef-0.5.1.tar.bz2/plugins/aac/aac.c
Changed
@@ -1314,7 +1314,8 @@ // define plugin interface static DB_decoder_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER,
View file
deadbeef-0.5.0.tar.bz2/plugins/adplug/Makefile.am -> deadbeef-0.5.1.tar.bz2/plugins/adplug/Makefile.am
Changed
@@ -4,10 +4,10 @@ adlibdir = $(libdir)/$(PACKAGE) pkglib_LTLIBRARIES = adplug.la -AM_CFLAGS = $(CFLAGS) -std=c99 -I$(adplugpath)/adplug -I$(adplugpath)/libbinio +AM_CFLAGS = $(CFLAGS) -std=c99 -I$(adplugpath)/adplug -I$(adplugpath)/libbinio -fPIC adplug_la_LDFLAGS = -module -nostdlib -lsupc++ -AM_CPPFLAGS = $(CXXFLAGS) -Dstricmp=strcasecmp -DVERSION=\"2.1\" -I$(adplugpath)/adplug -I$(adplugpath)/libbinio -fno-exceptions -fno-rtti -nostdlib -fno-unwind-tables +AM_CPPFLAGS = $(CXXFLAGS) -Dstricmp=strcasecmp -DVERSION=\"2.1\" -I$(adplugpath)/adplug -I$(adplugpath)/libbinio -fno-exceptions -fno-rtti -nostdlib -fno-unwind-tables -fPIC adplug_la_SOURCES = plugin.c\ adplug-db.cpp\
View file
deadbeef-0.5.0.tar.bz2/plugins/adplug/Makefile.in -> deadbeef-0.5.1.tar.bz2/plugins/adplug/Makefile.in
Changed
@@ -367,9 +367,9 @@ @HAVE_ADPLUG_TRUE@adplugpath = @top_srcdir@/plugins/adplug @HAVE_ADPLUG_TRUE@adlibdir = $(libdir)/$(PACKAGE) @HAVE_ADPLUG_TRUE@pkglib_LTLIBRARIES = adplug.la -@HAVE_ADPLUG_TRUE@AM_CFLAGS = $(CFLAGS) -std=c99 -I$(adplugpath)/adplug -I$(adplugpath)/libbinio +@HAVE_ADPLUG_TRUE@AM_CFLAGS = $(CFLAGS) -std=c99 -I$(adplugpath)/adplug -I$(adplugpath)/libbinio -fPIC @HAVE_ADPLUG_TRUE@adplug_la_LDFLAGS = -module -nostdlib -lsupc++ -@HAVE_ADPLUG_TRUE@AM_CPPFLAGS = $(CXXFLAGS) -Dstricmp=strcasecmp -DVERSION=\"2.1\" -I$(adplugpath)/adplug -I$(adplugpath)/libbinio -fno-exceptions -fno-rtti -nostdlib -fno-unwind-tables +@HAVE_ADPLUG_TRUE@AM_CPPFLAGS = $(CXXFLAGS) -Dstricmp=strcasecmp -DVERSION=\"2.1\" -I$(adplugpath)/adplug -I$(adplugpath)/libbinio -fno-exceptions -fno-rtti -nostdlib -fno-unwind-tables -fPIC @HAVE_ADPLUG_TRUE@adplug_la_SOURCES = plugin.c\ @HAVE_ADPLUG_TRUE@ adplug-db.cpp\ @HAVE_ADPLUG_TRUE@ libbinio/binfile.h\
View file
deadbeef-0.5.0.tar.bz2/plugins/adplug/plugin.c -> deadbeef-0.5.1.tar.bz2/plugins/adplug/plugin.c
Changed
@@ -45,7 +45,8 @@ // define plugin interface DB_decoder_t adplug_plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER,
View file
deadbeef-0.5.0.tar.bz2/plugins/alsa/alsa.c -> deadbeef-0.5.1.tar.bz2/plugins/alsa/alsa.c
Changed
@@ -23,8 +23,8 @@ #include "../../deadbeef.h" #include "../../config.h" -//#define trace(...) { fprintf(stderr, __VA_ARGS__); } -#define trace(fmt,...) +#define trace(...) { fprintf(stderr, __VA_ARGS__); } +//#define trace(fmt,...) #define min(x,y) ((x)<(y)?(x):(y)) @@ -52,33 +52,12 @@ static snd_pcm_uframes_t req_buffer_size; static snd_pcm_uframes_t req_period_size; +static int conf_alsa_resample = 1; static char conf_alsa_soundcard[100] = "default"; -//static snd_async_handler_t *pcm_callback; - static int palsa_callback (char *stream, int len); -#if 0 -static void -alsa_callback (snd_async_handler_t *pcm_callback) { - snd_pcm_t *pcm_handle = snd_async_handler_get_pcm(pcm_callback); - snd_pcm_sframes_t avail; - int err; - printf ("alsa_callback\n"); - - avail = snd_pcm_avail_update(pcm_handle); - while (avail >= period_size) { - char buf[avail * 4]; - palsa_callback (buf, avail * 4); - if ((err = snd_pcm_writei (pcm_handle, buf, period_size)) < 0) { - perror ("snd_pcm_writei"); - } - avail = snd_pcm_avail_update(pcm_handle); - } -} -#endif - static void palsa_thread (void *context); @@ -147,7 +126,6 @@ } snd_pcm_format_t sample_fmt; - switch (plugin.fmt.bps) { case 8: sample_fmt = SND_PCM_FORMAT_S8; @@ -182,7 +160,7 @@ #endif } break; - }; + } if ((err = snd_pcm_hw_params_set_format (audio, hw_params, sample_fmt)) < 0) { fprintf (stderr, "cannot set sample format (%s), trying all supported formats\n", snd_strerror (err)); @@ -228,7 +206,7 @@ int val = plugin.fmt.samplerate; int ret = 0; - if ((err = snd_pcm_hw_params_set_rate_resample (audio, hw_params, 1)) < 0) { + if ((err = snd_pcm_hw_params_set_rate_resample (audio, hw_params, conf_alsa_resample)) < 0) { fprintf (stderr, "cannot setup resampling (%s)\n", snd_strerror (err)); goto error; @@ -242,13 +220,24 @@ plugin.fmt.samplerate = val; trace ("chosen samplerate: %d Hz\n", val); - if ((err = snd_pcm_hw_params_set_channels (audio, hw_params, plugin.fmt.channels)) < 0) { + int chanmin, chanmax; + snd_pcm_hw_params_get_channels_min (hw_params, &chanmin); + snd_pcm_hw_params_get_channels_max (hw_params, &chanmax); + + trace ("minchan: %d, maxchan: %d\n", chanmin, chanmax); + int nchan = plugin.fmt.channels; + if (nchan > chanmax) { + nchan = chanmax; + } + else if (nchan < chanmin) { + nchan = chanmin; + } + trace ("setting chan=%d\n", nchan); + if ((err = snd_pcm_hw_params_set_channels (audio, hw_params, nchan)) < 0) { fprintf (stderr, "cannot set channel count (%s)\n", snd_strerror (err)); - goto error; } - int nchan; snd_pcm_hw_params_get_channels (hw_params, &nchan); trace ("alsa channels: %d\n", nchan); @@ -267,12 +256,6 @@ fprintf (stderr, "cannot set parameters (%s)\n", snd_strerror (err)); goto error; - -// if (plugin.fmt.channels > 2 && plugin.fmt.samplerate >= 96000) { -// plugin.fmt.samplerate = 48000; -// fprintf (stderr, "falling back to 48000KHz\n"); -// goto retry; -// } } plugin.fmt.is_float = 0; @@ -344,6 +327,7 @@ mutex = 0; // get and cache conf variables + conf_alsa_resample = deadbeef->conf_get_int ("alsa.resample", 1); deadbeef->conf_get_str ("alsa_soundcard", "default", conf_alsa_soundcard, sizeof (conf_alsa_soundcard)); trace ("alsa_soundcard: %s\n", conf_alsa_soundcard); @@ -469,7 +453,7 @@ snd_pcm_drop (audio); int ret = palsa_set_hw_params (fmt); if (ret < 0) { - trace ("palsa_change_rate: impossible to set requested format\n"); + trace ("palsa_setformat: impossible to set requested format\n"); // even if it failed -- copy the format memcpy (&plugin.fmt, fmt, sizeof (ddb_waveformat_t)); UNLOCK; @@ -698,11 +682,13 @@ static int alsa_configchanged (void) { deadbeef->conf_lock (); + int alsa_resample = deadbeef->conf_get_int ("alsa.resample", 1); const char *alsa_soundcard = deadbeef->conf_get_str_fast ("alsa_soundcard", "default"); int buffer = deadbeef->conf_get_int ("alsa.buffer", DEFAULT_BUFFER_SIZE); int period = deadbeef->conf_get_int ("alsa.period", DEFAULT_PERIOD_SIZE); if (audio && - (strcmp (alsa_soundcard, conf_alsa_soundcard) + (alsa_resample != conf_alsa_resample + || strcmp (alsa_soundcard, conf_alsa_soundcard) || buffer != req_buffer_size || period != req_period_size)) { trace ("alsa: config option changed, restarting\n"); @@ -773,6 +759,7 @@ } static const char settings_dlg[] = + "property \"Use ALSA resampling\" checkbox alsa.resample 1;\n" "property \"Release device while stopped\" checkbox alsa.freeonstop 0;\n" "property \"Preferred buffer size\" entry alsa.buffer " DEFAULT_BUFFER_SIZE_STR ";\n" "property \"Preferred period size\" entry alsa.period " DEFAULT_PERIOD_SIZE_STR ";\n" @@ -780,7 +767,8 @@ // define plugin interface static DB_output_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_OUTPUT,
View file
deadbeef-0.5.0.tar.bz2/plugins/artwork/artwork.c -> deadbeef-0.5.1.tar.bz2/plugins/artwork/artwork.c
Changed
@@ -141,10 +141,18 @@ queue_pop (void) { deadbeef->mutex_lock (mutex); cover_query_t *next = queue ? queue->next : NULL; - free (queue->fname); - free (queue->artist); - free (queue->album); - free (queue); + if (queue) { + if (queue->fname) { + free (queue->fname); + } + if (queue->artist) { + free (queue->artist); + } + if (queue->album) { + free (queue->album); + } + free (queue); + } queue = next; if (!queue) { queue_tail = NULL; @@ -1278,8 +1286,8 @@ // define plugin interface static DB_artwork_plugin_t plugin = { - .plugin.plugin.api_vmajor = DB_API_VERSION_MAJOR, - .plugin.plugin.api_vminor = DB_API_VERSION_MINOR, + .plugin.plugin.api_vmajor = 1, + .plugin.plugin.api_vminor = 0, .plugin.plugin.version_major = 1, .plugin.plugin.version_minor = 0, .plugin.plugin.type = DB_PLUGIN_MISC,
View file
deadbeef-0.5.0.tar.bz2/plugins/cdda/cdda.c -> deadbeef-0.5.1.tar.bz2/plugins/cdda/cdda.c
Changed
@@ -624,7 +624,8 @@ // define plugin interface static DB_decoder_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER,
View file
deadbeef-0.5.0.tar.bz2/plugins/converter/Makefile.am -> deadbeef-0.5.1.tar.bz2/plugins/converter/Makefile.am
Changed
@@ -1,8 +1,5 @@ if HAVE_CONVERTER -if STATICLINK -pkglib_LTLIBRARIES = converter.la converter_gtkui.la converter_gtkui.fallback.la -else pkglib_LTLIBRARIES = converter.la converter_gtkui.la convdatadir = $(libdir)/deadbeef/convpresets @@ -19,25 +16,21 @@ EXTRA_DIST = $(convdata_DATA) -endif - AM_CFLAGS = $(CFLAGS) -std=c99 -fPIC converter_la_SOURCES = converter.c converter.h converter_la_LDFLAGS = -module converter_gtkui_la_SOURCES = convgui.c interface.c support.c callbacks.h converter.h interface.h support.h converter_gtkui_la_LDFLAGS = -module -converter_gtkui_la_LIBADD = $(LDADD) $(GTKUI_DEPS_LIBS) -converter_gtkui_la_CFLAGS = -std=c99 $(GTKUI_DEPS_CFLAGS) -# fallback lib if STATICLINK GTK_ROOT=@top_srcdir@/$(LIB)/gtk-2.12.12/usr -converter_gtkui_fallback_la_SOURCES = convgui.c interface.c support.c callbacks.h converter.h interface.h support.h -converter_gtkui_fallback_la_LDFLAGS = -module -converter_gtkui_fallback_la_LIBADD = $(LDADD) -L$(GTK_ROOT)/lib $(GTK_ROOT)/lib/libgtk-x11-2.0.la $(GTK_ROOT)/lib/libgdk-x11-2.0.la $(GTK_ROOT)/lib/libpangoft2-1.0.la $(GTK_ROOT)/lib/libpangocairo-1.0.la $(GTK_ROOT)/lib/libgdk_pixbuf-2.0.la -lm $(GTK_ROOT)/lib/libcairo.la $(GTK_ROOT)/lib/libpango-1.0.la $(GTK_ROOT)/lib/libgobject-2.0.la $(GTK_ROOT)/lib/libgmodule-2.0.la $(GTK_ROOT)/lib/libgthread-2.0.la -lrt $(GTK_ROOT)/lib/libglib-2.0.la +converter_gtkui_la_LIBADD = $(LDADD) -L$(GTK_ROOT)/lib $(GTK_ROOT)/lib/libgtk-x11-2.0.la $(GTK_ROOT)/lib/libgdk-x11-2.0.la $(GTK_ROOT)/lib/libpangoft2-1.0.la $(GTK_ROOT)/lib/libpangocairo-1.0.la $(GTK_ROOT)/lib/libgdk_pixbuf-2.0.la -lm $(GTK_ROOT)/lib/libcairo.la $(GTK_ROOT)/lib/libpango-1.0.la $(GTK_ROOT)/lib/libgobject-2.0.la $(GTK_ROOT)/lib/libgmodule-2.0.la $(GTK_ROOT)/lib/libgthread-2.0.la -lrt $(GTK_ROOT)/lib/libglib-2.0.la -converter_gtkui_fallback_la_CFLAGS = -std=c99 -I $(GTK_ROOT)/include -I $(GTK_ROOT)/lib/gtk-2.0/include -I $(GTK_ROOT)/include/glib-2.0 -I $(GTK_ROOT)/include/gtk-2.0 -I $(GTK_ROOT)/include/cairo -I $(GTK_ROOT)/lib/glib-2.0/include/ -I $(GTK_ROOT)/include/pango-1.0 -I $(GTK_ROOT)/include/atk-1.0 -DULTRA_COMPATIBLE=1 +converter_gtkui_la_CFLAGS = -std=c99 -I $(GTK_ROOT)/include -I $(GTK_ROOT)/lib/gtk-2.0/include -I $(GTK_ROOT)/include/glib-2.0 -I $(GTK_ROOT)/include/gtk-2.0 -I $(GTK_ROOT)/include/cairo -I $(GTK_ROOT)/lib/glib-2.0/include/ -I $(GTK_ROOT)/include/pango-1.0 -I $(GTK_ROOT)/include/atk-1.0 -DULTRA_COMPATIBLE=1 +else +converter_gtkui_la_LIBADD = $(LDADD) $(GTKUI_DEPS_LIBS) +converter_gtkui_la_CFLAGS = -std=c99 $(GTKUI_DEPS_CFLAGS) endif
View file
deadbeef-0.5.0.tar.bz2/plugins/converter/Makefile.in -> deadbeef-0.5.1.tar.bz2/plugins/converter/Makefile.in
Changed
@@ -76,11 +76,11 @@ converter_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(converter_la_LDFLAGS) $(LDFLAGS) -o $@ -@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@am_converter_la_rpath = -rpath \ -@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@ $(pkglibdir) -@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@am_converter_la_rpath = -rpath \ -@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@ $(pkglibdir) -@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@converter_gtkui_fallback_la_DEPENDENCIES = $(GTK_ROOT)/lib/libgtk-x11-2.0.la \ +@HAVE_CONVERTER_TRUE@am_converter_la_rpath = -rpath $(pkglibdir) +am__DEPENDENCIES_1 = +@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@converter_gtkui_la_DEPENDENCIES = \ +@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@ $(am__DEPENDENCIES_1) +@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@converter_gtkui_la_DEPENDENCIES = $(GTK_ROOT)/lib/libgtk-x11-2.0.la \ @HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@ $(GTK_ROOT)/lib/libgdk-x11-2.0.la \ @HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@ $(GTK_ROOT)/lib/libpangoft2-1.0.la \ @HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@ $(GTK_ROOT)/lib/libpangocairo-1.0.la \ @@ -91,22 +91,6 @@ @HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@ $(GTK_ROOT)/lib/libgmodule-2.0.la \ @HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@ $(GTK_ROOT)/lib/libgthread-2.0.la \ @HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@ $(GTK_ROOT)/lib/libglib-2.0.la -am__converter_gtkui_fallback_la_SOURCES_DIST = convgui.c interface.c \ - support.c callbacks.h converter.h interface.h support.h -@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@am_converter_gtkui_fallback_la_OBJECTS = converter_gtkui_fallback_la-convgui.lo \ -@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@ converter_gtkui_fallback_la-interface.lo \ -@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@ converter_gtkui_fallback_la-support.lo -converter_gtkui_fallback_la_OBJECTS = \ - $(am_converter_gtkui_fallback_la_OBJECTS) -converter_gtkui_fallback_la_LINK = $(LIBTOOL) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(converter_gtkui_fallback_la_CFLAGS) $(CFLAGS) \ - $(converter_gtkui_fallback_la_LDFLAGS) $(LDFLAGS) -o $@ -@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@am_converter_gtkui_fallback_la_rpath = \ -@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@ -rpath $(pkglibdir) -am__DEPENDENCIES_1 = -@HAVE_CONVERTER_TRUE@converter_gtkui_la_DEPENDENCIES = \ -@HAVE_CONVERTER_TRUE@ $(am__DEPENDENCIES_1) am__converter_gtkui_la_SOURCES_DIST = convgui.c interface.c support.c \ callbacks.h converter.h interface.h support.h @HAVE_CONVERTER_TRUE@am_converter_gtkui_la_OBJECTS = \ @@ -118,10 +102,7 @@ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(converter_gtkui_la_CFLAGS) $(CFLAGS) \ $(converter_gtkui_la_LDFLAGS) $(LDFLAGS) -o $@ -@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@am_converter_gtkui_la_rpath = \ -@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@ -rpath $(pkglibdir) -@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@am_converter_gtkui_la_rpath = \ -@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@ -rpath $(pkglibdir) +@HAVE_CONVERTER_TRUE@am_converter_gtkui_la_rpath = -rpath $(pkglibdir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -135,11 +116,8 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(converter_la_SOURCES) \ - $(converter_gtkui_fallback_la_SOURCES) \ - $(converter_gtkui_la_SOURCES) +SOURCES = $(converter_la_SOURCES) $(converter_gtkui_la_SOURCES) DIST_SOURCES = $(am__converter_la_SOURCES_DIST) \ - $(am__converter_gtkui_fallback_la_SOURCES_DIST) \ $(am__converter_gtkui_la_SOURCES_DIST) DATA = $(convdata_DATA) ETAGS = etags @@ -361,35 +339,30 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@pkglib_LTLIBRARIES = converter.la converter_gtkui.la -@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@pkglib_LTLIBRARIES = converter.la converter_gtkui.la converter_gtkui.fallback.la -@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@convdatadir = $(libdir)/deadbeef/convpresets -@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@convdata_DATA = \ -@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@ presets/AAC_(Nero_FAAC).txt\ -@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@ presets/FLAC_(compression_level_5).txt\ -@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@ presets/MP3_CBR_320_Kbps_(Lame).txt\ -@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@ presets/MP3_VBR_192Kbps_(Lame).txt\ -@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@ presets/MS_RIFF_WAV.txt\ -@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@ presets/MusePack.txt\ -@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@ presets/Ogg_Vorbis_(-q_5).txt\ -@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@ presets/TTA.txt\ -@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@ presets/WavPack.txt - -@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@EXTRA_DIST = $(convdata_DATA) +@HAVE_CONVERTER_TRUE@pkglib_LTLIBRARIES = converter.la converter_gtkui.la +@HAVE_CONVERTER_TRUE@convdatadir = $(libdir)/deadbeef/convpresets +@HAVE_CONVERTER_TRUE@convdata_DATA = \ +@HAVE_CONVERTER_TRUE@ presets/AAC_(Nero_FAAC).txt\ +@HAVE_CONVERTER_TRUE@ presets/FLAC_(compression_level_5).txt\ +@HAVE_CONVERTER_TRUE@ presets/MP3_CBR_320_Kbps_(Lame).txt\ +@HAVE_CONVERTER_TRUE@ presets/MP3_VBR_192Kbps_(Lame).txt\ +@HAVE_CONVERTER_TRUE@ presets/MS_RIFF_WAV.txt\ +@HAVE_CONVERTER_TRUE@ presets/MusePack.txt\ +@HAVE_CONVERTER_TRUE@ presets/Ogg_Vorbis_(-q_5).txt\ +@HAVE_CONVERTER_TRUE@ presets/TTA.txt\ +@HAVE_CONVERTER_TRUE@ presets/WavPack.txt + +@HAVE_CONVERTER_TRUE@EXTRA_DIST = $(convdata_DATA) @HAVE_CONVERTER_TRUE@AM_CFLAGS = $(CFLAGS) -std=c99 -fPIC @HAVE_CONVERTER_TRUE@converter_la_SOURCES = converter.c converter.h @HAVE_CONVERTER_TRUE@converter_la_LDFLAGS = -module @HAVE_CONVERTER_TRUE@converter_gtkui_la_SOURCES = convgui.c interface.c support.c callbacks.h converter.h interface.h support.h @HAVE_CONVERTER_TRUE@converter_gtkui_la_LDFLAGS = -module -@HAVE_CONVERTER_TRUE@converter_gtkui_la_LIBADD = $(LDADD) $(GTKUI_DEPS_LIBS) -@HAVE_CONVERTER_TRUE@converter_gtkui_la_CFLAGS = -std=c99 $(GTKUI_DEPS_CFLAGS) - -# fallback lib @HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@GTK_ROOT = @top_srcdir@/$(LIB)/gtk-2.12.12/usr -@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@converter_gtkui_fallback_la_SOURCES = convgui.c interface.c support.c callbacks.h converter.h interface.h support.h -@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@converter_gtkui_fallback_la_LDFLAGS = -module -@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@converter_gtkui_fallback_la_LIBADD = $(LDADD) -L$(GTK_ROOT)/lib $(GTK_ROOT)/lib/libgtk-x11-2.0.la $(GTK_ROOT)/lib/libgdk-x11-2.0.la $(GTK_ROOT)/lib/libpangoft2-1.0.la $(GTK_ROOT)/lib/libpangocairo-1.0.la $(GTK_ROOT)/lib/libgdk_pixbuf-2.0.la -lm $(GTK_ROOT)/lib/libcairo.la $(GTK_ROOT)/lib/libpango-1.0.la $(GTK_ROOT)/lib/libgobject-2.0.la $(GTK_ROOT)/lib/libgmodule-2.0.la $(GTK_ROOT)/lib/libgthread-2.0.la -lrt $(GTK_ROOT)/lib/libglib-2.0.la -@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@converter_gtkui_fallback_la_CFLAGS = -std=c99 -I $(GTK_ROOT)/include -I $(GTK_ROOT)/lib/gtk-2.0/include -I $(GTK_ROOT)/include/glib-2.0 -I $(GTK_ROOT)/include/gtk-2.0 -I $(GTK_ROOT)/include/cairo -I $(GTK_ROOT)/lib/glib-2.0/include/ -I $(GTK_ROOT)/include/pango-1.0 -I $(GTK_ROOT)/include/atk-1.0 -DULTRA_COMPATIBLE=1 +@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@converter_gtkui_la_LIBADD = $(LDADD) $(GTKUI_DEPS_LIBS) +@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@converter_gtkui_la_LIBADD = $(LDADD) -L$(GTK_ROOT)/lib $(GTK_ROOT)/lib/libgtk-x11-2.0.la $(GTK_ROOT)/lib/libgdk-x11-2.0.la $(GTK_ROOT)/lib/libpangoft2-1.0.la $(GTK_ROOT)/lib/libpangocairo-1.0.la $(GTK_ROOT)/lib/libgdk_pixbuf-2.0.la -lm $(GTK_ROOT)/lib/libcairo.la $(GTK_ROOT)/lib/libpango-1.0.la $(GTK_ROOT)/lib/libgobject-2.0.la $(GTK_ROOT)/lib/libgmodule-2.0.la $(GTK_ROOT)/lib/libgthread-2.0.la -lrt $(GTK_ROOT)/lib/libglib-2.0.la +@HAVE_CONVERTER_TRUE@@STATICLINK_FALSE@converter_gtkui_la_CFLAGS = -std=c99 $(GTKUI_DEPS_CFLAGS) +@HAVE_CONVERTER_TRUE@@STATICLINK_TRUE@converter_gtkui_la_CFLAGS = -std=c99 -I $(GTK_ROOT)/include -I $(GTK_ROOT)/lib/gtk-2.0/include -I $(GTK_ROOT)/include/glib-2.0 -I $(GTK_ROOT)/include/gtk-2.0 -I $(GTK_ROOT)/include/cairo -I $(GTK_ROOT)/lib/glib-2.0/include/ -I $(GTK_ROOT)/include/pango-1.0 -I $(GTK_ROOT)/include/atk-1.0 -DULTRA_COMPATIBLE=1 all: all-am .SUFFIXES: @@ -457,8 +430,6 @@ done converter.la: $(converter_la_OBJECTS) $(converter_la_DEPENDENCIES) $(converter_la_LINK) $(am_converter_la_rpath) $(converter_la_OBJECTS) $(converter_la_LIBADD) $(LIBS) -converter_gtkui.fallback.la: $(converter_gtkui_fallback_la_OBJECTS) $(converter_gtkui_fallback_la_DEPENDENCIES) - $(converter_gtkui_fallback_la_LINK) $(am_converter_gtkui_fallback_la_rpath) $(converter_gtkui_fallback_la_OBJECTS) $(converter_gtkui_fallback_la_LIBADD) $(LIBS) converter_gtkui.la: $(converter_gtkui_la_OBJECTS) $(converter_gtkui_la_DEPENDENCIES) $(converter_gtkui_la_LINK) $(am_converter_gtkui_la_rpath) $(converter_gtkui_la_OBJECTS) $(converter_gtkui_la_LIBADD) $(LIBS) @@ -469,9 +440,6 @@ -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/converter.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/converter_gtkui_fallback_la-convgui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/converter_gtkui_fallback_la-interface.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/converter_gtkui_fallback_la-support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/converter_gtkui_la-convgui.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/converter_gtkui_la-interface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/converter_gtkui_la-support.Plo@am__quote@ @@ -497,27 +465,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< -converter_gtkui_fallback_la-convgui.lo: convgui.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(converter_gtkui_fallback_la_CFLAGS) $(CFLAGS) -MT converter_gtkui_fallback_la-convgui.lo -MD -MP -MF $(DEPDIR)/converter_gtkui_fallback_la-convgui.Tpo -c -o converter_gtkui_fallback_la-convgui.lo `test -f 'convgui.c' || echo '$(srcdir)/'`convgui.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/converter_gtkui_fallback_la-convgui.Tpo $(DEPDIR)/converter_gtkui_fallback_la-convgui.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='convgui.c' object='converter_gtkui_fallback_la-convgui.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(converter_gtkui_fallback_la_CFLAGS) $(CFLAGS) -c -o converter_gtkui_fallback_la-convgui.lo `test -f 'convgui.c' || echo '$(srcdir)/'`convgui.c - -converter_gtkui_fallback_la-interface.lo: interface.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(converter_gtkui_fallback_la_CFLAGS) $(CFLAGS) -MT converter_gtkui_fallback_la-interface.lo -MD -MP -MF $(DEPDIR)/converter_gtkui_fallback_la-interface.Tpo -c -o converter_gtkui_fallback_la-interface.lo `test -f 'interface.c' || echo '$(srcdir)/'`interface.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/converter_gtkui_fallback_la-interface.Tpo $(DEPDIR)/converter_gtkui_fallback_la-interface.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='interface.c' object='converter_gtkui_fallback_la-interface.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(converter_gtkui_fallback_la_CFLAGS) $(CFLAGS) -c -o converter_gtkui_fallback_la-interface.lo `test -f 'interface.c' || echo '$(srcdir)/'`interface.c - -converter_gtkui_fallback_la-support.lo: support.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(converter_gtkui_fallback_la_CFLAGS) $(CFLAGS) -MT converter_gtkui_fallback_la-support.lo -MD -MP -MF $(DEPDIR)/converter_gtkui_fallback_la-support.Tpo -c -o converter_gtkui_fallback_la-support.lo `test -f 'support.c' || echo '$(srcdir)/'`support.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/converter_gtkui_fallback_la-support.Tpo $(DEPDIR)/converter_gtkui_fallback_la-support.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='support.c' object='converter_gtkui_fallback_la-support.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(converter_gtkui_fallback_la_CFLAGS) $(CFLAGS) -c -o converter_gtkui_fallback_la-support.lo `test -f 'support.c' || echo '$(srcdir)/'`support.c - converter_gtkui_la-convgui.lo: convgui.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(converter_gtkui_la_CFLAGS) $(CFLAGS) -MT converter_gtkui_la-convgui.lo -MD -MP -MF $(DEPDIR)/converter_gtkui_la-convgui.Tpo -c -o converter_gtkui_la-convgui.lo `test -f 'convgui.c' || echo '$(srcdir)/'`convgui.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/converter_gtkui_la-convgui.Tpo $(DEPDIR)/converter_gtkui_la-convgui.Plo
View file
deadbeef-0.5.0.tar.bz2/plugins/converter/converter.c -> deadbeef-0.5.1.tar.bz2/plugins/converter/converter.c
Changed
@@ -29,8 +29,8 @@ #endif #define min(x,y) ((x)<(y)?(x):(y)) -#define trace(...) { fprintf(stderr, __VA_ARGS__); } -//#define trace(fmt,...) +//#define trace(...) { fprintf(stderr, __VA_ARGS__); } +#define trace(fmt,...) static ddb_converter_t plugin; static DB_functions_t *deadbeef; @@ -392,18 +392,18 @@ int BUFFER_SIZE = 1000; FILE *fin = fopen (in, "rb"); if (!fin) { - trace ("converter: failed to open file %s for reading\n", in); + fprintf (stderr, "converter: failed to open file %s for reading\n", in); return -1; } FILE *fout = fopen (out, "w+b"); if (!fout) { fclose (fin); - trace ("converter: failed to open file %s for writing\n", out); + fprintf (stderr, "converter: failed to open file %s for writing\n", out); return -1; } char *buf = malloc (BUFFER_SIZE); if (!buf) { - trace ("converter: failed to alloc %d bytes\n", BUFFER_SIZE); + fprintf (stderr, "converter: failed to alloc %d bytes\n", BUFFER_SIZE); fclose (fin); fclose (fout); return -1; @@ -416,11 +416,11 @@ while (sz > 0) { int rs = min (sz, BUFFER_SIZE); if (fread (buf, rs, 1, fin) != 1) { - trace ("converter: failed to read file %s\n", in); + fprintf (stderr, "converter: failed to read file %s\n", in); break; } if (fwrite (buf, rs, 1, fout) != 1) { - trace ("converter: failed to write file %s\n", out); + fprintf (stderr, "converter: failed to write file %s\n", out); break; } sz -= rs; @@ -631,22 +631,66 @@ to->next = from->next; } + static void -get_output_path (DB_playItem_t *it, const char *outfolder, const char *outfile, ddb_encoder_preset_t *encoder_preset, char *out, int sz) { - char fname[PATH_MAX]; +get_output_field (DB_playItem_t *it, const char *field, char *out, int sz) +{ int idx = deadbeef->pl_get_idx_of (it); - deadbeef->pl_format_title (it, idx, fname, sizeof (fname), -1, outfile); + deadbeef->pl_format_title (it, idx, out, sz, -1, field); + // replace invalid chars - char *p = fname; char invalid[] = "/\\?%*:|\"<>"; + char *p = out; + while (*p) { + if (strchr (invalid, *p)) { + *p = '_'; + } + p++; + } + trace ("field '%s' expanded to '%s'\n", field, out); +} + +static void +get_output_path (DB_playItem_t *it, const char *outfolder, const char *outfile, ddb_encoder_preset_t *encoder_preset, char *out, int sz) { + int l; + char fname[PATH_MAX]; + char *path = outfolder[0] ? strdupa (outfolder) : strdupa (getenv("HOME")); + char *pattern = strdupa (outfile); + + // replace invalid chars + char invalid[] = "?%*:|\"<>"; + char *p = path; while (*p) { if (strchr (invalid, *p)) { *p = '_'; } p++; } - snprintf (out, sz, "%s/%s.%s", outfolder, fname, encoder_preset->ext); + snprintf (out, sz, "%s/", path); + + // split path and create directories + char *field = pattern; + char *s = pattern; + while (*s) { + if ((*s == '/') || (*s == '\\')) { + *s = '\0'; + get_output_field (it, field, fname, sizeof(fname)); + + l = strlen (out); + snprintf (out+l, sz-l, "%s/", fname); + mkdir (out, 0755); + + field = s+1; + } + s++; + } + + // last part of outfile is the filename + get_output_field (it, field, fname, sizeof(fname)); + l = strlen (out); + snprintf (out+l, sz-l, "%s.%s", fname, encoder_preset->ext); + trace ("converter output file is '%s'\n", out); } int @@ -706,7 +750,7 @@ int len = sizeof (enc); while (e && *e) { if (len <= 0) { - fprintf (stderr, "converter: failed to assemble encoder command line - buffer is not big enough, try to shorten your parameters. max allowed length is %d characters\n", sizeof (enc)); + fprintf (stderr, "converter: failed to assemble encoder command line - buffer is not big enough, try to shorten your parameters. max allowed length is %lu characters\n", sizeof (enc)); goto error; } if (e[0] == '%' && e[1]) { @@ -734,7 +778,7 @@ } } - fprintf (stderr, "converter: will encode using: %s\n", enc); + fprintf (stderr, "converter: will encode using: %s\n", enc[0] ? enc : "internal RIFF WAVE writer"); if (!encoder_preset->encoder[0]) { // write to wave file @@ -858,12 +902,16 @@ memcpy (&wavehdr[34], &output_bps, 2); fwrite (wavehdr, 1, wavehdr_size, temp_file); + if (encoder_preset->method == DDB_ENCODER_METHOD_PIPE) { + size = 0; + } fwrite (&size, 1, sizeof (size), temp_file); header_written = 1; } - if (sz != fwrite (buffer, 1, sz, temp_file)) { - fprintf (stderr, "converter: write error\n"); + int64_t res = fwrite (buffer, 1, sz, temp_file); + if (sz != res) { + fprintf (stderr, "converter: write error (%lld bytes written out of %d)\n", res, sz); goto error; } } @@ -992,10 +1040,10 @@ // define plugin interface static ddb_converter_t plugin = { - .misc.plugin.api_vmajor = DB_API_VERSION_MAJOR, - .misc.plugin.api_vminor = DB_API_VERSION_MINOR, + .misc.plugin.api_vmajor = 1, + .misc.plugin.api_vminor = 0, .misc.plugin.version_major = 1, - .misc.plugin.version_minor = 0, + .misc.plugin.version_minor = 1, .misc.plugin.type = DB_PLUGIN_MISC, .misc.plugin.name = "Converter", .misc.plugin.id = "converter", @@ -1044,6 +1092,11 @@ .dsp_preset_replace = dsp_preset_replace, .get_output_path = get_output_path, .convert = convert, + // 1.1 entry points + .load_encoder_presets = load_encoder_presets, + .load_dsp_presets = load_dsp_presets, + .free_encoder_presets = free_encoder_presets, + .free_dsp_presets = free_dsp_presets, }; DB_plugin_t *
View file
deadbeef-0.5.0.tar.bz2/plugins/converter/converter.h -> deadbeef-0.5.1.tar.bz2/plugins/converter/converter.h
Changed
@@ -145,6 +145,18 @@ int (*convert) (DB_playItem_t *it, const char *outfolder, const char *outfile, int output_bps, int output_is_float, int preserve_folder_structure, const char *root_folder, ddb_encoder_preset_t *encoder_preset, ddb_dsp_preset_t *dsp_preset, int *abort); + ///////////////////////////// + // new APIs for converter-1.1 + ///////////////////////////// + + int + (*load_encoder_presets) (void); + int + (*load_dsp_presets) (void); + void + (*free_encoder_presets) (void); + void + (*free_dsp_presets) (void); } ddb_converter_t; #endif
View file
deadbeef-0.5.0.tar.bz2/plugins/converter/convgui.c -> deadbeef-0.5.1.tar.bz2/plugins/converter/convgui.c
Changed
@@ -355,6 +355,13 @@ static int converter_show (DB_plugin_action_t *act, DB_playItem_t *it) { + if (converter_plugin->misc.plugin.version_minor >= 1) { + // reload all presets + converter_plugin->free_encoder_presets (); + converter_plugin->load_encoder_presets (); + converter_plugin->free_dsp_presets (); + converter_plugin->load_dsp_presets (); + } // this can be called from non-gtk thread gdk_threads_add_idle (converter_show_cb, NULL); return 0; @@ -1267,16 +1274,21 @@ } DB_misc_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, - .plugin.version_minor = 0, + .plugin.version_minor = 1, .plugin.type = DB_PLUGIN_MISC, .plugin.name = "Converter GTK UI", .plugin.descr = "GTK2 User interface for the Converter plugin\n" "Usage:\n" "· select some tracks in playlist\n" "· right click\n" - "· select «Convert»", + "· select «Convert»\n\n" + "ChangeLog:\n" + "version 1.1\n" + " Reload DSP and encoder presets on every converter access\n" + " Write 0 wave data size into waveheader when using pipe, for oggenc compatibility\n", .plugin.copyright = "Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>\n" "\n"
View file
deadbeef-0.5.0.tar.bz2/plugins/converter/presets/AAC_(Nero_FAAC).txt -> deadbeef-0.5.1.tar.bz2/plugins/converter/presets/AAC_(Nero_FAAC).txt
Changed
@@ -1,6 +1,6 @@ title AAC (Nero FAAC) ext mp4 -encoder faac -w -s -o %o - +encoder faac -w -o %o - method 0 id3v2_version 0 tag_id3v2 0
View file
deadbeef-0.5.0.tar.bz2/plugins/dca/dcaplug.c -> deadbeef-0.5.1.tar.bz2/plugins/dca/dcaplug.c
Changed
@@ -721,7 +721,8 @@ // define plugin interface static DB_decoder_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER,
View file
deadbeef-0.5.0.tar.bz2/plugins/dsp_libsrc/src.c -> deadbeef-0.5.1.tar.bz2/plugins/dsp_libsrc/src.c
Changed
@@ -39,6 +39,7 @@ int channels; int quality; float samplerate; + int autosamplerate; SRC_STATE *src; SRC_DATA srcdata; int remaining; // number of input samples in SRC buffer @@ -85,10 +86,32 @@ } int +ddb_src_can_bypass (ddb_dsp_context_t *_src, ddb_waveformat_t *fmt) { + ddb_src_libsamplerate_t *src = (ddb_src_libsamplerate_t*)_src; + + float samplerate = src->samplerate; + if (src->autosamplerate) { + DB_output_t *output = deadbeef->get_output (); + samplerate = output->fmt.samplerate; + } + + if (fmt->samplerate == samplerate) { + return 1; + } + return 0; +} + +int ddb_src_process (ddb_dsp_context_t *_src, float *samples, int nframes, int maxframes, ddb_waveformat_t *fmt, float *r) { ddb_src_libsamplerate_t *src = (ddb_src_libsamplerate_t*)_src; - if (fmt->samplerate == src->samplerate) { + float samplerate = src->samplerate; + if (src->autosamplerate) { + DB_output_t *output = deadbeef->get_output (); + samplerate = output->fmt.samplerate; + } + + if (fmt->samplerate == samplerate) { return nframes; } @@ -104,9 +127,9 @@ src->need_reset = 0; } - float ratio = src->samplerate / fmt->samplerate; + float ratio = samplerate / fmt->samplerate; ddb_src_set_ratio (_src, ratio); - fmt->samplerate = src->samplerate; + fmt->samplerate = samplerate; int numoutframes = 0; int outsize = nframes*24; @@ -149,7 +172,7 @@ if (src_err) { const char *err = src_strerror (src_err) ; fprintf (stderr, "src_process error %s\n" - "srcdata.data_in=%p, srcdata.data_out=%p, srcdata.input_frames=%d, srcdata.output_frames=%d, srcdata.src_ratio=%f", err, src->srcdata.data_in, src->srcdata.data_out, (int)src->srcdata.input_frames, (int)src->srcdata.output_frames, src->srcdata.src_ratio); + "srcdata.data_in=%p, srcdata.data_out=%p, srcdata.input_frames=%d, srcdata.output_frames=%d, srcdata.src_ratio=%f\n", err, src->srcdata.data_in, src->srcdata.data_out, (int)src->srcdata.input_frames, (int)src->srcdata.output_frames, src->srcdata.src_ratio); return nframes; } @@ -177,7 +200,7 @@ //} //fwrite (input, 1, numoutframes*sizeof(float)*(*nchannels), out); - fmt->samplerate = src->samplerate; + fmt->samplerate = samplerate; trace ("src: ratio=%f, in=%d, out=%d\n", ratio, nframes, numoutframes); return numoutframes; } @@ -194,6 +217,8 @@ return "Quality"; case SRC_PARAM_SAMPLERATE: return "Samplerate"; + case SRC_PARAM_AUTOSAMPLERATE: + return "Auto samplerate"; default: fprintf (stderr, "ddb_src_get_param_name: invalid param index (%d)\n", p); } @@ -215,6 +240,9 @@ ((ddb_src_libsamplerate_t*)ctx)->quality = atoi (val); ((ddb_src_libsamplerate_t*)ctx)->quality_changed = 1; break; + case SRC_PARAM_AUTOSAMPLERATE: + ((ddb_src_libsamplerate_t*)ctx)->autosamplerate = atoi (val); + break; default: fprintf (stderr, "ddb_src_set_param: invalid param index (%d)\n", p); } @@ -229,24 +257,29 @@ case SRC_PARAM_QUALITY: snprintf (val, sz, "%d", ((ddb_src_libsamplerate_t*)ctx)->quality); break; + case SRC_PARAM_AUTOSAMPLERATE: + snprintf (val, sz, "%d", ((ddb_src_libsamplerate_t*)ctx)->autosamplerate); + break; default: fprintf (stderr, "ddb_src_get_param: invalid param index (%d)\n", p); } } static const char settings_dlg[] = + "property \"Automatic Samplerate (overrides Target Samplerate)\" checkbox 2 0;\n" "property \"Target Samplerate\" spinbtn[8192,192000,1] 0 48000;\n" "property \"Quality / Algorythm\" select[5] 1 2 SINC_BEST_QUALITY SINC_MEDIUM_QUALITY SINC_FASTEST ZERO_ORDER_HOLD LINEAR;\n" ; static DB_dsp_t plugin = { - .plugin.api_vmajor = DB_API_VERSION_MAJOR, - .plugin.api_vminor = DB_API_VERSION_MINOR, + // need 1.1 api for pass_through + .plugin.api_vmajor = 1, + .plugin.api_vminor = 1, .open = ddb_src_open, .close = ddb_src_close, .process = ddb_src_process, - .plugin.version_major = 0, - .plugin.version_minor = 1, + .plugin.version_major = 1, + .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DSP, .plugin.id = "SRC", .plugin.name = "Resampler (Secret Rabbit Code)", @@ -275,6 +308,7 @@ .get_param = ddb_src_get_param, .reset = ddb_src_reset, .configdialog = settings_dlg, + .can_bypass = ddb_src_can_bypass, }; DB_plugin_t *
View file
deadbeef-0.5.0.tar.bz2/plugins/dsp_libsrc/src.h -> deadbeef-0.5.1.tar.bz2/plugins/dsp_libsrc/src.h
Changed
@@ -22,6 +22,7 @@ enum { SRC_PARAM_SAMPLERATE = 0, SRC_PARAM_QUALITY = 1, + SRC_PARAM_AUTOSAMPLERATE = 2, SRC_PARAM_COUNT };
View file
deadbeef-0.5.0.tar.bz2/plugins/ffap/ffap.c -> deadbeef-0.5.1.tar.bz2/plugins/ffap/ffap.c
Changed
@@ -1959,7 +1959,8 @@ // define plugin interface static DB_decoder_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER,
View file
deadbeef-0.5.0.tar.bz2/plugins/ffmpeg/ffmpeg.c -> deadbeef-0.5.1.tar.bz2/plugins/ffmpeg/ffmpeg.c
Changed
@@ -526,7 +526,6 @@ int totalsamples = fctx->duration * samplerate / AV_TIME_BASE; DB_playItem_t *it = deadbeef->pl_item_alloc_init (fname, plugin.plugin.id); - // FIXME: get proper codec deadbeef->pl_replace_meta (it, ":FILETYPE", codec->name); if (!deadbeef->is_local_file (deadbeef->pl_find_meta (it, ":URI"))) { @@ -778,7 +777,8 @@ // define plugin interface static DB_decoder_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 2, .plugin.type = DB_PLUGIN_DECODER,
View file
deadbeef-0.5.0.tar.bz2/plugins/flac/flac.c -> deadbeef-0.5.1.tar.bz2/plugins/flac/flac.c
Changed
@@ -294,7 +294,8 @@ } int64_t totalsamples = FLAC__stream_decoder_get_total_samples (info->decoder); if (totalsamples <= 0) { - return -1; + trace ("flac: totalsamples=%lld\n", totalsamples); +// return -1; } float sec = totalsamples / (float)_info->fmt.samplerate; if (sec > 0) { @@ -358,11 +359,13 @@ cflac_read (DB_fileinfo_t *_info, char *bytes, int size) { flac_info_t *info = (flac_info_t *)_info; int samplesize = _info->fmt.channels * _info->fmt.bps / 8; - if (size / samplesize + info->currentsample > info->endsample) { - size = (info->endsample - info->currentsample + 1) * samplesize; - trace ("size truncated to %d bytes, cursample=%d, endsample=%d\n", size, info->currentsample, info->endsample); - if (size <= 0) { - return 0; + if (info->endsample >= 0) { + if (size / samplesize + info->currentsample > info->endsample) { + size = (info->endsample - info->currentsample + 1) * samplesize; + trace ("size truncated to %d bytes, cursample=%d, endsample=%d\n", size, info->currentsample, info->endsample); + if (size <= 0) { + return 0; + } } } int initsize = size; @@ -584,7 +587,12 @@ _info->fmt.channels = metadata->data.stream_info.channels; _info->fmt.bps = metadata->data.stream_info.bits_per_sample; info->totalsamples = metadata->data.stream_info.total_samples; - deadbeef->plt_set_item_duration (info->plt, it, metadata->data.stream_info.total_samples / (float)metadata->data.stream_info.sample_rate); + if (metadata->data.stream_info.total_samples > 0) { + deadbeef->plt_set_item_duration (info->plt, it, metadata->data.stream_info.total_samples / (float)metadata->data.stream_info.sample_rate); + } + else { + deadbeef->plt_set_item_duration (info->plt, it, -1); + } } else if (metadata->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) { const FLAC__StreamMetadata_VorbisComment *vc = &metadata->data.vorbis_comment; @@ -925,7 +933,8 @@ // define plugin interface static DB_decoder_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER, @@ -954,7 +963,6 @@ .init = cflac_init, .free = cflac_free, .read = cflac_read, -// .read_float32 = cflac_read_float32, .seek = cflac_seek, .seek_sample = cflac_seek_sample, .insert = cflac_insert,
View file
deadbeef-0.5.0.tar.bz2/plugins/gme/cgme.c -> deadbeef-0.5.1.tar.bz2/plugins/gme/cgme.c
Changed
@@ -408,7 +408,8 @@ // define plugin interface static DB_decoder_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER,
View file
deadbeef-0.5.0.tar.bz2/plugins/gtkui/callbacks.c -> deadbeef-0.5.1.tar.bz2/plugins/gtkui/callbacks.c
Changed
@@ -1232,4 +1232,3 @@ gtk_widget_destroy (dlg); dlg = NULL; } -
View file
deadbeef-0.5.0.tar.bz2/plugins/gtkui/callbacks.h -> deadbeef-0.5.1.tar.bz2/plugins/gtkui/callbacks.h
Changed
@@ -1151,3 +1151,7 @@ void on_sort_by_custom_activate (GtkMenuItem *menuitem, gpointer user_data); + +void +on_convert8to16_toggled (GtkToggleButton *togglebutton, + gpointer user_data);
View file
deadbeef-0.5.0.tar.bz2/plugins/gtkui/ddblistview.c -> deadbeef-0.5.1.tar.bz2/plugins/gtkui/ddblistview.c
Changed
@@ -18,9 +18,6 @@ #ifdef HAVE_CONFIG_H # include "../../config.h" #endif -#if HAVE_NOTIFY -#include <libnotify/notify.h> -#endif #include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> @@ -1330,20 +1327,10 @@ if (it == sel_it) { if (!selected) { deadbeef->pl_set_selected (it, 1); -// if (nchanged < NUM_CHANGED_ROWS_BEFORE_FULL_REDRAW) { -// ddb_listview_draw_row (ps, idx, it); -// ps->binding->selection_changed (it, idx); -// } -// nchanged++; } } else if (selected) { deadbeef->pl_set_selected (it, 0); -// if (nchanged < NUM_CHANGED_ROWS_BEFORE_FULL_REDRAW) { -// ddb_listview_draw_row (ps, idx, it); -// ps->binding->selection_changed (it, idx); -// } -// nchanged++; } DB_playItem_t *next = deadbeef->pl_get_next (it, PL_MAIN); UNREF (it); @@ -1353,10 +1340,8 @@ UNREF (sel_it); deadbeef->pl_unlock (); - if (nchanged >= NUM_CHANGED_ROWS_BEFORE_FULL_REDRAW, 1) { - ddb_listview_refresh (ps, DDB_REFRESH_LIST); - ps->binding->selection_changed (NULL, -1); // that means "selection changed a lot, redraw everything" - } + ddb_listview_refresh (ps, DDB_REFRESH_LIST); + ps->binding->selection_changed (NULL, -1); // that means "selection changed a lot, redraw everything" ps->area_selection_start = sel; ps->area_selection_end = sel; } @@ -1364,6 +1349,7 @@ void ddb_listview_click_selection (DdbListview *ps, int ex, int ey, DdbListviewGroup *grp, int grp_index, int sel, int dnd) { deadbeef->pl_lock (); + ps->areaselect = 0; ddb_listview_groupcheck (ps); if (sel == -1 && (!grp || grp_index >= grp->num_items)) { // clicked empty space, deselect everything
View file
deadbeef-0.5.0.tar.bz2/plugins/gtkui/deadbeef.glade -> deadbeef-0.5.1.tar.bz2/plugins/gtkui/deadbeef.glade
Changed
@@ -2540,6 +2540,26 @@ <property name="fill">False</property> </packing> </child> + + <child> + <widget class="GtkCheckButton" id="convert8to16"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Always convert 8 bit audio to 16 bit</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_convert8to16_toggled" last_modification_time="Fri, 20 May 2011 18:56:52 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> </widget> <packing> <property name="tab_expand">False</property>
View file
deadbeef-0.5.0.tar.bz2/plugins/gtkui/dspconfig.c -> deadbeef-0.5.1.tar.bz2/plugins/gtkui/dspconfig.c
Changed
@@ -273,8 +273,7 @@ gtk_list_store_clear (mdl); fill_dsp_chain (mdl); GtkTreePath *path = gtk_tree_path_new_from_indices (idx, -1); - GtkTreeViewColumn *col; - gtk_tree_view_set_cursor (GTK_TREE_VIEW (list), path, col, FALSE); + gtk_tree_view_set_cursor (GTK_TREE_VIEW (list), path, NULL, FALSE); gtk_tree_path_free (path); update_streamer (); } @@ -396,8 +395,7 @@ return; } GtkTreePath *path = gtk_tree_path_new_from_indices (idx-1, -1); - GtkTreeViewColumn *col; - gtk_tree_view_set_cursor (GTK_TREE_VIEW (list), path, col, FALSE); + gtk_tree_view_set_cursor (GTK_TREE_VIEW (list), path, NULL, FALSE); gtk_tree_path_free (path); update_streamer (); } @@ -417,8 +415,7 @@ return; } GtkTreePath *path = gtk_tree_path_new_from_indices (idx+1, -1); - GtkTreeViewColumn *col; - gtk_tree_view_set_cursor (GTK_TREE_VIEW (list), path, col, FALSE); + gtk_tree_view_set_cursor (GTK_TREE_VIEW (list), path, NULL, FALSE); gtk_tree_path_free (path); update_streamer (); }
View file
deadbeef-0.5.0.tar.bz2/plugins/gtkui/eq.c -> deadbeef-0.5.1.tar.bz2/plugins/gtkui/eq.c
Changed
@@ -291,7 +291,7 @@ ddb_equalizer_set_preamp (DDB_EQUALIZER (eqwin), 0); for (int i = 0; i < 18; i++) { ddb_equalizer_set_band (DDB_EQUALIZER (eqwin), i, vals[i]); - set_param (eq, i+1, amp_to_db (vals[i])); + set_param (eq, i+1, vals[i]); } gdk_window_invalidate_rect (eqwin->window, NULL, FALSE); deadbeef->conf_save ();
View file
deadbeef-0.5.0.tar.bz2/plugins/gtkui/gtkui.c -> deadbeef-0.5.1.tar.bz2/plugins/gtkui/gtkui.c
Changed
@@ -312,7 +312,7 @@ if (event->button == 1 && event->type == GDK_BUTTON_PRESS) { mainwin_toggle_visible (); } - else if (event->button == 2) { + else if (event->button == 2 && event->type == GDK_BUTTON_PRESS) { deadbeef->sendmessage (DB_EV_TOGGLE_PAUSE, 0, 0, 0); } return FALSE; @@ -413,9 +413,8 @@ } } -static gboolean -trackinfochanged_cb (gpointer data) { - DB_playItem_t *track = (DB_playItem_t *)data; +void +gtkui_trackinfochanged (DB_playItem_t *track) { GtkWidget *playlist = lookup_widget (mainwin, "playlist"); trackinfochanged_wrapper (DDB_LISTVIEW (playlist), track, PL_MAIN); @@ -431,8 +430,13 @@ if (curr) { deadbeef->pl_item_unref (curr); } - if (track) { - deadbeef->pl_item_unref (track); +} + +static gboolean +trackinfochanged_cb (gpointer data) { + gtkui_trackinfochanged (data); + if (data) { + deadbeef->pl_item_unref ((DB_playItem_t *)data); } return FALSE; } @@ -1334,8 +1338,8 @@ // define plugin interface static ddb_gtkui_t plugin = { - .gui.plugin.api_vmajor = DB_API_VERSION_MAJOR, - .gui.plugin.api_vminor = DB_API_VERSION_MINOR, + .gui.plugin.api_vmajor = 1, + .gui.plugin.api_vminor = 0, .gui.plugin.version_major = 1, .gui.plugin.version_minor = 0, .gui.plugin.type = DB_PLUGIN_MISC,
View file
deadbeef-0.5.0.tar.bz2/plugins/gtkui/gtkui.h -> deadbeef-0.5.1.tar.bz2/plugins/gtkui/gtkui.h
Changed
@@ -169,4 +169,7 @@ int gtkui_get_curr_playlist_mod (void); +void +gtkui_trackinfochanged (DB_playItem_t *it); + #endif
View file
deadbeef-0.5.0.tar.bz2/plugins/gtkui/interface.c -> deadbeef-0.5.1.tar.bz2/plugins/gtkui/interface.c
Changed
@@ -1655,6 +1655,7 @@ GtkWidget *hbox12; GtkWidget *label4; GtkWidget *pref_soundcard; + GtkWidget *convert8to16; GtkWidget *Sound; GtkWidget *vbox8; GtkWidget *hbox10; @@ -1837,6 +1838,10 @@ gtk_widget_show (pref_soundcard); gtk_box_pack_start (GTK_BOX (hbox12), pref_soundcard, TRUE, TRUE, 0); + convert8to16 = gtk_check_button_new_with_mnemonic (_("Always convert 8 bit audio to 16 bit")); + gtk_widget_show (convert8to16); + gtk_box_pack_start (GTK_BOX (vbox10), convert8to16, FALSE, FALSE, 0); + Sound = gtk_label_new (_("Sound")); gtk_widget_show (Sound); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 0), Sound); @@ -2517,6 +2522,9 @@ g_signal_connect ((gpointer) prefwin, "realize", G_CALLBACK (on_prefwin_realize), NULL); + g_signal_connect ((gpointer) convert8to16, "toggled", + G_CALLBACK (on_convert8to16_toggled), + NULL); g_signal_connect ((gpointer) pref_replaygain_mode, "changed", G_CALLBACK (on_pref_replaygain_mode_changed), NULL); @@ -2679,6 +2687,7 @@ GLADE_HOOKUP_OBJECT (prefwin, hbox12, "hbox12"); GLADE_HOOKUP_OBJECT (prefwin, label4, "label4"); GLADE_HOOKUP_OBJECT (prefwin, pref_soundcard, "pref_soundcard"); + GLADE_HOOKUP_OBJECT (prefwin, convert8to16, "convert8to16"); GLADE_HOOKUP_OBJECT (prefwin, Sound, "Sound"); GLADE_HOOKUP_OBJECT (prefwin, vbox8, "vbox8"); GLADE_HOOKUP_OBJECT (prefwin, hbox10, "hbox10");
View file
deadbeef-0.5.0.tar.bz2/plugins/gtkui/plcommon.c -> deadbeef-0.5.1.tar.bz2/plugins/gtkui/plcommon.c
Changed
@@ -364,7 +364,7 @@ } // For single-track actions just invoke it with first selected track - if (0 == action->flags & DB_ACTION_ALLOW_MULTIPLE_TRACKS) + if (!(action->flags & DB_ACTION_ALLOW_MULTIPLE_TRACKS)) { DB_playItem_t *it = deadbeef->pl_get_for_idx_and_iter (clicked_idx, PL_MAIN); action->callback (action, it);
View file
deadbeef-0.5.0.tar.bz2/plugins/gtkui/prefwin.c -> deadbeef-0.5.1.tar.bz2/plugins/gtkui/prefwin.c
Changed
@@ -500,6 +500,9 @@ // replaygain_preamp gtk_range_set_value (GTK_RANGE (lookup_widget (w, "replaygain_preamp")), deadbeef->conf_get_int ("replaygain_preamp", 0)); + // 8_to_16 + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (lookup_widget (w, "convert8to16")), deadbeef->conf_get_int ("streamer.8_to_16", 1)); + // dsp dsp_setup_init (prefwin); @@ -1341,3 +1344,13 @@ deadbeef->conf_set_int ("ignore_archives", gtk_toggle_button_get_active (togglebutton)); } + + +void +on_convert8to16_toggled (GtkToggleButton *togglebutton, + gpointer user_data) +{ + deadbeef->conf_set_int ("streamer.8_to_16", gtk_toggle_button_get_active (togglebutton)); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); +} +
View file
deadbeef-0.5.0.tar.bz2/plugins/gtkui/trkproperties.c -> deadbeef-0.5.1.tar.bz2/plugins/gtkui/trkproperties.c
Changed
@@ -582,6 +582,13 @@ gtk_tree_model_foreach (model, set_metadata_cb, NULL); deadbeef->pl_unlock (); + for (int i = 0; i < numtracks; i++) { + ddb_event_track_t *ev = (ddb_event_track_t *)deadbeef->event_alloc (DB_EV_TRACKINFOCHANGED); + ev->track = tracks[i]; + deadbeef->pl_item_ref (ev->track); + deadbeef->event_send ((ddb_event_t*)ev, 0, 0); + } + progress_aborted = 0; progressdlg = create_progressdlg (); gtk_window_set_title (GTK_WINDOW (progressdlg), _("Writing tags..."));
View file
deadbeef-0.5.0.tar.bz2/plugins/hotkeys/hotkeys.c -> deadbeef-0.5.1.tar.bz2/plugins/hotkeys/hotkeys.c
Changed
@@ -127,12 +127,12 @@ trace ("No tracks selected\n"); return; } - if ((selected_count == 1) && (0 == action->flags & DB_ACTION_SINGLE_TRACK)) + if ((selected_count == 1) && (!(action->flags & DB_ACTION_SINGLE_TRACK))) { trace ("Hotkeys: action %s not allowed for single track\n", action->name); return; } - if ((selected_count > 1) && (0 == action->flags & DB_ACTION_ALLOW_MULTIPLE_TRACKS)) + if ((selected_count > 1) && (!(action->flags & DB_ACTION_ALLOW_MULTIPLE_TRACKS))) { trace ("Hotkeys: action %s not allowed for multiple tracks\n", action->name); return; @@ -614,14 +614,14 @@ // define plugin interface static DB_hotkeys_plugin_t plugin = { - .misc.plugin.api_vmajor = DB_API_VERSION_MAJOR, - .misc.plugin.api_vminor = DB_API_VERSION_MINOR, + .misc.plugin.api_vmajor = 1, + .misc.plugin.api_vminor = 0, .misc.plugin.version_major = 1, .misc.plugin.version_minor = 0, .misc.plugin.type = DB_PLUGIN_MISC, .misc.plugin.id = "hotkeys", .misc.plugin.name = "Global hotkeys support", - .misc.plugin.descr = "Allows to control player with global hotkeys", + .misc.plugin.descr = "Allows one to control player with global hotkeys", .misc.plugin.copyright = "Copyright (C) 2009-2011 Alexey Yakovenko <waker@users.sourceforge.net>\n" "Copyright (C) 2009-2011 Viktor Semykin <thesame.ml@gmail.com>\n"
View file
deadbeef-0.5.0.tar.bz2/plugins/lastfm/lastfm.c -> deadbeef-0.5.1.tar.bz2/plugins/lastfm/lastfm.c
Changed
@@ -926,7 +926,8 @@ // define plugin interface static DB_misc_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_MISC,
View file
deadbeef-0.5.0.tar.bz2/plugins/m3u/m3u.c -> deadbeef-0.5.1.tar.bz2/plugins/m3u/m3u.c
Changed
@@ -443,7 +443,8 @@ static const char * exts[] = { "m3u", "m3u8", "pls", NULL }; DB_playlist_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_PLAYLIST,
View file
deadbeef-0.5.0.tar.bz2/plugins/mms/libmms/mms.c -> deadbeef-0.5.1.tar.bz2/plugins/mms/libmms/mms.c
Changed
@@ -204,7 +204,7 @@ return -1; } - if (fcntl (s, F_SETFL, fcntl (s, F_GETFL) & ~O_NONBLOCK) == -1) { + if (fcntl (s, F_SETFL, fcntl (s, F_GETFL) | O_NONBLOCK) == -1) { lprintf("mms: failed to set socket flags: %s\n", strerror(errno)); return -1; } @@ -218,8 +218,31 @@ sin.sin_addr = ia; sin.sin_port = htons(port); - if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) ==-1 && errno != EINPROGRESS) { - continue; + time_t t = time (NULL); + int error = 0; + for (;;) { + int res = connect(s, (struct sockaddr *)&sin, sizeof(sin)); + if (res == -1 && (errno == EINPROGRESS || errno == EALREADY)) { + if (time (NULL) - t > 3) { + error = -1; + break; + } + usleep(100000); + continue; + } + else if (res == -1 && errno == EISCONN) { + break; + } + else if (res == -1) { + error = -1; + break; + } + } +// if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) ==-1 && errno != EINPROGRESS) { +// continue; +// } + if (error) { + continue; } return s;
View file
deadbeef-0.5.0.tar.bz2/plugins/mms/mmsplug.c -> deadbeef-0.5.1.tar.bz2/plugins/mms/mmsplug.c
Changed
@@ -119,7 +119,8 @@ } static DB_vfs_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_VFS,
View file
deadbeef-0.5.0.tar.bz2/plugins/mpgmad/mpgmad.c -> deadbeef-0.5.1.tar.bz2/plugins/mpgmad/mpgmad.c
Changed
@@ -1443,7 +1443,8 @@ // define plugin interface static DB_decoder_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER,
View file
deadbeef-0.5.0.tar.bz2/plugins/musepack/musepack.c -> deadbeef-0.5.1.tar.bz2/plugins/musepack/musepack.c
Changed
@@ -524,7 +524,8 @@ // define plugin interface static DB_decoder_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER,
View file
deadbeef-0.5.0.tar.bz2/plugins/notify/notify.c -> deadbeef-0.5.1.tar.bz2/plugins/notify/notify.c
Changed
@@ -324,7 +324,8 @@ ; DB_misc_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.type = DB_PLUGIN_MISC, .plugin.version_major = 1, .plugin.version_minor = 0,
View file
deadbeef-0.5.0.tar.bz2/plugins/nullout/nullout.c -> deadbeef-0.5.1.tar.bz2/plugins/nullout/nullout.c
Changed
@@ -190,7 +190,8 @@ // define plugin interface static DB_output_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_OUTPUT,
View file
deadbeef-0.5.0.tar.bz2/plugins/oss/oss.c -> deadbeef-0.5.1.tar.bz2/plugins/oss/oss.c
Changed
@@ -373,7 +373,8 @@ // define plugin interface static DB_output_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_OUTPUT,
View file
deadbeef-0.5.0.tar.bz2/plugins/pulse/pulse.c -> deadbeef-0.5.1.tar.bz2/plugins/pulse/pulse.c
Changed
@@ -357,7 +357,8 @@ static DB_output_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 0, .plugin.version_minor = 1, .plugin.type = DB_PLUGIN_OUTPUT,
View file
deadbeef-0.5.0.tar.bz2/plugins/shellexec/shellexec.c -> deadbeef-0.5.1.tar.bz2/plugins/shellexec/shellexec.c
Changed
@@ -202,8 +202,8 @@ // define plugin interface static DB_misc_t plugin = { - .plugin.api_vmajor = DB_API_VERSION_MAJOR, - .plugin.api_vminor = DB_API_VERSION_MINOR, + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_MISC,
View file
deadbeef-0.5.0.tar.bz2/plugins/sid/plugin.c -> deadbeef-0.5.1.tar.bz2/plugins/sid/plugin.c
Changed
@@ -29,7 +29,8 @@ // define plugin interface DB_decoder_t sid_plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.version_major = 1, .plugin.version_minor = 0,
View file
deadbeef-0.5.0.tar.bz2/plugins/sndfile/sndfile.c -> deadbeef-0.5.1.tar.bz2/plugins/sndfile/sndfile.c
Changed
@@ -42,6 +42,8 @@ int endsample; int currentsample; int bitrate; + int sf_format; + int read_as_short; } sndfile_info_t; // vfs wrapper for sf @@ -170,6 +172,7 @@ return -1; } _info->plugin = &plugin; + info->sf_format = inf.format&0x000f; switch (inf.format&0x000f) { case SF_FORMAT_PCM_S8: @@ -187,14 +190,11 @@ case SF_FORMAT_PCM_32: _info->fmt.bps = 32; break; - case SF_FORMAT_DOUBLE: - fprintf (stderr, "[sndfile] 64 bit float input format is not supported (yet)\n"); - return -1; -// _info->fmt.bps = 64; - break; default: + info->read_as_short = 1; + _info->fmt.bps = 16; fprintf (stderr, "[sndfile] unidentified input format: 0x%X\n", inf.format&0x000f); - return -1; + break; } _info->fmt.channels = inf.channels; @@ -264,8 +264,21 @@ } int n = 0; - n = sf_read_raw (info->ctx, (short *)bytes, size); - n /= samplesize; + if (info->read_as_short) { + n = sf_readf_short(info->ctx, (short *)bytes, size/samplesize); + } + else { + n = sf_read_raw (info->ctx, (short *)bytes, size); + + if (info->sf_format == SF_FORMAT_PCM_U8) { + for (int i = 0; i < n; i++) { + int sample = ((uint8_t *)bytes)[i]; + ((int8_t *)bytes)[i] = sample-0x80; + } + } + n /= samplesize; + } + info->currentsample += n; size = n * samplesize; @@ -344,7 +357,12 @@ break; } - snprintf (s, sizeof (s), "%d", bps); + if (bps == -1) { + snprintf (s, sizeof (s), "unknown"); + } + else { + snprintf (s, sizeof (s), "%d", bps); + } deadbeef->pl_add_meta (it, ":BPS", s); snprintf (s, sizeof (s), "%d", inf.channels); deadbeef->pl_add_meta (it, ":CHANNELS", s); @@ -354,6 +372,75 @@ snprintf (s, sizeof (s), "%d", br); deadbeef->pl_add_meta (it, ":BITRATE", s); + // sndfile subformats + const char *subformats[] = { + "", + "PCM_S8", + "PCM_16", + "PCM_24", + "PCM_32", + "PCM_U8", + "FLOAT", + "DOUBLE", + "", + "", + "ULAW", + "ALAW", + "IMA_ADPCM", + "MS_ADPCM", + "", + "", + "", + "", + "", + "", + "", + "GSM610", + "VOX_ADPCM", + "", + "", + "", + "", + "", + "", + "", + "", + "G721_32", + "G723_24", + "G723_40", + "", + "", + "", + "", + "", + "", + "", + "DWVW_12", + "DWVW_16", + "DWVW_24", + "DWVW_N", + "", + "", + "", + "", + "", + "", + "DPCM_8", + "DPCM_16", + "", + "", + "", + "", + "", + "", + "", + "", + "VORBIS", + }; + + if (inf.format&0x000f <= SF_FORMAT_VORBIS) { + deadbeef->pl_add_meta (it, ":SF_FORMAT", subformats[inf.format&0x000f]); + } DB_playItem_t *cue_after = deadbeef->plt_insert_cue (plt, after, it, totalsamples, samplerate); if (cue_after) { @@ -441,7 +528,8 @@ // define plugin interface static DB_decoder_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER,
View file
deadbeef-0.5.0.tar.bz2/plugins/supereq/supereq.c -> deadbeef-0.5.1.tar.bz2/plugins/supereq/supereq.c
Changed
@@ -273,8 +273,8 @@ ; static DB_dsp_t plugin = { - .plugin.api_vmajor = DB_API_VERSION_MAJOR, - .plugin.api_vminor = DB_API_VERSION_MINOR, + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DSP,
View file
deadbeef-0.5.0.tar.bz2/plugins/tta/ttaplug.c -> deadbeef-0.5.1.tar.bz2/plugins/tta/ttaplug.c
Changed
@@ -315,7 +315,8 @@ // define plugin interface static DB_decoder_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER,
View file
deadbeef-0.5.0.tar.bz2/plugins/vfs_curl/vfs_curl.c -> deadbeef-0.5.1.tar.bz2/plugins/vfs_curl/vfs_curl.c
Changed
@@ -1064,7 +1064,8 @@ // standard stdio vfs static DB_vfs_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_VFS,
View file
deadbeef-0.5.0.tar.bz2/plugins/vfs_zip/vfs_zip.c -> deadbeef-0.5.1.tar.bz2/plugins/vfs_zip/vfs_zip.c
Changed
@@ -210,7 +210,8 @@ } static DB_vfs_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_VFS,
View file
deadbeef-0.5.0.tar.bz2/plugins/vorbis/vorbis.c -> deadbeef-0.5.1.tar.bz2/plugins/vorbis/vorbis.c
Changed
@@ -768,7 +768,8 @@ // define plugin interface static DB_decoder_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER,
View file
deadbeef-0.5.0.tar.bz2/plugins/vtx/vtx.c -> deadbeef-0.5.1.tar.bz2/plugins/vtx/vtx.c
Changed
@@ -298,7 +298,8 @@ // define plugin interface static DB_decoder_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER,
View file
deadbeef-0.5.0.tar.bz2/plugins/wavpack/wavpack.c -> deadbeef-0.5.1.tar.bz2/plugins/wavpack/wavpack.c
Changed
@@ -411,7 +411,8 @@ static const char *exts[] = { "wv", NULL }; // define plugin interface static DB_decoder_t plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.version_major = 1, .plugin.version_minor = 0, .plugin.type = DB_PLUGIN_DECODER,
View file
deadbeef-0.5.0.tar.bz2/plugins/wildmidi/wildmidiplug.c -> deadbeef-0.5.1.tar.bz2/plugins/wildmidi/wildmidiplug.c
Changed
@@ -183,7 +183,8 @@ ; // define plugin interface DB_decoder_t wmidi_plugin = { - DB_PLUGIN_SET_API_VERSION + .plugin.api_vmajor = 1, + .plugin.api_vminor = 0, .plugin.type = DB_PLUGIN_DECODER, .plugin.version_major = 1, .plugin.version_minor = 0,
View file
deadbeef-0.5.0.tar.bz2/po/nl.po -> deadbeef-0.5.1.tar.bz2/po/nl.po
Changed
@@ -8,19 +8,19 @@ "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-11-09 04:43+0000\n" -"PO-Revision-Date: 2010-08-30 11:05+0200\n" -"Last-Translator: Sander <celettu@gmail.com>\n" +"PO-Revision-Date: 2011-05-18 14:18+0200\n" +"Last-Translator: Pjotr <pliniusminor@gmail.com>\n" "Language-Team: Spanish\n" +"Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: nl\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Pootle 2.0.5\n" #: ../plugins/gtkui/callbacks.c:97 msgid "Supported sound formats" -msgstr "Ondersteunde geluidsformaten" +msgstr "Ondersteunde bestandstypen voor geluid" #: ../plugins/gtkui/callbacks.c:108 msgid "Other files (*)" @@ -40,24 +40,24 @@ #: ../plugins/gtkui/callbacks.c:192 msgid "Follow symlinks" -msgstr "" +msgstr "Volg symbolische koppelingen" #: ../plugins/gtkui/callbacks.c:667 msgid "Failed while reading help file" -msgstr "Fout bij het lezen van het help bestand" +msgstr "Fout bij het lezen van het hulpbestand" #: ../plugins/gtkui/callbacks.c:677 msgid "Failed to load help file" -msgstr "Fout bij het lezen van het help bestand" +msgstr "Kon het hulpbestand niet laden" #: ../plugins/gtkui/callbacks.c:692 msgid "help.txt" -msgstr "" +msgstr "help.txt" #: ../plugins/gtkui/callbacks.c:693 ../plugins/gtkui/interface.c:1125 #: ../plugins/gtkui/deadbeef.glade.h:52 msgid "Help" -msgstr "Help" +msgstr "Hulp" #: ../plugins/gtkui/callbacks.c:703 #, c-format @@ -70,9 +70,10 @@ msgstr "DeaDBeeF %s ChangeLog" #: ../plugins/gtkui/callbacks.c:1080 -#, fuzzy, c-format +#, c-format +#, c-format msgid "DeaDBeeF Translators" -msgstr "DeaDBeeF speelt nu af" +msgstr "DeaDBeeF Vertalers" #: ../plugins/gtkui/ddbtabstrip.c:626 msgid "Edit playlist" @@ -353,7 +354,7 @@ #: ../plugins/gtkui/interface.c:394 ../plugins/gtkui/deadbeef.glade.h:69 msgid "Jump to current track" -msgstr "" +msgstr "Spring naar huidig muziekstuk" #: ../plugins/gtkui/interface.c:401 ../plugins/gtkui/interface.c:408 #: ../plugins/gtkui/deadbeef.glade.h:155 @@ -366,11 +367,11 @@ #: ../plugins/gtkui/interface.c:425 ../plugins/gtkui/deadbeef.glade.h:154 msgid "_GPLv2" -msgstr "" +msgstr "_GPLv2" #: ../plugins/gtkui/interface.c:429 ../plugins/gtkui/deadbeef.glade.h:156 msgid "_LGPLv2.1" -msgstr "" +msgstr "LGPLv2.1" #: ../plugins/gtkui/interface.c:438 ../plugins/gtkui/deadbeef.glade.h:145 msgid "_About" @@ -378,7 +379,7 @@ #: ../plugins/gtkui/interface.c:446 ../plugins/gtkui/deadbeef.glade.h:161 msgid "_Translators" -msgstr "" +msgstr "_Vertalers" #: ../plugins/gtkui/interface.c:836 ../plugins/gtkui/deadbeef.glade.h:114 msgid "Search" @@ -465,7 +466,7 @@ #: ../plugins/gtkui/interface.c:1430 msgid "Item Index" -msgstr "" +msgstr "Index van elementen" #. create default set of columns #: ../plugins/gtkui/interface.c:1431 ../plugins/gtkui/mainplaylist.c:305 @@ -529,7 +530,8 @@ msgstr "Rechts" #: ../plugins/gtkui/interface.c:1472 ../plugins/gtkui/deadbeef.glade.h:35 -#, fuzzy, no-c-format +#, no-c-format +#, no-c-format msgid "" "Format conversions (start with %):\n" " [a]rtist, [t]itle, al[b]um, [B]and, [C]omposer\n" @@ -540,10 +542,11 @@ "Example: %a - %t [%l]" msgstr "" "Formatteer conversies (begin met %):\n" -"[a]rtiest, [t]itel, al[b]um, [B]and, [C]omposer\n" -"titel[n]ummer, [N]totaltracks,\n" -"[d]uur, [j]aar, [g]enre, [c]ommentaar,\n" -"copy[r]echt, [b]estandnaam, [T]ags\n" +" [a]rtiest, [t]itel, al[b]um, [B]and, [C]omponist\n" +" titel[n]ummer, [N]totaltracks,\n" +" [l]engte, [y]jaar, [g]enre, [c]ommentaar,\n" +" auteurs[r]echt, [b]estandnaam, [T]ags,\n" +" [d]map, [D]MapMetPad\n" "Bijvoorbeeld: %a - %t [%l]" #: ../plugins/gtkui/interface.c:1501 ../plugins/gtkui/interface.c:2928 @@ -593,15 +596,16 @@ #: ../plugins/gtkui/interface.c:1832 ../plugins/gtkui/deadbeef.glade.h:5 msgid "Add files from command line (or file manager) to this playlist:" msgstr "" +"Voeg bestanden toe vanaf de commandoregel (of de bestandbeheerder) aan deze " +"afspeellijst:" #: ../plugins/gtkui/interface.c:1841 ../plugins/gtkui/deadbeef.glade.h:109 msgid "Resume previous session on startup" -msgstr "" +msgstr "Hervat vorige sessie bij opstarten" #: ../plugins/gtkui/interface.c:1845 ../plugins/gtkui/deadbeef.glade.h:93 -#, fuzzy msgid "Playback" -msgstr "_Playback" +msgstr "Afspelen" #: ../plugins/gtkui/interface.c:1854 ../plugins/gtkui/deadbeef.glade.h:14 msgid "Close minimizes to tray" @@ -613,23 +617,23 @@ #: ../plugins/gtkui/interface.c:1862 ../plugins/gtkui/deadbeef.glade.h:54 msgid "Hide system tray icon" -msgstr "" +msgstr "Verberg systeemvakpictogram" #: ../plugins/gtkui/interface.c:1866 ../plugins/gtkui/deadbeef.glade.h:138 msgid "Use bold font for currently playing track" -msgstr "" +msgstr "Gebruik vetgedrukt lettertype voor het thans afspelende muziekstuk" #: ../plugins/gtkui/interface.c:1870 ../plugins/gtkui/deadbeef.glade.h:53 msgid "Hide \"Delete from disk\" context menu item" -msgstr "" +msgstr "Verberg \"Verwijder van schijf\" element in het contekstmenu" #: ../plugins/gtkui/interface.c:1878 ../plugins/gtkui/deadbeef.glade.h:133 msgid "Titlebar text while playing:" -msgstr "" +msgstr "Titelbalktekst gedurende afspelen:" #: ../plugins/gtkui/interface.c:1892 ../plugins/gtkui/deadbeef.glade.h:134 msgid "Titlebar text while stopped:" -msgstr "" +msgstr "Titelbalktekst wanneer gestopt" #: ../plugins/gtkui/interface.c:1902 ../plugins/gtkui/deadbeef.glade.h:50 msgid "GUI" @@ -706,7 +710,7 @@ #: ../plugins/gtkui/interface.c:2121 ../plugins/gtkui/deadbeef.glade.h:15 msgid "Colors" -msgstr "" +msgstr "Kleuren" #: ../plugins/gtkui/interface.c:2130 ../plugins/gtkui/deadbeef.glade.h:29 msgid "Enable Proxy Server" @@ -963,13 +967,12 @@ msgstr "Weet u zeker dat u dit venster wilt sluiten?" #: ../plugins/gtkui/trkproperties.c:169 -#, fuzzy msgid "Location" -msgstr "Voeg locatie toe" +msgstr "Locatie"
View file
deadbeef-0.5.0.tar.bz2/po/pt_BR.po -> deadbeef-0.5.1.tar.bz2/po/pt_BR.po
Changed
@@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: deadbeef\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-08 15:08-0300\n" -"PO-Revision-Date: 2011-05-08 21:32-0300\n" +"POT-Creation-Date: 2011-05-14 21:06-0300\n" +"PO-Revision-Date: 2011-05-14 21:06-0300\n" "Last-Translator: Sérgio Cipolla <secipolla@gmail.com>\n" "Language-Team: Brazilian Portuguese <ldp-br@bazar2.conectiva.com.br>\n" "Language: pt_BR\n" @@ -23,8 +23,7 @@ msgid "Supported sound formats" msgstr "Formatos de áudio suportados" -#: ../plugins/gtkui/callbacks.c:132 -#: ../plugins/gtkui/gtkui.c:772 +#: ../plugins/gtkui/callbacks.c:132 ../plugins/gtkui/gtkui.c:772 msgid "Other files (*)" msgstr "Outros arquivos (*)" @@ -56,9 +55,9 @@ msgid "help.txt" msgstr "help.pt_BR.txt" -#: ../plugins/gtkui/callbacks.c:723 -#: ../plugins/gtkui/interface.c:1155 -#: ../plugins/gtkui/deadbeef.glade.h:47 +#: ../plugins/gtkui/callbacks.c:723 ../plugins/gtkui/interface.c:1155 +#: ../plugins/gtkui/deadbeef.glade.h:47 ../plugins/converter/convgui.c:1233 +#: ../plugins/converter/convgui.c:1241 msgid "Help" msgstr "Ajuda" @@ -77,29 +76,26 @@ msgid "DeaDBeeF Translators" msgstr "Tradutores do DeaDBeeF" -#: ../plugins/gtkui/ddbtabstrip.c:684 -#: ../plugins/gtkui/trkproperties.c:599 +#: ../plugins/gtkui/ddbtabstrip.c:689 ../plugins/gtkui/trkproperties.c:611 msgid "Edit playlist" msgstr "Editar lista de reprodução" -#: ../plugins/gtkui/ddbtabstrip.c:687 -#: ../plugins/gtkui/interface.c:1486 -#: ../plugins/gtkui/interface.c:2861 -#: ../plugins/gtkui/deadbeef.glade.h:134 +#: ../plugins/gtkui/ddbtabstrip.c:692 ../plugins/gtkui/interface.c:1486 +#: ../plugins/gtkui/interface.c:2861 ../plugins/gtkui/deadbeef.glade.h:134 #: ../plugins/converter/interface.c:402 #: ../plugins/converter/converter.glade.h:46 msgid "Title:" msgstr "Título:" -#: ../plugins/gtkui/ddbtabstrip.c:742 +#: ../plugins/gtkui/ddbtabstrip.c:748 msgid "Rename Playlist" msgstr "Renomear lista de reprodução" -#: ../plugins/gtkui/ddbtabstrip.c:746 +#: ../plugins/gtkui/ddbtabstrip.c:752 msgid "Remove Playlist" msgstr "Remover lista de reprodução" -#: ../plugins/gtkui/ddbtabstrip.c:750 +#: ../plugins/gtkui/ddbtabstrip.c:756 msgid "Add New Playlist" msgstr "Adicionar nova lista de reprodução" @@ -155,8 +151,7 @@ msgid "Zero Bands" msgstr "Bandas a zero" -#: ../plugins/gtkui/eq.c:387 -#: ../plugins/converter/interface.c:826 +#: ../plugins/gtkui/eq.c:387 ../plugins/converter/interface.c:826 #: ../plugins/converter/converter.glade.h:40 msgid "Presets" msgstr "Predefinições" @@ -195,8 +190,11 @@ #: ../plugins/gtkui/gtkui.c:198 #, c-format -msgid "%s%s %s| %dHz | %d bit | %s | %d:%02d / %s | %d tracks | %s total playtime" -msgstr "%s%s %s| %dHz | %d bit | %s | %d:%02d / %s | %d faixas | %s tempo total de reprodução" +msgid "" +"%s%s %s| %dHz | %d bit | %s | %d:%02d / %s | %d tracks | %s total playtime" +msgstr "" +"%s%s %s| %dHz | %d bit | %s | %d:%02d / %s | %d faixas | %s tempo total de " +"reprodução" #: ../plugins/gtkui/gtkui.c:628 msgid "Save Playlist As" @@ -210,381 +208,305 @@ msgid "Load Playlist" msgstr "Carregar lista" -#: ../plugins/gtkui/gtkui.c:906 -#: ../plugins/gtkui/fileman.c:36 +#: ../plugins/gtkui/gtkui.c:910 ../plugins/gtkui/fileman.c:40 msgid "New Playlist" msgstr "Nova lista" -#: ../plugins/gtkui/gtkui.c:909 +#: ../plugins/gtkui/gtkui.c:913 #, c-format msgid "New Playlist (%d)" msgstr "Nova lista (%d)" -#: ../plugins/gtkui/interface.c:150 -#: ../plugins/gtkui/deadbeef.glade.h:154 +#: ../plugins/gtkui/interface.c:150 ../plugins/gtkui/deadbeef.glade.h:154 msgid "_File" msgstr "_Arquivo" -#: ../plugins/gtkui/interface.c:157 -#: ../plugins/gtkui/deadbeef.glade.h:161 +#: ../plugins/gtkui/interface.c:157 ../plugins/gtkui/deadbeef.glade.h:161 msgid "_Open file(s)" msgstr "_Abrir arquivos(s)" -#: ../plugins/gtkui/interface.c:173 -#: ../plugins/gtkui/deadbeef.glade.h:6 +#: ../plugins/gtkui/interface.c:173 ../plugins/gtkui/deadbeef.glade.h:6 msgid "Add file(s)" msgstr "Adicionar arquivo(s)" -#: ../plugins/gtkui/interface.c:181 -#: ../plugins/gtkui/deadbeef.glade.h:8 +#: ../plugins/gtkui/interface.c:181 ../plugins/gtkui/deadbeef.glade.h:8 msgid "Add folder(s)" msgstr "Adicionar pasta(s)" -#: ../plugins/gtkui/interface.c:189 -#: ../plugins/gtkui/interface.c:2961 +#: ../plugins/gtkui/interface.c:189 ../plugins/gtkui/interface.c:2961 #: ../plugins/gtkui/deadbeef.glade.h:9 msgid "Add location" msgstr "Adicionar local" -#: ../plugins/gtkui/interface.c:198 -#: ../plugins/gtkui/deadbeef.glade.h:78 +#: ../plugins/gtkui/interface.c:198 ../plugins/gtkui/deadbeef.glade.h:78 msgid "New playlist" msgstr "Nova lista de reprodução" -#: ../plugins/gtkui/interface.c:205 -#: ../plugins/gtkui/deadbeef.glade.h:70 +#: ../plugins/gtkui/interface.c:205 ../plugins/gtkui/deadbeef.glade.h:70 msgid "Load playlist" msgstr "Carregar lista de reprodução" -#: ../plugins/gtkui/interface.c:209 -#: ../plugins/gtkui/deadbeef.glade.h:108 +#: ../plugins/gtkui/interface.c:209 ../plugins/gtkui/deadbeef.glade.h:108 msgid "Save playlist" msgstr "Salvar lista de reprodução" -#: ../plugins/gtkui/interface.c:218 -#: ../plugins/gtkui/deadbeef.glade.h:163 +#: ../plugins/gtkui/interface.c:218 ../plugins/gtkui/deadbeef.glade.h:163 msgid "_Quit" msgstr "_Sair" -#: ../plugins/gtkui/interface.c:229 -#: ../plugins/gtkui/deadbeef.glade.h:153 +#: ../plugins/gtkui/interface.c:229 ../plugins/gtkui/deadbeef.glade.h:153 msgid "_Edit" msgstr "_Editar" -#: ../plugins/gtkui/interface.c:236 -#: ../plugins/gtkui/deadbeef.glade.h:151 +#: ../plugins/gtkui/interface.c:236 ../plugins/gtkui/deadbeef.glade.h:151 msgid "_Clear" msgstr "_Limpar" -#: ../plugins/gtkui/interface.c:244 -#: ../plugins/gtkui/deadbeef.glade.h:113 +#: ../plugins/gtkui/interface.c:244 ../plugins/gtkui/deadbeef.glade.h:113 msgid "Select all" msgstr "Selecionar tudo" -#: ../plugins/gtkui/interface.c:251 -#: ../plugins/gtkui/deadbeef.glade.h:31 +#: ../plugins/gtkui/interface.c:251 ../plugins/gtkui/deadbeef.glade.h:31 msgid "Deselect all" msgstr "Desmarcar tudo" -#: ../plugins/gtkui/interface.c:258 -#: ../plugins/gtkui/deadbeef.glade.h:53 +#: ../plugins/gtkui/interface.c:258 ../plugins/gtkui/deadbeef.glade.h:53 msgid "Invert selection" msgstr "Inverter seleção" -#: ../plugins/gtkui/interface.c:262 -#: ../plugins/gtkui/deadbeef.glade.h:116 +#: ../plugins/gtkui/interface.c:262 ../plugins/gtkui/deadbeef.glade.h:116 msgid "Selection" msgstr "Seleção"
View file
deadbeef-0.5.0.tar.bz2/po/ru.po -> deadbeef-0.5.1.tar.bz2/po/ru.po
Changed
@@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: 0.4.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-14 20:00+0300\n" +"POT-Creation-Date: 2011-05-22 12:50+0200\n" "PO-Revision-Date: 2011-05-14 19:53+0300\n" "Last-Translator: \n" "Language-Team: ru <slpiv@mail.ru>\n" @@ -23,7 +23,7 @@ msgid "Supported sound formats" msgstr "Поддерживаемые форматы" -#: ../plugins/gtkui/callbacks.c:132 ../plugins/gtkui/gtkui.c:772 +#: ../plugins/gtkui/callbacks.c:132 ../plugins/gtkui/gtkui.c:776 msgid "Other files (*)" msgstr "Другие файлы (*)" @@ -56,8 +56,8 @@ msgstr "help.ru.txt" #: ../plugins/gtkui/callbacks.c:723 ../plugins/gtkui/interface.c:1155 -#: ../plugins/gtkui/deadbeef.glade.h:47 ../plugins/converter/convgui.c:1232 -#: ../plugins/converter/convgui.c:1240 +#: ../plugins/gtkui/deadbeef.glade.h:48 ../plugins/converter/convgui.c:1240 +#: ../plugins/converter/convgui.c:1248 msgid "Help" msgstr "Справка" @@ -76,25 +76,25 @@ msgid "DeaDBeeF Translators" msgstr "Переводчики DeaDBeeF " -#: ../plugins/gtkui/ddbtabstrip.c:684 ../plugins/gtkui/trkproperties.c:599 +#: ../plugins/gtkui/ddbtabstrip.c:689 ../plugins/gtkui/trkproperties.c:618 msgid "Edit playlist" msgstr "Редактировать плейлист" -#: ../plugins/gtkui/ddbtabstrip.c:687 ../plugins/gtkui/interface.c:1486 -#: ../plugins/gtkui/interface.c:2861 ../plugins/gtkui/deadbeef.glade.h:134 +#: ../plugins/gtkui/ddbtabstrip.c:692 ../plugins/gtkui/interface.c:1486 +#: ../plugins/gtkui/interface.c:2870 ../plugins/gtkui/deadbeef.glade.h:135 #: ../plugins/converter/interface.c:402 msgid "Title:" msgstr "Название:" -#: ../plugins/gtkui/ddbtabstrip.c:742 +#: ../plugins/gtkui/ddbtabstrip.c:748 msgid "Rename Playlist" msgstr "Переименовать плейлист" -#: ../plugins/gtkui/ddbtabstrip.c:746 +#: ../plugins/gtkui/ddbtabstrip.c:752 msgid "Remove Playlist" msgstr "Удалить плейлист" -#: ../plugins/gtkui/ddbtabstrip.c:750 +#: ../plugins/gtkui/ddbtabstrip.c:756 msgid "Add New Playlist" msgstr "Добавить новый плейлист" @@ -193,32 +193,32 @@ msgstr "" "%s%s %s| %dГц | %d бит | %s | %d:%02d / %s | %d дорожек | %s общее время" -#: ../plugins/gtkui/gtkui.c:628 +#: ../plugins/gtkui/gtkui.c:632 msgid "Save Playlist As" msgstr "Сохранить плейлист как" -#: ../plugins/gtkui/gtkui.c:639 +#: ../plugins/gtkui/gtkui.c:643 msgid "DeaDBeeF playlist files (*.dbpl)" msgstr "Файлы плейлистов DeaDBeeF (*.dbpl)" -#: ../plugins/gtkui/gtkui.c:757 +#: ../plugins/gtkui/gtkui.c:761 msgid "Load Playlist" msgstr "Загрузить плейлист" -#: ../plugins/gtkui/gtkui.c:910 ../plugins/gtkui/fileman.c:40 +#: ../plugins/gtkui/gtkui.c:914 ../plugins/gtkui/fileman.c:40 msgid "New Playlist" msgstr "Новый плейлист" -#: ../plugins/gtkui/gtkui.c:913 +#: ../plugins/gtkui/gtkui.c:917 #, c-format msgid "New Playlist (%d)" msgstr "Новый плейлист (%d)" -#: ../plugins/gtkui/interface.c:150 ../plugins/gtkui/deadbeef.glade.h:154 +#: ../plugins/gtkui/interface.c:150 ../plugins/gtkui/deadbeef.glade.h:155 msgid "_File" msgstr "_Файл" -#: ../plugins/gtkui/interface.c:157 ../plugins/gtkui/deadbeef.glade.h:161 +#: ../plugins/gtkui/interface.c:157 ../plugins/gtkui/deadbeef.glade.h:162 msgid "_Open file(s)" msgstr "_Открыть файл(ы)" @@ -230,236 +230,236 @@ msgid "Add folder(s)" msgstr "Добавить каталог(и)" -#: ../plugins/gtkui/interface.c:189 ../plugins/gtkui/interface.c:2961 +#: ../plugins/gtkui/interface.c:189 ../plugins/gtkui/interface.c:2970 #: ../plugins/gtkui/deadbeef.glade.h:9 msgid "Add location" msgstr "Добавить расположение" -#: ../plugins/gtkui/interface.c:198 ../plugins/gtkui/deadbeef.glade.h:78 +#: ../plugins/gtkui/interface.c:198 ../plugins/gtkui/deadbeef.glade.h:79 msgid "New playlist" msgstr "Новый плейлист" -#: ../plugins/gtkui/interface.c:205 ../plugins/gtkui/deadbeef.glade.h:70 +#: ../plugins/gtkui/interface.c:205 ../plugins/gtkui/deadbeef.glade.h:71 msgid "Load playlist" msgstr "Загрузить плейлист" -#: ../plugins/gtkui/interface.c:209 ../plugins/gtkui/deadbeef.glade.h:108 +#: ../plugins/gtkui/interface.c:209 ../plugins/gtkui/deadbeef.glade.h:109 msgid "Save playlist" msgstr "Сохранить плейлист" -#: ../plugins/gtkui/interface.c:218 ../plugins/gtkui/deadbeef.glade.h:163 +#: ../plugins/gtkui/interface.c:218 ../plugins/gtkui/deadbeef.glade.h:164 msgid "_Quit" msgstr "_Выход" -#: ../plugins/gtkui/interface.c:229 ../plugins/gtkui/deadbeef.glade.h:153 +#: ../plugins/gtkui/interface.c:229 ../plugins/gtkui/deadbeef.glade.h:154 msgid "_Edit" msgstr "_Правка" -#: ../plugins/gtkui/interface.c:236 ../plugins/gtkui/deadbeef.glade.h:151 +#: ../plugins/gtkui/interface.c:236 ../plugins/gtkui/deadbeef.glade.h:152 msgid "_Clear" msgstr "_Очистить" -#: ../plugins/gtkui/interface.c:244 ../plugins/gtkui/deadbeef.glade.h:113 +#: ../plugins/gtkui/interface.c:244 ../plugins/gtkui/deadbeef.glade.h:114 msgid "Select all" msgstr "Выделить всё" -#: ../plugins/gtkui/interface.c:251 ../plugins/gtkui/deadbeef.glade.h:31 +#: ../plugins/gtkui/interface.c:251 ../plugins/gtkui/deadbeef.glade.h:32 msgid "Deselect all" msgstr "Снять выделение" -#: ../plugins/gtkui/interface.c:258 ../plugins/gtkui/deadbeef.glade.h:53 +#: ../plugins/gtkui/interface.c:258 ../plugins/gtkui/deadbeef.glade.h:54 msgid "Invert selection" msgstr "Обратить выделение" -#: ../plugins/gtkui/interface.c:262 ../plugins/gtkui/deadbeef.glade.h:116 +#: ../plugins/gtkui/interface.c:262 ../plugins/gtkui/deadbeef.glade.h:117 msgid "Selection" msgstr "Выделенное" -#: ../plugins/gtkui/interface.c:269 ../plugins/gtkui/plcommon.c:447 -#: ../plugins/gtkui/prefwin.c:323 ../plugins/gtkui/deadbeef.glade.h:103 +#: ../plugins/gtkui/interface.c:269 ../plugins/gtkui/plcommon.c:453 +#: ../plugins/gtkui/prefwin.c:323 ../plugins/gtkui/deadbeef.glade.h:104 #: ../plugins/converter/interface.c:653 msgid "Remove" msgstr "Удалить" -#: ../plugins/gtkui/interface.c:277 ../plugins/gtkui/deadbeef.glade.h:23 +#: ../plugins/gtkui/interface.c:277 ../plugins/gtkui/deadbeef.glade.h:24 msgid "Crop" msgstr "Оставить выделенное" -#: ../plugins/gtkui/interface.c:281 ../plugins/gtkui/deadbeef.glade.h:155 +#: ../plugins/gtkui/interface.c:281 ../plugins/gtkui/deadbeef.glade.h:156 msgid "_Find" msgstr "_Найти" -#: ../plugins/gtkui/interface.c:288 ../plugins/gtkui/deadbeef.glade.h:120 +#: ../plugins/gtkui/interface.c:288 ../plugins/gtkui/deadbeef.glade.h:121 msgid "Sort By" msgstr "Сортировать по" #: ../plugins/gtkui/interface.c:295 ../plugins/gtkui/interface.c:1516 -#: ../plugins/gtkui/mainplaylist.c:310 ../plugins/gtkui/prefwin.c:620 -#: ../plugins/gtkui/search.c:387 ../plugins/gtkui/deadbeef.glade.h:133 -#: ../plugins/converter/convgui.c:782 ../plugins/converter/convgui.c:1203 +#: ../plugins/gtkui/mainplaylist.c:315 ../plugins/gtkui/prefwin.c:623 +#: ../plugins/gtkui/search.c:393 ../plugins/gtkui/deadbeef.glade.h:134 +#: ../plugins/converter/convgui.c:790 ../plugins/converter/convgui.c:1211 #: ../plugins/converter/interface.c:630 msgid "Title" msgstr "Название" -#: ../plugins/gtkui/interface.c:299 ../plugins/gtkui/deadbeef.glade.h:138 +#: ../plugins/gtkui/interface.c:299 ../plugins/gtkui/deadbeef.glade.h:139 msgid "Track number" msgstr "Номер дорожки"
View file
deadbeef-0.5.0.tar.bz2/premix.c -> deadbeef-0.5.1.tar.bz2/premix.c
Changed
@@ -31,10 +31,10 @@ static inline void pcm_write_samples_8_to_8 (const ddb_waveformat_t * restrict inputfmt, const char * restrict input, const ddb_waveformat_t * restrict outputfmt, char * restrict output, int nsamples, int * restrict channelmap, int outputsamplesize) { for (int s = 0; s < nsamples; s++) { - for (int c = 0; c < inputfmt->channels; c++) { - *(output + channelmap[c]) = *input; - input++; + for (int c = 0; c < outputfmt->channels; c++) { + *(output + c) = *(input + channelmap[c]); } + input += inputfmt->channels; output += outputsamplesize; } } @@ -42,10 +42,10 @@ static inline void pcm_write_samples_8_to_16 (const ddb_waveformat_t * restrict inputfmt, const char * restrict input, const ddb_waveformat_t * restrict outputfmt, char * restrict output, int nsamples, int * restrict channelmap, int outputsamplesize) { for (int s = 0; s < nsamples; s++) { - for (int c = 0; c < inputfmt->channels; c++) { - *((int16_t*)(output + 2 * channelmap[c])) = (int16_t)(*input) << 8; - input++; + for (int c = 0; c < outputfmt->channels; c++) { + *((int16_t*)(output + 2 * c)) = (int16_t)(*(input + channelmap[c])) << 8; } + input += inputfmt->channels; output += outputsamplesize; } } @@ -53,13 +53,13 @@ static inline void pcm_write_samples_8_to_24 (const ddb_waveformat_t * restrict inputfmt, const char * restrict input, const ddb_waveformat_t * restrict outputfmt, char * restrict output, int nsamples, int * restrict channelmap, int outputsamplesize) { for (int s = 0; s < nsamples; s++) { - for (int c = 0; c < inputfmt->channels; c++) { - char *out = output + 3 * channelmap[c]; + for (int c = 0; c < outputfmt->channels; c++) { + char *out = output + 3 * c; out[0] = 0; out[1] = 0; - out[2] = input[0]; - input += 1; + out[2] = *(input + channelmap[c]); } + input += inputfmt->channels; output += outputsamplesize; } } @@ -67,14 +67,14 @@ static inline void pcm_write_samples_8_to_32 (const ddb_waveformat_t * restrict inputfmt, const char * restrict input, const ddb_waveformat_t * restrict outputfmt, char * restrict output, int nsamples, int * restrict channelmap, int outputsamplesize) { for (int s = 0; s < nsamples; s++) { - for (int c = 0; c < inputfmt->channels; c++) { - char *out = output + 4 * channelmap[c]; + for (int c = 0; c < outputfmt->channels; c++) { + char *out = output + 4 * c; out[0] = 0; out[1] = 0; out[2] = 0; - out[3] = input[0]; - input += 1; + out[3] = *(input + channelmap[c]); } + input += inputfmt->channels; output += outputsamplesize; } } @@ -82,11 +82,11 @@ static inline void pcm_write_samples_8_to_float (const ddb_waveformat_t * restrict inputfmt, const char * restrict input, const ddb_waveformat_t * restrict outputfmt, char * restrict output, int nsamples, int * restrict channelmap, int outputsamplesize) { for (int s = 0; s < nsamples; s++) { - for (int c = 0; c < inputfmt->channels; c++) { - float sample = (*input) / (float)0x7f; - *((float *)(output + 4 * channelmap[c])) = sample; - input++; + for (int c = 0; c < outputfmt->channels; c++) { + float sample = (*(input+channelmap[c])) / (float)0x7f; + *((float *)(output + 4 * c)) = sample; } + input += inputfmt->channels; output += outputsamplesize; } } @@ -94,10 +94,10 @@ static inline void pcm_write_samples_16_to_16 (const ddb_waveformat_t * restrict inputfmt, const char * restrict input, const ddb_waveformat_t * restrict outputfmt, char * restrict output, int nsamples, int * restrict channelmap, int outputsamplesize) { for (int s = 0; s < nsamples; s++) { - for (int c = 0; c < inputfmt->channels; c++) { - *((int16_t*)(output + 2 * channelmap[c])) = *((int16_t*)input); - input += 2; + for (int c = 0; c < outputfmt->channels; c++) { + *((int16_t*)(output + 2 * c)) = *((int16_t*)(input + channelmap[c]*2)); } + input += 2 * inputfmt->channels; output += outputsamplesize; } } @@ -105,10 +105,10 @@ static inline void pcm_write_samples_16_to_8 (const ddb_waveformat_t * restrict inputfmt, const char * restrict input, const ddb_waveformat_t * restrict outputfmt, char * restrict output, int nsamples, int * restrict channelmap, int outputsamplesize) { for (int s = 0; s < nsamples; s++) { - for (int c = 0; c < inputfmt->channels; c++) { - *((int8_t*)(output + channelmap[c])) = *((int16_t*)input) >> 8; - input += 2; + for (int c = 0; c < outputfmt->channels; c++) { + *((int8_t*)(output + c)) = *((int16_t*)(input + channelmap[c]*2)) >> 8; } + input += 2 * inputfmt->channels; output += outputsamplesize; } } @@ -116,13 +116,14 @@ static inline void pcm_write_samples_16_to_24 (const ddb_waveformat_t * restrict inputfmt, const char * restrict input, const ddb_waveformat_t * restrict outputfmt, char * restrict output, int nsamples, int * restrict channelmap, int outputsamplesize) { for (int s = 0; s < nsamples; s++) { - for (int c = 0; c < inputfmt->channels; c++) { - char *out = output + 3 * channelmap[c]; + for (int c = 0; c < outputfmt->channels; c++) { + char *out = output + 3 * c; + const char *in = input + channelmap[c]*2; out[0] = 0; - out[1] = input[0]; - out[2] = input[1]; - input += 2; + out[1] = in[0]; + out[2] = in[1]; } + input += 2 * inputfmt->channels; output += outputsamplesize; } } @@ -130,14 +131,15 @@ static inline void pcm_write_samples_16_to_32 (const ddb_waveformat_t * restrict inputfmt, const char * restrict input, const ddb_waveformat_t * restrict outputfmt, char * restrict output, int nsamples, int * restrict channelmap, int outputsamplesize) { for (int s = 0; s < nsamples; s++) { - for (int c = 0; c < inputfmt->channels; c++) { - char *out = output + 4 * channelmap[c]; + for (int c = 0; c < outputfmt->channels; c++) { + char *out = output + 4 * c; + const char *in = input + channelmap[c]*2; out[0] = 0; out[1] = 0; - out[2] = input[0]; - out[3] = input[1]; - input += 2; + out[2] = in[0]; + out[3] = in[1]; } + input += 2 * inputfmt->channels; output += outputsamplesize; } } @@ -145,11 +147,11 @@ static inline void pcm_write_samples_16_to_float (const ddb_waveformat_t * restrict inputfmt, const char * restrict input, const ddb_waveformat_t * restrict outputfmt, char * restrict output, int nsamples, int * restrict channelmap, int outputsamplesize) { for (int s = 0; s < nsamples; s++) { - for (int c = 0; c < inputfmt->channels; c++) { - float sample = (*((int16_t*)input)) / (float)0x7fff; - *((float *)(output + 4 * channelmap[c])) = sample; - input += 2; + for (int c = 0; c < outputfmt->channels; c++) { + float sample = (*((int16_t*)(input + channelmap[c]*2))) / (float)0x7fff; + *((float *)(output + 4 * c)) = sample; } + input += 2 * inputfmt->channels; output += outputsamplesize; } } @@ -157,11 +159,11 @@ static inline void pcm_write_samples_24_to_8 (const ddb_waveformat_t * restrict inputfmt, const char * restrict input, const ddb_waveformat_t * restrict outputfmt, char * restrict output, int nsamples, int * restrict channelmap, int outputsamplesize) { for (int s = 0; s < nsamples; s++) { - for (int c = 0; c < inputfmt->channels; c++) { - char *out = output + channelmap[c]; - *out = input[2]; - input += 3; + for (int c = 0; c < outputfmt->channels; c++) { + char *out = output + c; + *out = (input + channelmap[c] * 3)[2]; } + input += 3 * inputfmt->channels; output += outputsamplesize; } } @@ -169,13 +171,14 @@ static inline void pcm_write_samples_24_to_24 (const ddb_waveformat_t * restrict inputfmt, const char * restrict input, const ddb_waveformat_t * restrict outputfmt, char * restrict output, int nsamples, int * restrict channelmap, int outputsamplesize) { for (int s = 0; s < nsamples; s++) { - for (int c = 0; c < inputfmt->channels; c++) { - char *out = output + 3 * channelmap[c]; - out[0] = input[0]; - out[1] = input[1]; - out[2] = input[2]; - input += 3; + for (int c = 0; c < outputfmt->channels; c++) { + char *out = output + 3 * c; + const char *in = input + channelmap[c] * 3; + out[0] = in[0]; + out[1] = in[1]; + out[2] = in[2]; } + input += 3 * inputfmt->channels;
View file
deadbeef-0.5.0.tar.bz2/streamer.c -> deadbeef-0.5.1.tar.bz2/streamer.c
Changed
@@ -64,6 +64,8 @@ static int dsp_on = 0; +static int autoconv_8_to_16 = 1; + static int streaming_terminate; // buffer up to 3 seconds at 44100Hz stereo @@ -103,7 +105,8 @@ static playItem_t *streaming_track; static playItem_t *playlist_track; -static ddb_waveformat_t output_format; +static ddb_waveformat_t output_format; // format that was requested after DSP +static ddb_waveformat_t orig_output_format; // format that was requested before DSP static int formatchanged; static DB_fileinfo_t *fileinfo; @@ -225,9 +228,9 @@ pl_item_ref (playing_track); playing_track->played = 1; - started_timestamp = time (NULL); trace ("from=%p (%s), to=%p (%s) [2]\n", from, from ? pl_find_meta (from, ":URI") : "null", it, it ? pl_find_meta (it, ":URI") : "null"); send_trackchanged (from, it); + started_timestamp = time (NULL); } if (from) { pl_item_unref (from); @@ -327,25 +330,22 @@ } else { trace ("%s not found in current streaming playlist\n", pl_find_meta (it, ":URI")); - // find playlist - playlist_t *old = streamer_playlist; - streamer_playlist = plt_get_list (); - int i = 0; - while (streamer_playlist) { - trace ("searching for %s in playlist %d\n", pl_find_meta (it, ":URI"), i); + + playlist_t *p = pl_get_playlist (it); + if (p) { + if (streamer_playlist) { + plt_unref (streamer_playlist); + } + streamer_playlist = p; int r = str_get_idx_of (it); if (r >= 0) { - trace ("%s found in playlist %d\n", pl_find_meta (it, ":URI"), i); pl_item_unref (it); pl_unlock (); streamer_set_nextsong (r, 3); return 0; } - i++; - streamer_playlist = streamer_playlist->next; } trace ("%s not found in any playlists\n", pl_find_meta (it, ":URI")); - streamer_playlist = old; pl_item_unref (it); } } @@ -355,7 +355,6 @@ if (reason == 1) { if (streamer_playlist) { plt_unref (streamer_playlist); - streamer_playlist = NULL; } streamer_playlist = plt_get_curr (); // check if prev song is in this playlist @@ -445,7 +444,6 @@ return -1; } int r = str_get_idx_of (it); - extern pthread_t pl_lock_tid; pl_unlock (); streamer_set_nextsong (r, 1); return 0; @@ -501,7 +499,6 @@ pl_lock (); if (streamer_playlist) { plt_unref (streamer_playlist); - streamer_playlist = NULL; } streamer_playlist = plt_get_curr (); // check if prev song is in this playlist @@ -552,7 +549,7 @@ // that means 1st in playlist, take amax if (pl_loop_mode == PLAYBACK_MODE_LOOP_ALL) { if (!amax) { - pl_reshuffle (NULL, &amax); + plt_reshuffle (streamer_playlist, NULL, &amax); } it = amax; } @@ -560,6 +557,7 @@ if (!it) { pl_unlock (); + streamer_set_nextsong (-2, 1); return -1; } int r = str_get_idx_of (it); @@ -580,6 +578,7 @@ } if (!it) { pl_unlock (); + streamer_set_nextsong (-2, 1); return -1; } int r = str_get_idx_of (it); @@ -620,6 +619,11 @@ r = 0; } } + + if (pl_get_order () == PLAYBACK_ORDER_SHUFFLE_ALBUMS) { + plt_init_shuffle_albums (plt, r); + } + streamer_set_nextsong (r, 1); return 0; } @@ -880,7 +884,6 @@ pl_lock (); if (streamer_playlist) { plt_unref (streamer_playlist); - streamer_playlist = NULL; } streamer_playlist = plt_get_curr (); pl_unlock (); @@ -894,6 +897,16 @@ } void +streamer_set_generic_output_format (void) { + output_format.bps = 16; + output_format.is_float = 0; + output_format.channels = 2; + output_format.samplerate = 44100; + output_format.channelmask = 3; + streamer_set_output_format (); +} + +void streamer_set_seek (float pos) { seekpos = pos; } @@ -969,14 +982,18 @@ avg_bitrate = -1; if (output->state () != OUTPUT_STATE_PLAYING) { streamer_reset (1); - if (!dsp_on && fileinfo && memcmp (&output_format, &fileinfo->fmt, sizeof (ddb_waveformat_t))) { + if (fileinfo && memcmp (&orig_output_format, &fileinfo->fmt, sizeof (ddb_waveformat_t))) { memcpy (&output_format, &fileinfo->fmt, sizeof (ddb_waveformat_t)); + memcpy (&orig_output_format, &fileinfo->fmt, sizeof (ddb_waveformat_t)); fprintf (stderr, "streamer_set_output_format %dbit %s %dch %dHz channelmask=%X\n", output_format.bps, output_format.is_float ? "float" : "int", output_format.channels, output_format.samplerate, output_format.channelmask); streamer_set_output_format (); } - if (output->state () != OUTPUT_STATE_PLAYING) { + if (0 != output->play ()) { + // give a chance to DSP plugins to convert format to something + // supported + streamer_set_generic_output_format (); if (0 != output->play ()) { - memset (&output_format, 0, sizeof (output_format)); + memset (&orig_output_format, 0, sizeof (orig_output_format)); fprintf (stderr, "streamer: failed to start playback (start track)\n"); streamer_set_nextsong (-2, 0); } @@ -988,13 +1005,13 @@ last_bitrate = -1; avg_bitrate = -1; streamer_reset (1); - if (fileinfo && memcmp (&output_format, &fileinfo->fmt, sizeof (ddb_waveformat_t))) { - memcpy (&output_format, &fileinfo->fmt, sizeof (ddb_waveformat_t)); + if (fileinfo && memcmp (&orig_output_format, &fileinfo->fmt, sizeof (ddb_waveformat_t))) { + memcpy (&orig_output_format, &fileinfo->fmt, sizeof (ddb_waveformat_t)); formatchanged = 1; } // we need to start playback before we can pause it if (0 != output->play ()) { - memset (&output_format, 0, sizeof (output_format)); + memset (&orig_output_format, 0, sizeof (orig_output_format)); fprintf (stderr, "streamer: failed to start playback (start track)\n"); streamer_set_nextsong (-2, 0); } @@ -1105,7 +1122,8 @@ // don't switch if unchanged ddb_waveformat_t prevfmt; memcpy (&prevfmt, &output->fmt, sizeof (ddb_waveformat_t)); - if (memcmp (&output_format, &fileinfo->fmt, sizeof (ddb_waveformat_t))) { + if (memcmp (&orig_output_format, &fileinfo->fmt, sizeof (ddb_waveformat_t))) { + memcpy (&orig_output_format, &fileinfo->fmt, sizeof (ddb_waveformat_t)); memcpy (&output_format, &fileinfo->fmt, sizeof (ddb_waveformat_t)); formatchanged = 1; #if 0 @@ -1256,7 +1274,7 @@ int skip = 0;
View file
deadbeef-0.5.0.tar.bz2/translation/extra.c -> deadbeef-0.5.1.tar.bz2/translation/extra.c
Changed
@@ -88,3 +88,4 @@ // Resampler (Secret Rabbit Code) _("Target Samplerate") _("Quality / Algorythm") +_("Automatic Samplerate (overrides Target Samplerate)")
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.