Skip to content

Commit

Permalink
mc: respect audio player config (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 committed May 14, 2024
1 parent d3446e0 commit 115154e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/multicast/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ static void auplay_write_handler(struct auframe *af, void *arg)
static int aufilt_setup(struct list *aufiltl)
{
struct aufilt_prm prm;
struct config_audio *cfg = &conf_config()->audio;
struct le *le;
int err = 0;

Expand All @@ -270,8 +271,8 @@ static int aufilt_setup(struct list *aufiltl)
if (!list_isempty(&player->filterl))
return 0;

prm.srate = player->ac->srate;
prm.ch = player->ac->ch;
prm.srate = cfg->srate_play ? cfg->srate_play : player->ac->srate;
prm.ch = cfg->channels_play ? cfg->channels_play : player->ac->ch;
prm.fmt = player->dec_fmt;

for (le = list_head(aufiltl); le; le = le->next) {
Expand Down Expand Up @@ -360,7 +361,7 @@ int mcplayer_start(const struct aucodec *ac)
}
}

srate_dsp = player->ac->srate;
srate_dsp = cfg->srate_play ? cfg->srate_play : player->ac->srate;
channels_dsp = player->ac->ch;

prm.srate = srate_dsp;
Expand Down

0 comments on commit 115154e

Please sign in to comment.