element-x-ada/libraries
Marco Romano 3ec62ad58a
Use Float instead of Double for all the level metering logic. (#1645)
This is in preparation of further changes to the way the audio level is computed and to allow recording and sending of the waveform. The main reasoning behind the change is twofold:
1) We don't need the precision of Double in our context (we just need a rough indication of the changes in audio level to successfully draw a level meter or a waveform in our UI).
2) Performance: It is true that on 64 bit CPUs single operations involving Floats or Doubles take the same amount of time (i.e one clock cycle). But there are other aspects here that vouch in favor of Floats:
	- A float takes half the space in memory compared to a double, so when storing long lists of them this can add up.
	- On Android O and greater the ART runtime can "vectorize" certain operations on lists and make use of the CPU's SIMD registers which are generally 128 bits. So by using floats 4 of them can fit and be computed at the same time whilst with doubles only 2 will fit halving the throughput.

References:
- https://source.android.com/docs/core/runtime/improvements
- https://www.slideshare.net/linaroorg/automatic-vectorization-in-art-android-runtime-sfo17216
2023-10-26 12:55:23 +00:00
..
androidutils Localazy sync 2023-09-18 16:42:35 +02:00
architecture Integrate Element Call with widget API (#1581) 2023-10-19 15:38:43 +00:00
core Record and send voice messages (#1596) 2023-10-23 17:28:00 +00:00
coroutines
cryptography Pin : some clean up and fixes 2023-10-18 15:55:52 +02:00
dateformatter Enable detekt rules AlsoCouldBeApply and fix existing issues. 2023-07-26 11:10:46 +02:00
deeplink Make the functions in SystemUtils extensions (#899) 2023-07-18 13:11:11 +00:00
designsystem Merge branch 'develop' into dla/feature/custom_room_notification_settings_list 2023-10-24 17:20:15 +01:00
di Add global context.cacheDir provider. (#1606) 2023-10-19 14:07:45 +02:00
encrypted-db Other fixes as per https://cashapp.github.io/sqldelight/2.0.0/upgrading-2.0/ 2023-10-13 15:17:12 +02:00
eventformatter Update dependency org.matrix.rustcomponents:sdk-android to v0.1.63 (#1619) 2023-10-20 22:32:59 +02:00
featureflag Fix compilation 2023-10-20 20:26:04 +02:00
maplibre-compose Konsist: add test Data class state MUST not have default value, and fix existing issues 2023-10-10 17:31:04 +02:00
matrix Refactor of voice message playing code (#1643) 2023-10-26 12:51:12 +02:00
matrixui Konsist: add test to ensure filename match top level Composable View, and fix existing issue 2023-10-10 15:39:22 +02:00
mediapickers Konsist: add rule obout test class name, and fix existing issue 2023-10-12 15:03:50 +02:00
mediaupload Record and send voice messages (#1596) 2023-10-23 17:28:00 +00:00
network Fix account provider change on nightly and release (#861) 2023-07-13 14:46:57 +02:00
permissions Record and send voice messages (#1596) 2023-10-23 17:28:00 +00:00
preferences Integrate Element Call with widget API (#1581) 2023-10-19 15:38:43 +00:00
push Update dependency org.matrix.rustcomponents:sdk-android to v0.1.63 (#1619) 2023-10-20 22:32:59 +02:00
pushproviders Share tag with other modules. 2023-09-15 17:03:32 +02:00
pushstore Include desugaring lib also in library modules (#1604) 2023-10-19 09:00:32 +00:00
rustsdk Ensure the binary will not be commited again. 2023-07-06 15:10:02 +02:00
session-storage Include desugaring lib also in library modules (#1604) 2023-10-19 09:00:32 +00:00
testtags Ensure testTag does not resize the Composable. 2023-09-13 16:39:49 +02:00
textcomposer Use Float instead of Double for all the level metering logic. (#1645) 2023-10-26 12:55:23 +00:00
theme Konsist: add test to ensure filename match top level Composable View, and fix existing issue 2023-10-10 15:39:22 +02:00
ui-strings Sync Strings (#1623) 2023-10-23 08:20:49 +00:00
ui-utils Add voice message recording duration indicator and limit (#1628) 2023-10-24 11:44:53 +00:00
usersearch Rename var 2023-07-07 12:04:06 +01:00
voicerecorder Use Float instead of Double for all the level metering logic. (#1645) 2023-10-26 12:55:23 +00:00