B4A Library New AudioBoost Library

Updated July 24th-2013, version 1.02 now supports the new EQLib Ver. 1.10. Both version are attached. Be sure to use AudioBoost ver. 1.01 with EQLib ver. 1.01 and AudioBoost ver. 1.02 with EQLib ver. 1.10.

NOTE: The correct version of EQLib should be installed as stated above. You do not need to check this in the Libs Tab but it should be installed.

Attached is Version 1.01 of a new library to increase the audio volume of your device. Written because I needed more volume on some movies in VideoView, etc.

It only works with Android API Level 9 and up. Special thanks to Stevel05 for allowing me to use portions of his EQ Lib. Please report any issues you may find.

Requires: B4A 2.52+
Copy the AudioBoost.jar and AudioBoost.xml to the Extra Libraries folder.

Code to use this is very simple:
B4X:
Sub Globals2
   Dim AudioB As AudioBoost
   AudioB.Initialize
End Sub 
 
Sub BtnUp_Click
   AudioB.BoostOn
End Sub
 
Sub BtnDn_Click
   AudioB.BoostOff
End Sub
 
Sub Btn_CheckState
     If IsBoosted Then
          AudioB.BoostOff
     End If
End Sub
 

Attachments

  • AudioBoost_1.01.zip
    2.4 KB · Views: 531
  • AudioBoost_1.02.zip
    2.5 KB · Views: 586
Last edited:

stevel05

Expert
Licensed User
Longtime User
Hi Margret,

When you created the audio boost library, did you change the package name of the EQLib class to match the audioboost package?
 

stevel05

Expert
Licensed User
Longtime User
Ok I've just looked and saw how you've done it.

You've compiled the audioboost library against V1.01 of EQLib, if you have that installed on your B4A installation then all works fine. When V1.10 of EQLib is installed on B4A and an app is compiled using audioboost, the version of EQLib that your library was complied against (V1.01) is different to the version that the app is compiled against (V1.1) giving the error, even though the changes were minimal.

I don't plan to make any more changes to the EQLib, so we should be OK from now.

Steve
 

stevel05

Expert
Licensed User
Longtime User
I didn't have an EQLib class. The only class I had was AudioBoost. In the project, I included your Library EQLib by clicking on it in the Lib Tab. That was the only reference to it, is that it was loaded in the Lib tab.

That's where I think the problem has arisen as you have referenced the lib in Eclipse, that copy has not been included in your jar file, when the apk is created by B4A the version installed in B4A at that time is used to compile the APK giving the difference and error.

As a test I removed the eqlib from my addl libs in B4A and the app with audioboost won't compile as eqlib is missing.
 

margret

Well-Known Member
Licensed User
Longtime User
I guess I am more confused now. I can compile with or without the EQLib checked and both compile and run fine. This is where I need to understand better so I can try to make sure my libs have what they need. Do you know how is it compiling and working on mine when I have unchecked the EQLib from the Libs Tab?

Now, when I create the Library, I have to have the EQLib checked. But once it is compiled, I only need to check my AudioBoost lib and include it in any project for it to work, even with EQLib unchecked. This is where I am confused.
 

stevel05

Expert
Licensed User
Longtime User
Even though the eqlib is unchecked it appears that B4A is accessing the eqlib.jar in your addllibs file. If you remove it and the xml file from there, the B4a compilation will fail if audioboost is selected.
 

stevel05

Expert
Licensed User
Longtime User
OK, this a library created from within B4A, sorry, I was a bit slow on the uptake, the above still applies as your compiled audioboost library references an older version of the eqlib library than is used to compile the APK.
 

stevel05

Expert
Licensed User
Longtime User
Is there a way to get B4A to include and compile these needed libs into the one it creates from our project? This way the lib will be self contained and these errors would not occur.

I couldn't find anything that appears relevant, that'll have to be a question for Erel I'm afraid.

If the libs name is the same and the functions and command set are the same between the old and new lib, how does it know the difference? Does it look or reference the version #?

So is that.
 

rgately

Member
Licensed User
Longtime User
Hi Margaret,

I tried out the updated AudioBoost and it does work on my Nexus 7. I hope you find a solution to the library dependency issue.

Thanks
 

rgately

Member
Licensed User
Longtime User
Hi Margret,

Is it possible to make audio boost louder? Because it makes only a small difference on my Nexus 7 and no noticeable difference on my Nexus 7.2.

Thanks
 

rgately

Member
Licensed User
Longtime User
I'm glad to know that the volume should increase by a large amount. The Nexus 7 is a little louder but the Nexus 7.2 doesn't seem any louder.

What I am trying to do is boost the loudness of a speech synthesizer used in my app. Should I expect the AudioBoost library to work with a speech synthesizer? Maybe Android 4.3 has caused another problem. But before I ask for help, I want to be sure I've looked at my code more closely.

Thanks
 
Last edited:

stevel05

Expert
Licensed User
Longtime User
There are quite a few posts on google stating that the latest updates of some devices (including the Nexus) have broken the equalizer here's one.

The Android developers website states that using the equalizer (and other effects) on the global output is deprecated which is why I made the last adjustment to the equalizer itself. It is possible that the new upgrades to the devices are falling into line with that, or just not testing that it still works.
 
Last edited:

rgately

Member
Licensed User
Longtime User
Steve, thanks for the useful information. When you say,
which is why I made the last adjustment to the equalizer itself
Does this mean eqlib 1.10 should work with the latest Android O.S. or are you saying that its the last adjustment you will ever make because the functionality has been depreciated/broken?
 

stevel05

Expert
Licensed User
Longtime User
Steve, thanks for the useful information. When you say, Does this mean eqlib 1.10 should work with the latest Android O.S. or are you saying that its the last adjustment you will ever make because the functionality has been depreciated/broken?

I didn't mean I won't make any more. I meant it was the latest adjustment.

I added the option to assign the equalizer to a specific player ID. While this helps if you are developing an app that uses Mediaplayer or Audiotrack internally, I haven't yet found a way to get the id (to be able to hang the effects on) of a player that is a separate app instead of using the global method that now appears to be broken for some devices.
 

rgately

Member
Licensed User
Longtime User
I downloaded the "Equalizer" app from the Playstore and it worked fine with music but had no affect on the speech synthesizer. I'm starting to think that the EQ or AudioBoost will not work with a speech synthesizer.
 
Top