Optimize segmented layout decode samples

This commit is contained in:
bnnm 2018-08-26 01:05:07 +02:00
parent ee03726bbc
commit 88f50985de

View File

@ -42,8 +42,7 @@ void render_vgmstream_segmented(sample * buffer, int32_t sample_count, VGMSTREAM
continue; continue;
} }
/* decode samples */ samples_to_do = vgmstream_samples_to_do(samples_this_block, sample_count, vgmstream);
samples_to_do = vgmstream_samples_to_do(samples_this_block, 1, vgmstream); //todo should use a buffer
if (samples_to_do > sample_count - samples_written) if (samples_to_do > sample_count - samples_written)
samples_to_do = sample_count - samples_written; samples_to_do = sample_count - samples_written;