B4A Library Freeware Advanced Audio (AAC) Decoder for Android

Now you are able to play AAC radio streams in background (as a Service).
This is not a wrapper, but usage of JavaObject to expose Events and Classes from library.
You can also create wrapper from B4a alone.

Copy aacdecoder-android-0.8.jar from LIBRARY folder into your "Additional libraries" folder or in B4A "Libraries" folder.

aacdecoder-android-0.8.jar
Library info 1: https://code.google.com/p/aacdecoder-android/
Library info 2: https://github.com/vbartacek/aacdecoder-android

This is mainly for decoding AAC streams, you can also decode MP3/MPEG but player sometimes will not play and in log you will see error
PlayerCallback_Event - playerException(1): java.lang.IllegalArgumentException: Invalid audio buffer size.
Check https://code.google.com/p/aacdecoder-android/issues/detail?id=66
I have 1 error in 100 runs for MP3/MPEG decoding. You can also catch this error and force player restart as a workaround.
No errors in AAC decoding.
You can always use native player for MP3/MPEG and this player for AAC only.

Add to your manifest
AddPermission(android.permission.INTERNET)

EDIT:
Project attached to post.

EDIT2:
Attached aacdecoder-android-0.8.jar with some bug fixes
 

Attachments

  • AAC_and_MP3_Stream_Decoding.zip
    439.5 KB · Views: 595
  • aacdecoder-android-0.8.jar
    434.5 KB · Views: 508
Last edited:

Informatix

Expert
Licensed User
Longtime User
Now you are able to play AAC radio streams in background (as a Service).
This is not a wrapper, but usage of JavaObject to expose Events and Classes from library.
You can also create wrapper from B4a alone.

Copy aacdecoder-android-0.8.jar from LIBRARY folder into your "Additional libraries" folder or in B4A "Libraries" folder.

aacdecoder-android-0.8.jar
Library info 1: https://code.google.com/p/aacdecoder-android/
Library info 2: https://github.com/vbartacek/aacdecoder-android

This is mainly for decoding AAC streams, you can also decode MP3/MPEG but player sometimes will not play and in log you will see error
PlayerCallback_Event - playerException(1): java.lang.IllegalArgumentException: Invalid audio buffer size.
Check https://code.google.com/p/aacdecoder-android/issues/detail?id=66
I have 1 error in 100 runs for MP3/MPEG decoding. You can also catch this error and force player restart as a workaround.
No errors in AAC decoding.
You can always use native player for MP3/MPEG and this player for AAC only.

Add to your manifest
AddPermission(android.permission.INTERNET)

Inside attached file AAC_and_MP3_Stream_Decoding.txt is download link.
To shrink this library, one can remove the /lib/mips folder inside the jar. AFAIK, the number of Android devices with the concerned architecture is next to none.
 

moster67

Expert
Licensed User
Longtime User
Not with all online streams it is possible...
 
Top