output/jack: fix bogus assertion failure

Regression from commit 45071607aa

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1571
This commit is contained in:
Max Kellermann 2022-08-08 22:01:56 +02:00
parent 88793cbc1a
commit 0279f4fb57

View File

@ -693,13 +693,13 @@ JackOutput::WriteSamples(const float *src, size_t n_frames)
std::size_t
JackOutput::Play(std::span<const std::byte> _src)
{
const size_t frame_size = audio_format.GetFrameSize();
assert(_src.size() % frame_size == 0);
const auto src = FromBytesStrict<const float>(_src);
pause = false;
const size_t frame_size = audio_format.GetFrameSize();
assert(src.size() % frame_size == 0);
const std::size_t n_frames = src.size() / audio_format.channels;
while (true) {