Voice message waveform from audio files (#1919)

* Add DSWaveformImage

* Add estimated waveform

* Add progress mask modifier

* Add real waveform

* Fix cursor

* Fix scale factor

* Refine ProgressMaskModifier

* Refine waveform logic

* Add docs

* Add waveform placeholder
This commit is contained in:
Alfonso Grillo
2023-10-19 11:01:45 +02:00
committed by GitHub
parent 75da7ba3ec
commit fbcf037240
16 changed files with 175 additions and 61 deletions
@@ -30,7 +30,7 @@ class AudioRecorderState: ObservableObject, Identifiable {
@Published private(set) var recordingState: AudioRecorderRecordingState = .stopped
@Published private(set) var duration = 0.0
@Published private(set) var waveform = Waveform(data: Array(repeating: 0, count: 100))
@Published private(set) var waveform = EstimatedWaveform(data: Array(repeating: 0, count: 100))
private weak var audioRecorder: AudioRecorderProtocol?
private var cancellables: Set<AnyCancellable> = []