From c9e23f4e29f08fc53b2306311fa70b1cf4b78b0c Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 1 Feb 2009 13:35:50 +0100 Subject: mp3 playback support Now libfaad and/or libmad are used for playback. There's currently no remaining time displayed for mp3 playback. --- src/settings.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/settings.c') 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; + } } } -- cgit v1.2.3