converter/tospdif: convert DTS 14bit to DTS 16bit
commit7af9abbecb62f8b77640786a222a78ea6ee29cf2
authorThomas Guillem <thomas@gllm.fr>
Wed, 11 Jul 2018 11:01:40 +0000 (11 13:01 +0200)
committerThomas Guillem <thomas@gllm.fr>
Wed, 11 Jul 2018 11:31:27 +0000 (11 13:31 +0200)
treee73a9a4f204de787c3dc00d16db58006de5529f4
parentd701887137e647ecbb0512912b0069367c4bbb80
converter/tospdif: convert DTS 14bit to DTS 16bit

DTS inside WAV (@44.1kHZ) use 14bits words and have a fsize of 4096 bytes for
1024 samples. This means there is no room to put the IEC61937 header (IEC frame
size = 4096 = fsize = 1024 samples x 4).

Before this commit, we sent the IEC61937 frame without the header, this worked
only for some receivers.

This commit converts the 14bit sample to 16bit in order to have room for the
IEC61937 header. The new fsize is 4096*14/16 = 3584, so there is room for the 8
bytes header (plus 0 padding until 4096).
modules/audio_filter/converter/tospdif.c