summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Patrin <papercrane@gmail.com>2005-09-02 17:15:26 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-09-02 17:15:26 +0000
commit65ea38815d60bdb7250e46d5fccd067369b3c93d (patch)
treedda2b015a50a2ba980fa1e8fd5c10c5decca2707
parent74f3606769fee83c891d84776bee6dbb523cb7e8 (diff)
mpd: Add a patch to save/restore volume state in the state_file
-rw-r--r--packages/musicpd/mpd/.mtn2git_empty0
-rw-r--r--packages/musicpd/mpd/save-volume-state.patch31
-rw-r--r--packages/musicpd/mpd_0.11.5.bb5
3 files changed, 34 insertions, 2 deletions
diff --git a/packages/musicpd/mpd/.mtn2git_empty b/packages/musicpd/mpd/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/musicpd/mpd/.mtn2git_empty
diff --git a/packages/musicpd/mpd/save-volume-state.patch b/packages/musicpd/mpd/save-volume-state.patch
new file mode 100644
index 0000000000..3e9be0eafb
--- /dev/null
+++ b/packages/musicpd/mpd/save-volume-state.patch
@@ -0,0 +1,31 @@
+diff -Nur mpd-0.11.5~/src/playlist.c mpd-0.11.5/src/playlist.c
+--- mpd-0.11.5~/src/playlist.c 2005-08-31 17:11:14.000000000 -0700
++++ mpd-0.11.5/src/playlist.c 2005-08-31 17:14:36.000000000 -0700
+@@ -49,6 +49,7 @@
+ #define PLAYLIST_STATE_FILE_CURRENT "current: "
+ #define PLAYLIST_STATE_FILE_TIME "time: "
+ #define PLAYLIST_STATE_FILE_CROSSFADE "crossfade: "
++#define PLAYLIST_STATE_FILE_VOLUME "volume: "
+ #define PLAYLIST_STATE_FILE_PLAYLIST_BEGIN "playlist_begin"
+ #define PLAYLIST_STATE_FILE_PLAYLIST_END "playlist_end"
+
+@@ -275,6 +276,8 @@
+ myfprintf(fp,"%s\n",PLAYLIST_STATE_FILE_STATE_STOP);
+ break;
+ }
++ myfprintf(fp,"%s%i\n",PLAYLIST_STATE_FILE_VOLUME,
++ getVolumeLevel());
+ myfprintf(fp,"%s%i\n",PLAYLIST_STATE_FILE_RANDOM,
+ playlist.random);
+ myfprintf(fp,"%s%i\n",PLAYLIST_STATE_FILE_REPEAT,
+@@ -403,6 +406,10 @@
+ current = atoi(&(buffer
+ [strlen(PLAYLIST_STATE_FILE_CURRENT)]));
+ }
++ else if(strncmp(buffer,PLAYLIST_STATE_FILE_VOLUME,
++ strlen(PLAYLIST_STATE_FILE_VOLUME)) == 0) {
++ changeVolumeLevel(1, atoi(&(buffer[strlen(PLAYLIST_STATE_FILE_VOLUME)])), 0);
++ }
+ else if(strncmp(buffer,
+ PLAYLIST_STATE_FILE_PLAYLIST_BEGIN,
+ strlen(PLAYLIST_STATE_FILE_PLAYLIST_BEGIN)
diff --git a/packages/musicpd/mpd_0.11.5.bb b/packages/musicpd/mpd_0.11.5.bb
index 395d69e79e..7798bb1f56 100644
--- a/packages/musicpd/mpd_0.11.5.bb
+++ b/packages/musicpd/mpd_0.11.5.bb
@@ -4,9 +4,10 @@ LICENSE = "GPLv2"
MAINTAINER = "Chris Larson <kergoth@handhelds.org>"
SECTION = "console/multimedia"
DEPENDS = "libvorbis libogg libid3tag libao zlib libmikmod libmad flac audiofile"
-PR = "r2"
+PR = "r3"
-SRC_URI = "${SOURCEFORGE_MIRROR}/musicpd/mpd-${PV}.tar.gz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/musicpd/mpd-${PV}.tar.gz \
+ file://save-volume-state.patch;patch=1"
inherit autotools