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: 426
  • AudioBoost_1.02.zip
    2.5 KB · Views: 488
Last edited:

Vader

Well-Known Member
Licensed User
Longtime User
Sounds great, thanks for the contribution.

One question though...

Why didn't you do use a different naming for your methods to do something like this:

B4X:
Sub Globals
     Dim Audio As AudioBoost
     Audio.Initialize
End sub

Sub SetAudioBoostOn 'Use any name for sub you want
     Audio.SetAudioBoost(True)
End Sub

Sub SetAudioBoostOff 'Use any name for sub you want
     Audio.SetAudioBoost(False)
End Sub

Not that it really matters - the functionality is still there. I was just wondering that's all.
 

Vader

Well-Known Member
Licensed User
Longtime User
I try to stay away from key/reserved words or names of other libraries. There is already a Lib named Audio.

I think I confused you.

If you read it again, I meant that instead of a method called AudioBoostOn, why not call it SetAudioBoost?
 

rgately

Member
Licensed User
Longtime User
Hi Margaret,

I am trying to get your library to work but it crashes every time.

I'm using...
B4A ver 2.71 (android:targetSdkVersion="14")
eqlib ver 1.10
audioboost ver 1.01

I'm running the code on a Nexus 7

I am using the eqgui2 project that came with the eqlib library to test the audioboost. The eqlib portion of the code works fine. I can declare the AudioBoost library but I cannot initialize it or use it, and the app crashes.

Please tell me what I'm missing?
 

rgately

Member
Licensed User
Longtime User
The first thing is to try the AudioBoost lib without the EqLib included/loaded. It may be there is a conflict between these two libraries.

I created a simple app to test just AudioBoost. At this point, all I'm trying to do is initialize AudioBoost.

I started a new project, set sdkVersion to 14 in the manifest, loaded the AudioBoost library and no other libraries.

In Sub Globals, I put:

B4X:
dim AudioB as AudioBoost 
AudioB.initialize

The app crashes everytime on AudioB.initialize

The log, on the right, shows a list of about 20 errors or problems. The first one is shown below.

java.lang.NoClassDefFoundError: eqlib.EQlib
at com.audioboost.audioboost. class globals(audioboost.java:98)


When I originally saw this, I thought that the EQlib library must also be required, so I loaded it too.

Let me know if you think of something else I can try, to sucessfully initialize AudioBoost.
 

margret

Well-Known Member
Licensed User
Longtime User
I re-compiled my app that uses the AudioBoost in the new B4A and it works fine. I did this to check that B4A 2.7x didn't require a change in the lib. I don't know at this point if it's the Nexus 7 device or a change in 4.2.2 that may be causing this. It works fine on 4.2.1. I don't have a device with 4.2.2 to try this on. Maybe someone on this forum will see this that has 4.2.2 and will test this for us.
 

NJDude

Expert
Licensed User
Longtime User
Ok, I get the same errors
B4X:
java.lang.NoClassDefFoundError: eqlib.EQlib
I tested on a 4.2.2 and 4.1.1 and 4.0.4 device, same problem on all, maybe the EQLib lib you have is not the same to the one I just downloaded, I got EQLib v1.10
 

margret

Well-Known Member
Licensed User
Longtime User
Mine shows 1.01 in the libraries tab when checked. However, If I only check AudioBoost and compile and run the sample it works fine. I am using B4A 2.7. Because the reference is compiled into my library, why would it quit working. I need to check this on B4A 2.71 and I will download 1.1 of EQLibs and see what happens.
 
Last edited:

margret

Well-Known Member
Licensed User
Longtime User
@ NJDude

So now I would like to understand why. The only thing I did was load the new EQLib and then re-compile my AudioBoost lib. Looking at the XML file of both my version 1.01 and version 1.02 the XML files are the same and did not change. I also changed no code in my project. So, can you tell me why re-compiling fixed these errors.
 
Top