summaryrefslogtreecommitdiff
path: root/src/settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.c')
-rw-r--r--src/settings.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/settings.c b/src/settings.c
index 2e5dab6..e3e811a 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -154,6 +154,15 @@ void BarSettingsRead (BarSettings_t *settings) {
"act_stationselectquickmix", NULL},
};
+ /* apply defaults */
+ #ifdef ENABLE_FAAD
+ settings->audioFormat = PIANO_AF_AACPLUS;
+ #else
+ #ifdef ENABLE_MAD
+ settings->audioFormat = PIANO_AF_MP3;
+ #endif
+ #endif
+
BarGetXdgConfigDir (PACKAGE "/config", configfile, sizeof (configfile));
if ((configfd = fopen (configfile, "r")) == NULL) {
/* use default keyboard shortcuts */
@@ -212,6 +221,12 @@ void BarSettingsRead (BarSettings_t *settings) {
break;
}
}
+ } else if (strcmp ("audio_format", key) == 0) {
+ if (strcmp (val, "aacplus") == 0) {
+ settings->audioFormat = PIANO_AF_AACPLUS;
+ } else if (strcmp (val, "mp3") == 0) {
+ settings->audioFormat = PIANO_AF_MP3;
+ }
}
}