diff options
author | Bruno Morais <brunosmmm@gmail.com> | 2019-06-06 16:54:11 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2019-06-06 16:54:11 +0200 |
commit | da7daddf453601a86c9b94c8c31da1fe4c76e89b (patch) | |
tree | 56006f75a4aca8a3ea47e1227d25ab4ff9f34326 /src/settings.c | |
parent | 4594810abea6fa50643c0923a9ee9075e59922ce (diff) | |
download | pianobar-da7daddf453601a86c9b94c8c31da1fe4c76e89b.tar.gz pianobar-da7daddf453601a86c9b94c8c31da1fe4c76e89b.tar.bz2 pianobar-da7daddf453601a86c9b94c8c31da1fe4c76e89b.zip |
Allow writing audio to a named pipe (fifo) instead of live device
Fixes #684
Diffstat (limited to 'src/settings.c')
-rw-r--r-- | src/settings.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/settings.c b/src/settings.c index bcb5dfc..7518177 100644 --- a/src/settings.c +++ b/src/settings.c @@ -125,6 +125,7 @@ void BarSettingsDestroy (BarSettings_t *settings) { free (settings->npStationFormat); free (settings->listSongFormat); free (settings->fifo); + free (settings->audioPipe); free (settings->rpcHost); free (settings->rpcTlsPort); free (settings->partnerUser); @@ -182,6 +183,7 @@ void BarSettingsRead (BarSettings_t *settings) { settings->inkey = strdup ("R=U!LH$O2B#"); settings->outkey = strdup ("6#26FRL$ZWD"); settings->fifo = BarGetXdgConfigDir (PACKAGE "/ctl"); + settings->audioPipe = NULL; assert (settings->fifo != NULL); settings->sampleRate = 0; /* default to stream sample rate */ @@ -390,6 +392,9 @@ void BarSettingsRead (BarSettings_t *settings) { } else if (streq ("fifo", key)) { free (settings->fifo); settings->fifo = BarSettingsExpandTilde (val, userhome); + } else if (streq ("audio_pipe", key)) { + free (settings->audioPipe); + settings->audioPipe = BarSettingsExpandTilde (val, userhome); } else if (streq ("autoselect", key)) { settings->autoselect = atoi (val); } else if (streq ("sample_rate", key)) { |