Skip to content

Commit

Permalink
static_cast outputFrames to size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
sakertooth committed Jul 30, 2024
1 parent 20a935a commit e14cb7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ bool Sample::play(SampleFrame* dst, PlaybackState* state, size_t numFrames, doub
state->error = src_set_ratio(state->resampleState, resampleRatio);
assert(state->error == 0 && src_sterror(state->error));

const auto outputFrames = src_callback_read(state->resampleState, resampleRatio, numFrames, &dst[0][0]);
const auto outputFrames = static_cast<size_t>(src_callback_read(state->resampleState, resampleRatio, numFrames, &dst[0][0]));
if (outputFrames > 0 && outputFrames < numFrames)
{
std::fill_n(dst + outputFrames, numFrames - outputFrames, SampleFrame{});
Expand Down

0 comments on commit e14cb7c

Please sign in to comment.