Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
dmrschmidt committed Jan 16, 2024
1 parent 0493aa7 commit c345203
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// StaticWaveformRenderer.swift
// DSWaveformImageExample-iOS
//
// Created by Dennis Schmidt on 16.01.24.
//

import Foundation
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public struct LinearWaveformRenderer: WaveformRenderer {
let positionAdjustedGraphCenter = position.offset() * graphRect.size.height
let drawMappingFactor = graphRect.size.height * configuration.verticalScalingFactor
let minimumGraphAmplitude: CGFloat = 1 / configuration.scale // we want to see at least a 1px line for silence
var maxAmplitude: CGFloat = 0.0 // we know 1 is our max in normalized data, but we keep it 'generic'

for (index, sample) in samples.enumerated() {
let adjustedIndex: Int
Expand All @@ -75,7 +74,6 @@ public struct LinearWaveformRenderer: WaveformRenderer {
let drawingAmplitude = max(minimumGraphAmplitude, invertedDbSample * drawMappingFactor)
let drawingAmplitudeUp = positionAdjustedGraphCenter - drawingAmplitude
let drawingAmplitudeDown = positionAdjustedGraphCenter + drawingAmplitude
maxAmplitude = max(drawingAmplitude, maxAmplitude)

switch sides {
case .up:
Expand Down

0 comments on commit c345203

Please sign in to comment.