mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-23 11:32:34 -05:00
[streaming] review: remove bps/channels from cfg, undoc icy_metaint cfg option
This commit is contained in:
parent
7ccd32c354
commit
008e11bfb8
@ -374,17 +374,6 @@ streaming {
|
||||
# Sample rate, typically 44100 or 48000
|
||||
# sample_rate = 44100
|
||||
|
||||
# BPS, 16/24/32
|
||||
# bits_per_sample = 16
|
||||
|
||||
# Channels
|
||||
# channels = 2
|
||||
|
||||
# Set the MP3 streaming bit rate (in kbps), valid options: 64 / 96 / 128 / 192 / 320
|
||||
# bit_rate = 192
|
||||
|
||||
# Byte interval to send metadata to client, if requested. Should avoid
|
||||
# low values to avoid audiable/stuttering problems with small input-
|
||||
# bufffer clients.
|
||||
# icy_metaint = 16384
|
||||
}
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user