diff --git a/FlaxEditor/Viewport/Previews/AudioClipPreview.cs b/FlaxEditor/Viewport/Previews/AudioClipPreview.cs index 91c65b02..2ea18725 100644 --- a/FlaxEditor/Viewport/Previews/AudioClipPreview.cs +++ b/FlaxEditor/Viewport/Previews/AudioClipPreview.cs @@ -78,9 +78,8 @@ public override void Draw() float sampleYScale = Height / info.NumChannels; // Sample count - uint totalSampleCount = info.NumSamples; uint numSamplesPerChannel = info.NumSamples / info.NumChannels; - uint samplesPerIndex = (uint)(totalSampleCount / Width); + uint samplesPerIndex = (uint)(numSamplesPerChannel / Width); // Render each channel separately so outer loop is the sound wave channel index for (uint channelIndex = 0; channelIndex < info.NumChannels; channelIndex++)