summaryrefslogtreecommitdiff
path: root/recipes/musicpd/mpd/save-volume-state.patch
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/musicpd/mpd/save-volume-state.patch
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/musicpd/mpd/save-volume-state.patch')
-rw-r--r--recipes/musicpd/mpd/save-volume-state.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/recipes/musicpd/mpd/save-volume-state.patch b/recipes/musicpd/mpd/save-volume-state.patch
new file mode 100644
index 0000000000..3e9be0eafb
--- /dev/null
+++ b/recipes/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)