I second.Bingwu wrote:Hello Desmanto!
Your idea with the curly braces is good!
Learned something again!
Regards
Peter
Max numerical value of any audio stream?
Moderator: Martin
-
- Posts: 109
- Joined: 16 Apr 2014 04:57
Re: Max numerical value of any audio stream?
Re: Max numerical value of any audio stream?
Hehehe, we both learned something.Bingwu wrote:Hello Desmanto!
Your idea with the curly braces is good!
Learned something again!
Regards
Peter

Both method will achieve the same result, both are effective, but not at the same efficiency.akhileshg1988 wrote: Hi brother!
Don't know how or why did you get lost in the loop. I successfully used the loop method to set all the audio stream volumes to max.
Thanks
Akhilesh
Taking out the store and restore audio volume; My method require looping and it has three elements per loop (set, store, compare). If the volume step is 15 (usual), total 15 loops, 45 elements execution needed (will be 90 if volume step is 30). While Bingwu's method (besides store/restore audio volume) only require 3 elements (2 after remove the script). So it is far more efficient than mine. Since mine require more loops, by the time Bingwu's flow has finished, mine still in the loops. Thus the statement "lost in the loop"

Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.