diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-02-01 13:35:50 +0100 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-02-01 13:35:50 +0100 |
commit | c9e23f4e29f08fc53b2306311fa70b1cf4b78b0c (patch) | |
tree | cc0f87e31f8528d5eca1b2882449a7071d3cb92e /src/settings.c | |
parent | 516bc854369243b2f1ba4f1c019aca06cbbd736e (diff) | |
download | pianobar-windows-c9e23f4e29f08fc53b2306311fa70b1cf4b78b0c.tar.gz pianobar-windows-c9e23f4e29f08fc53b2306311fa70b1cf4b78b0c.tar.bz2 pianobar-windows-c9e23f4e29f08fc53b2306311fa70b1cf4b78b0c.zip |
mp3 playback support
Now libfaad and/or libmad are used for playback. There's currently no
remaining time displayed for mp3 playback.
Diffstat (limited to 'src/settings.c')
-rw-r--r-- | src/settings.c | 15 |
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; + } } } |