directsoundsrc: Correctly calculate segsize and segtotal
authorSebastian Dröge <sebastian@centricular.com>
Thu, 6 Apr 2017 13:13:41 +0000 (16:13 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 6 Apr 2017 13:15:28 +0000 (16:15 +0300)
commit6d256d9908e292f6c593bf45e69354f6b613cc8b
tree04e6ef2f928b52e97ba3dab955b0dc58b8445cf7
parent58370ed6cf733380024fad3eb39334d06cfc7534
directsoundsrc: Correctly calculate segsize and segtotal

segsize should be based on latency-time, and must be a multiple of the
frame size. segtotal should be based on buffer-time and segsize.

This prevents errors caused by outputting buffers that are not a
multiple of the frame size, and actually makes the buffer-time and
latency-time properties do what they're supposed to do.
sys/directsound/gstdirectsoundsrc.c
sys/directsound/gstdirectsoundsrc.h