Fix saving audio clips from lines
This commit is contained in:
parent
dfec6b73b7
commit
59a680e6e1
1 changed files with 1 additions and 1 deletions
|
@ -210,7 +210,7 @@ struct audio_save_clip final : public Command {
|
|||
|
||||
auto start_sample = (start * provider->GetSampleRate() + 999) / 1000;
|
||||
auto end_sample = (end * provider->GetSampleRate() + 999) / 1000;
|
||||
if (start_sample >= provider->GetNumSamples() || start_sample <= end_sample) return;
|
||||
if (start_sample >= provider->GetNumSamples() || start_sample >= end_sample) return;
|
||||
|
||||
size_t bytes_per_sample = provider->GetBytesPerSample() * provider->GetChannels();
|
||||
size_t bufsize = (end_sample - start_sample) * bytes_per_sample;
|
||||
|
|
Loading…
Reference in a new issue