aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQball Cow <qball@qballcow.nl>2006-05-08 08:14:37 +0000
committerQball Cow <qball@qballcow.nl>2006-05-08 08:14:37 +0000
commit37c92653575bb96b3fd44ea6c0ced930b6180e7f (patch)
treeae02c2ef0d6d386938e9315bc480afc70fe1a3eb /src
parentb016b3bc7950db3b12b7b9c1d96c36c0083864f2 (diff)
downloadmpd-37c92653575bb96b3fd44ea6c0ced930b6180e7f.tar.gz
mpd-37c92653575bb96b3fd44ea6c0ced930b6180e7f.tar.xz
mpd-37c92653575bb96b3fd44ea6c0ced930b6180e7f.zip
Commit Jat's patch for bug 1281
git-svn-id: https://svn.musicpd.org/mpd/trunk@4136 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r--src/audio.c13
-rw-r--r--src/audio.h2
-rw-r--r--src/main.c1
-rw-r--r--src/playlist.c2
-rw-r--r--src/playlist.h1
5 files changed, 7 insertions, 12 deletions
diff --git a/src/audio.c b/src/audio.c
index dc5b26e50..da0098f12 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -24,6 +24,7 @@
#include "command.h"
#include "playerData.h"
#include "utils.h"
+#include "playlist.h"
#include <stdlib.h>
#include <string.h>
@@ -37,7 +38,6 @@
#define AUDIO_DEVICE_STATE "audio_device_state:"
#define AUDIO_DEVICE_STATE_LEN 19 /* strlen(AUDIO_DEVICE_STATE) */
#define AUDIO_BUFFER_SIZE 2*MAXPATHLEN
-static void saveAudioDevicesState();
static AudioFormat audio_format;
@@ -232,7 +232,6 @@ void finishAudioConfig() {
void finishAudioDriver() {
int i;
- saveAudioDevicesState();
for(i = 0; i < audioOutputArraySize; i++) {
finishAudioOutput(audioOutputArray[i]);
}
@@ -427,15 +426,7 @@ void printAudioDevices(FILE * fp) {
}
}
-static char * getStateFile() {
- ConfigParam * param = parseConfigFilePath(CONF_STATE_FILE, 0);
-
- if(!param) return NULL;
-
- return param->value;
-}
-
-static void saveAudioDevicesState() {
+void saveAudioDevicesState() {
char *stateFile;
FILE *fp;
int i;
diff --git a/src/audio.h b/src/audio.h
index e7c846a60..3452cc98f 100644
--- a/src/audio.h
+++ b/src/audio.h
@@ -77,4 +77,6 @@ void printAudioDevices(FILE * fp);
void readAudioDevicesState();
+void saveAudioDevicesState();
+
#endif
diff --git a/src/main.c b/src/main.c
index 7565ff584..f7eb8a45a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -595,6 +595,7 @@ int main(int argc, char * argv[]) {
}
savePlaylistState();
+ saveAudioDevicesState();
freeAllInterfaces();
diff --git a/src/playlist.c b/src/playlist.c
index 8eaac641d..5f3c2c21a 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -92,7 +92,7 @@ static void swapOrder(int a, int b);
static int playPlaylistOrderNumber(FILE * fp, int orderNum);
static void randomizeOrder(int start, int end);
-static char * getStateFile() {
+char * getStateFile() {
ConfigParam * param = parseConfigFilePath(CONF_STATE_FILE, 0);
if(!param) return NULL;
diff --git a/src/playlist.h b/src/playlist.h
index 0d0c7b9a8..9b3eb691e 100644
--- a/src/playlist.h
+++ b/src/playlist.h
@@ -118,5 +118,6 @@ int playlistChangesPosId(FILE * fp, mpd_uint32 version);
int PlaylistInfo(FILE * fp, char * utf8file, int detail);
+char * getStateFile();
#endif