mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:05:28 +00:00
Include waveform when sending voice messages (#1650)
- New `AudioLevelCalculator` that outputs dB0v rescaled to the [0;1] range. - `VoiceRecorder` now stores the audio levels sampled while recording, then resamples them to 100 samples to use as waveform preview. - Waveform data is carried all the way as a `List<Float>` and converted to `List<Int>` in the [0;1024] range as per matrix spec only before sending it.
This commit is contained in:
+2
@@ -38,9 +38,11 @@ sealed class VoiceRecorderState {
|
||||
*
|
||||
* @property file The recorded file.
|
||||
* @property mimeType The mime type of the file.
|
||||
* @property waveform The waveform of the recording.
|
||||
*/
|
||||
data class Finished(
|
||||
val file: File,
|
||||
val mimeType: String,
|
||||
val waveform: List<Float>,
|
||||
) : VoiceRecorderState()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user