diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-11-03 18:14:43 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-11-03 18:14:43 +0200 |
commit | 1218fd8108aa470d25624ddb85a96a4e98642702 (patch) | |
tree | 61b961907975e041cf8163527ce53a382cf03fb5 | |
parent | fed8ac2ffc30c0e8181259ded8717b0c37262488 (diff) |
make set_periods_near return correct value
-rw-r--r-- | src/pcm.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1154,7 +1154,9 @@ snd_pcm_hw_params_set_periods_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, WARNX("%u", *val); unsigned int round = params->par.appbufsz / *val; assert(sizeof(params->par.round) == sizeof(round)); - return update(pcm, ¶ms->par, ¶ms->par.round, &round, sizeof(*val)); + const int ret = update(pcm, ¶ms->par, ¶ms->par.round, &round, sizeof(*val)); + *val = params->par.appbufsz / params->par.round; + return ret; } return 0; } |