diff options
author | Aurélien Zanelli <aurelien.zanelli@parrot.com> | 2014-10-23 16:32:20 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-10-24 17:56:46 +0300 |
commit | 7110480576985842a7f7f3dbb4d432f0098d51ad (patch) | |
tree | 991c554123b7c692490d666804170b161c0ec4b4 | |
parent | 431e5c2d3243371e4ade8bceab587424c1b2aa6c (diff) | |
download | sbc-7110480576985842a7f7f3dbb4d432f0098d51ad.tar.gz |
sbc: fix frame length calculation for DUAL_CHANNEL mode
According to A2DP specification, section 12.9, for DUAL_CHANNEL mode, we
shall use the same formula as for MONO mode.
-rw-r--r-- | sbc/sbc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1402,7 +1402,7 @@ SBC_EXPORT size_t sbc_get_frame_length(sbc_t *sbc) ret = 4 + (4 * subbands * channels) / 8; /* This term is not always evenly divide so we round it up */ - if (channels == 1) + if (channels == 1 || sbc->mode == SBC_MODE_DUAL_CHANNEL) ret += ((blocks * channels * bitpool) + 7) / 8; else ret += (((joint ? subbands : 0) + blocks * bitpool) + 7) / 8; |