FORUMS
Remove All Ads from XDA

[APP][Xposed] Audio Balance

1,353 posts
Thanks Meter: 684
 
By robertogl, Senior Member on 29th August 2015, 12:31 PM
Post Reply Email Thread
Hi!
This module allows you to control the left\right balance of the audio of your phone. This is useful in case of damaged headphones or damaged ear (like me ).
After installing this, you have to reboot your phone only one time, then the changes are istant. If you change something while you are listening some music, just pause and immediately resume your music.
You can use any values from 0% to 100% (also thing like 22.3232 is good).

I've tried to keep this simple, so if you have a lower volume on left headphone, just increase that. It will be the module to do the magic*. Keep in mind that set (30%,20%) is the same thing than set (10%,0%). This module doesn't change the global volume of the system, only the left\right balance.

Tested on Cyanogen 12.1, using: Pocked Casts, stock Music player, settings ringtones ( ), ES file manager (its audio player), YouTube.
Download: http://repo.xposed.info/module/com.r...l.audiobalance
Source: https://github.com/robertoglxda/Audio-Balance

Changelog:

11/09/2015
V1.1
- Change internal algorithm (report on XDA if this is working better: you have to change the percentage used until now).
- APK size reduced.
- Improved compatibility (now working also with Spotify).

29/08/2015
V1.1
- New app theme.

29/08/2015
V1.0
- Initial release


*Well, there are some maths here. Android uses some logarithmic functions, but don't worry, you have just to insert the %, the module knows how to do it. I hope.
Also, 'gain' is probably the wrong word. The maximum volume of the system is not touched, if you set (lef gain, right gain)=(10%,0%), technically the module reduces the right volume of 10%. I've done in this way because the users have only to change simple settings, and because if you increases the maximum volume, you lose quality. And we don't want that.
Attached Thumbnails
Click image for larger version

Name:	2015-08-29 16.39.43.png
Views:	16802
Size:	37.9 KB
ID:	3455710   Click image for larger version

Name:	2015-08-29 16.39.54.png
Views:	16650
Size:	69.2 KB
ID:	3455711  
The Following 19 Users Say Thank You to robertogl For This Useful Post: [ View ] Gift robertogl Ad-Free
29th August 2015, 02:10 PM |#2  
Senior Member
Thanks Meter: 2,382
 
Donate to Me
More
Awesome idea!

Just as developer, I have small ideas:

Small note related to the app settings. Instead of EditTextPreference, consider using SeekBarPreference to make more user-friendly.

Personally, I don't like themes with light body and dark action bar (or otherwise). https://github.com/robertosartori/Au.../styles.xml#L8. Plus, Holo is out now

Please consider DeviceDefault theme. Export module description from AndroidManifest to strings.xml file. And possibly increase targetSdkVersion to 22 (since you support LP, right?)
The Following User Says Thank You to pyler For This Useful Post: [ View ] Gift pyler Ad-Free
29th August 2015, 02:21 PM |#3  
robertogl's Avatar
OP Senior Member
Flag Pugnello, Italy
Thanks Meter: 684
 
Donate to Me
More
Quote:
Originally Posted by pyler

Awesome idea!

Just as developer, I have small ideas:

Small note related to the app settings. Instead of EditTextPreference, consider using SeekBarPreference to make more user-friendly.

Personally, I don't like themes with light body and dark action bar (or otherwise). https://github.com/robertosartori/Au.../styles.xml#L8. Plus, Holo is out now

Please consider DeviceDefault theme. Export module description from AndroidManifest to strings.xml file. And possible increase targetSdkVersion to 22 (since you support LP, right?)

Thanks for the suggestions, i will work on this next weeks. I know that there are some thing that i could done better, but i've done this in a rush (i've some exams at university, i should study...). I've just published that when I saw that it worked, i will work on that when i'll have time (also, the code is horrible, it will improve, maybe...)
I've already a 'beta' for myself with SeekBarPreference
And yes, this module should work from 4.0 to 5.1, that targetSdkVersion is my mistake. I will change that.
29th August 2015, 04:13 PM |#4  
Senior Member
Thanks Meter: 2,382
 
Donate to Me
More
Yes, just small tip: For "setVolume" you can use XposedBridge.hookAllMethods do avoid looking at parameters.

But anyway, it works well and it is very useful.
29th August 2015, 05:50 PM |#5  
robertogl's Avatar
OP Senior Member
Flag Pugnello, Italy
Thanks Meter: 684
 
Donate to Me
More
Quote:
Originally Posted by pyler

Yes, just small tip: For "setVolume" you can use XposedBridge.hookAllMethods do avoid looking at parameters.

But anyway, it works well and it is very useful.

Well, for now enjoy the 'DeviceDefault' theme and the correct targetSDK, in version 1.01
29th August 2015, 07:04 PM |#6  
Senior Member
Thanks Meter: 2,382
 
Donate to Me
More
Nicee! u r so fast

If you remove libs folder, you can get around 10 kB APK because you do not need support library.
11th September 2015, 01:06 PM |#7  
robertogl's Avatar
OP Senior Member
Flag Pugnello, Italy
Thanks Meter: 684
 
Donate to Me
More
Little update: i've increase compatibility with other apps (for example version 1.0 isn't working with Spotify, version 1.1 will work) but doing that i've noticed some problems with the function i'm using to calculate the actual volume from the input (0-100). I'll try to fix this and then i will push the update.
11th September 2015, 02:41 PM |#8  
Senior Member
Thanks Meter: 9
 
More
Does this work with phone speakers, nexus 6
11th September 2015, 02:42 PM |#9  
robertogl's Avatar
OP Senior Member
Flag Pugnello, Italy
Thanks Meter: 684
 
Donate to Me
More
Quote:
Originally Posted by halfez

Does this work with phone speakers, nexus 6

Yes, but probably you can't notice it. On a phone the speakers are too close...

Inviato dal mio GT-I9505 utilizzando Tapatalk
11th September 2015, 05:46 PM |#10  
robertogl's Avatar
OP Senior Member
Flag Pugnello, Italy
Thanks Meter: 684
 
Donate to Me
More
I've pushed version 1.1: i've changed an internal algorithm, i don't know if this is working better. For me it is, report if you prefer the old behavior. You will have to change the %: for example, i've used like 5% until now, but i've change to 45% for the same result. It should be more accurate (i'm sure that the volume change isn't 5%...).
Also, it should work with more apps (like Spotify, working only on 1.1 and not on 1.0).
11th September 2015, 05:51 PM |#11  
captaindeep's Avatar
Senior Member
Thanks Meter: 112
 
More
Usefull for me
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes