diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2012-06-06 21:13:43 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2012-06-09 15:43:43 +0200 |
commit | 524abb97453f2140fcd3a7fa66d9d43851af19e1 (patch) | |
tree | 814e33a0d04137332f5a341721f96d4f8cccc9e2 /src/settings.c | |
parent | b32348d88f700f4a3b5fb3a95f7ee40336952230 (diff) | |
download | pianobar-524abb97453f2140fcd3a7fa66d9d43851af19e1.tar.gz pianobar-524abb97453f2140fcd3a7fa66d9d43851af19e1.tar.bz2 pianobar-524abb97453f2140fcd3a7fa66d9d43851af19e1.zip |
piano: Select quality instead of audio format
Pandora limited the audio formats we can request explicitly. Don’t rely
on this and use the formats available with the given partner
credentials. Closes #271.
Diffstat (limited to 'src/settings.c')
-rw-r--r-- | src/settings.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/settings.c b/src/settings.c index 3541e28..058c3a7 100644 --- a/src/settings.c +++ b/src/settings.c @@ -121,13 +121,7 @@ void BarSettingsRead (BarSettings_t *settings) { sizeof (dispatchActions) / sizeof (*dispatchActions)); /* apply defaults */ - #ifdef ENABLE_FAAD - settings->audioFormat = PIANO_AF_AACPLUS; - #else - #ifdef ENABLE_MAD - settings->audioFormat = PIANO_AF_MP3; - #endif - #endif + settings->audioQuality = PIANO_AQ_HIGH; settings->autoselect = true; settings->history = 5; settings->volume = 0; @@ -226,15 +220,13 @@ void BarSettingsRead (BarSettings_t *settings) { break; } } - } else if (streq ("audio_format", key)) { - if (streq (val, "aacplus")) { - settings->audioFormat = PIANO_AF_AACPLUS; - } else if (streq (val, "aacplus-lofi")) { - settings->audioFormat = PIANO_AF_AACPLUS_LO; - } else if (streq (val, "mp3")) { - settings->audioFormat = PIANO_AF_MP3; - } else if (streq (val, "mp3-hifi")) { - settings->audioFormat = PIANO_AF_MP3_HI; + } else if (streq ("audio_quality", key)) { + if (streq (val, "low")) { + settings->audioQuality = PIANO_AQ_LOW; + } else if (streq (val, "medium")) { + settings->audioQuality = PIANO_AQ_MEDIUM; + } else if (streq (val, "high")) { + settings->audioQuality = PIANO_AQ_HIGH; } } else if (streq ("autostart_station", key)) { settings->autostartStation = strdup (val); |