Fix saving audio clips

Actually write all of the samples rather than half of them.
This commit is contained in:
Thomas Goyne 2014-06-15 17:04:29 -07:00
parent 5f9fc95fb4
commit cb71a3d05d
1 changed files with 1 additions and 1 deletions

View File

@ -235,7 +235,7 @@ struct audio_save_clip final : public Command {
size_t spr = 65536 / bytes_per_sample;
std::vector<char> buf(bufsize);
for (int64_t i = start_sample; i < end_sample; i += spr) {
buf.resize(std::min<size_t>(spr, end_sample - i));
buf.resize(std::min<size_t>(spr, end_sample - i) * bytes_per_sample);
provider->GetAudio(&buf[0], i, buf.size());
out.write(buf);
}