[streaming] review: remove bps/channels from cfg, undoc icy_metaint cfg option

This commit is contained in:
whatdoineed2do/Ray
2019-09-14 08:50:52 +01:00
committed by ejurgensen
parent 7ccd32c354
commit 008e11bfb8
3 changed files with 2 additions and 23 deletions

View File

@@ -191,8 +191,6 @@ static cfg_opt_t sec_mpd[] =
static cfg_opt_t sec_streaming[] =
{
CFG_INT("sample_rate", 44100, CFGF_NONE),
CFG_INT("bits_per_sample", 16, CFGF_NONE),
CFG_INT("channels", 2, CFGF_NONE),
CFG_INT("bit_rate", 192, CFGF_NONE),
CFG_INT("icy_metaint", 16384, CFGF_NONE),
CFG_END()

View File

@@ -625,25 +625,17 @@ int
streaming_init(void)
{
int ret;
cfg_t* cfgsec;
cfg_t *cfgsec;
int val;
cfgsec = cfg_getsec(cfg, "streaming");
val = cfg_getint(cfgsec, "sample_rate");
if (val%11025 > 0 && val%12000 > 0 && val%8000)
if (val%11025 > 0 && val%12000 > 0 && val%8000 > 0)
DPRINTF(E_LOG, L_STREAMING, "non standard streaming sample_rate=%d, defaulting\n", val);
else
streaming_quality_out.sample_rate = val;
val = cfg_getint(cfgsec, "bits_per_sample");
if (val > 0)
streaming_quality_out.bits_per_sample = val;
val = cfg_getint(cfgsec, "channels");
if (val > 0)
streaming_quality_out.channels = val;
val = cfg_getint(cfgsec, "bit_rate");
switch (val)
{