mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
directsoundsink: fix modulo math with ringbuffer parameters
To get a multiple of bpf use a subtraction and not an addition https://bugzilla.gnome.org/show_bug.cgi?id=745684
This commit is contained in:
parent
b0ce43cde3
commit
c194f2de12
1 changed files with 2 additions and 2 deletions
|
@ -444,12 +444,12 @@ gst_directsound_sink_prepare (GstAudioSink * asink,
|
|||
gst_util_uint64_scale_int (wfx.nAvgBytesPerSec, spec->buffer_time,
|
||||
GST_MSECOND);
|
||||
/* Make sure we make those numbers multiple of our sample size in bytes */
|
||||
dsoundsink->buffer_size += dsoundsink->buffer_size % spec->info.bpf;
|
||||
dsoundsink->buffer_size -= dsoundsink->buffer_size % spec->info.bpf;
|
||||
|
||||
spec->segsize =
|
||||
gst_util_uint64_scale_int (wfx.nAvgBytesPerSec, spec->latency_time,
|
||||
GST_MSECOND);
|
||||
spec->segsize += spec->segsize % spec->info.bpf;
|
||||
spec->segsize -= spec->segsize % spec->info.bpf;
|
||||
spec->segtotal = dsoundsink->buffer_size / spec->segsize;
|
||||
} else {
|
||||
#ifdef WAVE_FORMAT_DOLBY_AC3_SPDIF
|
||||
|
|
Loading…
Reference in a new issue