diff options
author | Bruno Morais <brunosmmm@gmail.com> | 2019-06-06 16:48:23 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2019-06-06 16:49:33 +0200 |
commit | 4594810abea6fa50643c0923a9ee9075e59922ce (patch) | |
tree | e9e60bbcd131192dcc3b5f6a0b40aa727c6f1173 /src/settings.c | |
parent | ef051f835a6393bf3cdfc1ce76943f6db22751c4 (diff) | |
download | pianobar-4594810abea6fa50643c0923a9ee9075e59922ce.tar.gz pianobar-4594810abea6fa50643c0923a9ee9075e59922ce.tar.bz2 pianobar-4594810abea6fa50643c0923a9ee9075e59922ce.zip |
Add audio resampling
Fixes #683
Diffstat (limited to 'src/settings.c')
-rw-r--r-- | src/settings.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/settings.c b/src/settings.c index 4ee1bd6..bcb5dfc 100644 --- a/src/settings.c +++ b/src/settings.c @@ -183,6 +183,7 @@ void BarSettingsRead (BarSettings_t *settings) { settings->outkey = strdup ("6#26FRL$ZWD"); settings->fifo = BarGetXdgConfigDir (PACKAGE "/ctl"); assert (settings->fifo != NULL); + settings->sampleRate = 0; /* default to stream sample rate */ settings->msgFormat[MSG_NONE].prefix = NULL; settings->msgFormat[MSG_NONE].postfix = NULL; @@ -391,6 +392,8 @@ void BarSettingsRead (BarSettings_t *settings) { settings->fifo = BarSettingsExpandTilde (val, userhome); } else if (streq ("autoselect", key)) { settings->autoselect = atoi (val); + } else if (streq ("sample_rate", key)) { + settings->sampleRate = atoi (val); } else if (strncmp (formatMsgPrefix, key, strlen (formatMsgPrefix)) == 0) { static const char *mapping[] = {"none", "info", "nowplaying", |