Skip to content

Commit 6096c94

Browse files
committed
fix(AudioVisualizationView): noise floor mutable value update
1 parent 411260b commit 6096c94

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

SoundWave/Classes/AudioVisualizationView.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ public class AudioVisualizationView: BaseNibView {
226226
downSampledLength: downSampledLength,
227227
samplesPerPixel: samplesPerPixel,
228228
filter: filter)
229-
print("Status: \(reader.status)")
230229
}
231230

232231
// Process the remaining samples at the end which didn't fit into samplesPerPixel
@@ -242,7 +241,6 @@ public class AudioVisualizationView: BaseNibView {
242241
downSampledLength: downSampledLength,
243242
samplesPerPixel: samplesPerPixel,
244243
filter: filter)
245-
print("Status: \(reader.status)")
246244
}
247245

248246
// if (reader.status == AVAssetReaderStatusFailed || reader.status == AVAssetReaderStatusUnknown)
@@ -295,7 +293,7 @@ public class AudioVisualizationView: BaseNibView {
295293

296294
//Clip to [noiseFloor, 0]
297295
var ceil: Float = 0.0
298-
var noiseFloorMutable: Float = 0.0 // TODO: CHANGE THIS VALUE
296+
var noiseFloorMutable: Float = -80.0 // TODO: CHANGE THIS VALUE
299297
vDSP_vclip(normalizedSamples, 1, &noiseFloorMutable, &ceil, &normalizedSamples, 1, vDSP_Length(normalizedSamples.count))
300298
}
301299

0 commit comments

Comments
 (0)