Merge pull request #291 from quantum5/fifo-sample

Allow FIFO input sample rate to be configurable
master
karl 6 years ago committed by GitHub
commit c02528dbd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cava.c
  2. 3
      config.c

@ -461,7 +461,7 @@ as of 0.4.0 all options are specified in config file, see in '/home/username/.co
if (p.im == 2) {
//starting fifomusic listener
thr_id = pthread_create(&p_thread, NULL, input_fifo, (void*)&audio);
audio.rate = 44100;
audio.rate = p.fifoSample;
}
#ifdef PULSE

@ -13,7 +13,7 @@ double monstercat, integral, gravity, ignore, sens;
unsigned int lowcf, highcf;
double *smooth;
int smcount, customEQ, im, om, col, bgcol, autobars, stereo, is_bin, ascii_range,
bit_format, gradient, gradient_count, fixedbars, framerate, bw, bs, autosens, overshoot, waves, FFTbufferSize;
bit_format, gradient, gradient_count, fixedbars, framerate, bw, bs, autosens, overshoot, waves, FFTbufferSize, fifoSample;
};
@ -510,6 +510,7 @@ if (strcmp(inputMethod, "alsa") == 0) {
if (strcmp(inputMethod, "fifo") == 0) {
p->im = 2;
p->audio_source = (char *)iniparser_getstring(ini, "input:source", "/tmp/mpd.fifo");
p->fifoSample = iniparser_getint(ini, "input:sample_rate", 44100);
}
if (strcmp(inputMethod, "pulse") == 0) {
p->im = 3;

Loading…
Cancel
Save