diff --git a/sndiod/dev.c b/sndiod/dev.c index ba90580..b5dfc78 100644 --- a/sndiod/dev.c +++ b/sndiod/dev.c @@ -640,8 +640,8 @@ dev_mix_adjvol(struct dev *d) } weight /= n; } - if (weight > i->mix.maxweight) - weight = i->mix.maxweight; + if (weight > i->opt->maxweight) + weight = i->opt->maxweight; i->mix.weight = ADATA_MUL(weight, MIDI_TO_ADATA(d->master)); #ifdef DEBUG if (log_level >= 3) { @@ -649,7 +649,7 @@ dev_mix_adjvol(struct dev *d) log_puts(": set weight: "); log_puti(i->mix.weight); log_puts("/"); - log_puti(i->mix.maxweight); + log_puti(i->opt->maxweight); log_puts("\n"); } #endif @@ -1685,7 +1685,6 @@ found: s->xrun = XRUN_IGNORE; s->tstate = MMC_OFF; } - s->mix.maxweight = s->opt->maxweight; s->dup = s->opt->dup; s->appbufsz = d->bufsz; s->round = d->round; diff --git a/sndiod/dev.h b/sndiod/dev.h index 24296ea..a5693a0 100644 --- a/sndiod/dev.h +++ b/sndiod/dev.h @@ -44,7 +44,6 @@ struct slot { struct aparams par; /* socket side params */ struct { int weight; /* dynamic range */ - int maxweight; /* max dynamic range allowed */ unsigned int vol; /* volume within the vol */ struct abuf buf; /* socket side buffer */ int bpf; /* byte per frame */