Max numerical value of any audio stream?

Post your questions and help other users.

Moderator: Martin

akhileshg1988
Posts: 109
Joined: 16 Apr 2014 04:57

Re: Max numerical value of any audio stream?

Post by akhileshg1988 » 15 Dec 2017 04:48

Bingwu wrote:Hello Desmanto!

Your idea with the curly braces is good!
Learned something again! :-)

Regards
Peter
I second.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Max numerical value of any audio stream?

Post by Desmanto » 15 Dec 2017 14:31

Bingwu wrote:Hello Desmanto!

Your idea with the curly braces is good!
Learned something again! :-)

Regards
Peter
Hehehe, we both learned something. :)
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
Both method will achieve the same result, both are effective, but not at the same efficiency.

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" :D
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.

Post Reply