I’ve added action which plays sound effect (mp3 format) once speed exceeds 110 kmh (it acts like some kind of speed warning). The problem with it is that RealDash app lags for some time (0.2-0.5 second) every time it plays this sound effect. Can it be solved?
Link to video (pay special attention to rpm needle):
Is this lag evident when the sound plays for the first time, or every time? First time sound is played it has to be loaded into the memory and some lag is unavoidable.
Every time. Now I can presume that lags are occurring, because my device loads sound into the memory every time it plays this sound. Gonna play with this particular action today, hopefully I will find a solution.
Make sure that the sound does not start with silence for the first few milliseconds, if so, then you need to edit eno in the audio editor.
No silence at all, starting and ending with sound. Also the sound effect’s size is only 4kb, so I guess it doesn’t consume so much resources to load this file to the device’s memory. So far the only solution I found to get rid of these freezes is creating a long sound effect (30 seconds or more). Then device freezes only, when starts playing sound effect and works smoothly for 30 seconds.