summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2018-12-03 01:47:55 +0200
committerJari Vetoniemi <mailroxas@gmail.com>2018-12-03 01:47:55 +0200
commit6b8df9bf938e2d5a9ffc15996e4f2ed7ceb6a0b1 (patch)
tree9c87dc0281408ea6bcdbbcaea9598a4f9d38c6bd
parentfe6274e9e0c0cf101b7afff38744dfa791cdb098 (diff)
pcm: limit bits to 24
-rw-r--r--src/pcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pcm.c b/src/pcm.c
index 6051697..3bdd6a6 100644
--- a/src/pcm.c
+++ b/src/pcm.c
@@ -913,7 +913,7 @@ snd_pcm_hw_params_set_format(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pc
WARNX1("format needs to be transcoded!");
const struct sio_par old = params->par;
- params->par.bits = info->enc.bits;
+ params->par.bits = MIN(info->enc.bits, 24);
params->par.bps = info->enc.bps;
params->par.sig = info->enc.sig;
params->par.le = (params->needs_conversion ? SIO_LE_NATIVE : info->enc.le);