From 59a680e6e102c2d76a5a3c2e0c427d408264a668 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Mon, 26 May 2014 20:48:54 -0700 Subject: [PATCH] Fix saving audio clips from lines --- src/command/audio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command/audio.cpp b/src/command/audio.cpp index 6e860f0fc..ae8264dd8 100644 --- a/src/command/audio.cpp +++ b/src/command/audio.cpp @@ -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;