diff --git a/src/output/plugins/JackOutputPlugin.cxx b/src/output/plugins/JackOutputPlugin.cxx index 31f15a70d..3667e5729 100644 --- a/src/output/plugins/JackOutputPlugin.cxx +++ b/src/output/plugins/JackOutputPlugin.cxx @@ -693,13 +693,13 @@ JackOutput::WriteSamples(const float *src, size_t n_frames) std::size_t JackOutput::Play(std::span _src) { + const size_t frame_size = audio_format.GetFrameSize(); + assert(_src.size() % frame_size == 0); + const auto src = FromBytesStrict(_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) {