OpenSLMediaPlayer


Source link: https://github.com/h6ah4i/android-openslmediaplayer

OpenSLMediaPlayer

Re-implementation of Android's MediaPlayer and audio effect classes based on OpenSL ES APIs.

Motivation

I decided to develop this library to solve these frustrations.

Features

Advantages

  • Provides both C++ and Java API sets
  • Smooth fade in/out when starts/pauses playback
  • High quality resampler
  • 10 bands graphic equalizer & pre. amplifier
  • High quality Visualizer class (floating point, stereo, 32k samples/capture, 60 sampling/second)

Disadvantages

  • Does not support video playback, audio only ( Please use MediaPlayer or ExoPlayer for video playback)
  • Consumes more CPU resources than standard MediaPlayer and other AudioTrack/OpenSL based audio player products (ex. PowerAmp)

Misc.

  • Highly compatibility with standard MediaPlayer and audio effect classes
  • Implements a lot of workarounds, more better behavior and well-tested ( Standard* prefixed API classes)
  • Provides Hybrid media player factory which is a player using OpenSL ES for decoding audio and using AudioTrack for playback. This is the most recommended MediaPlayer because it provides more tolerance for audio glitches than OpenSLMediaPlayer but it can use all features of OpenSLMediaPlayer!
  • Provides some compatibility class or methods for older devices
  • NEON/SSE optimized

Target platforms

  • Android API level 14+ (since this library depends decoding feature introduced from API level 14)

Latest version

  • Version 0.7.5 (May 6, 2017)

Demo application (pre-built example apps)

See GitHub Pages site of this project.

Getting started

Use pre-built library (for Android Studio only)

  1. Add these lines to build.gradle of your project
dependencies {

  compile 'com.h6ah4i.android:openslmediaplayer:0.7.5' 
}
  1. That's all ;)

Build from source

If you want to build this library from source, please refer to this article.

Documentation

Refer to Wiki and JavaDoc.

ToDos

  • More optimize
  • Improve JavaDoc comments

License

This library is licensed under the Apache Software License, Version 2.0, and contains some source code files delivered from product of Android Open Source Project (AOSP). See AOSP.md for details.

Note that this library uses some third party libraries, so you also have to take care of their licenses.


License of OpenSLMediaPlayer (this library)

See LICENSE for full of the license text.

Copyright (C) 2014-2015 Haruki Hasegawa  Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 

License of dependent libraries

cxxdasp, cxxporthelper, OpenSL ES CXX

These libraries are licensed under the Apache Software License, Version 2.0.

PFFFT

This library is licensed under the FFTPACK5 Software License.

Ne10

This library is licensed under the BSD 3-Clause license.

Resources

CameraKit is an extraordinarily easy to use utility to work with the infamous Android Camera and Camera2 APIs.

Android library to display markdown text.

Permission Manager is easily manage Android Marshmallow and nougat runtime permissions.

This library is backwards compatible. In pre-Marshmallow devices permissions are returned as given. This is done using the Android Support library AppCompatActivity and support Fragment methods for permissions.

A simple API-like from html website (scrapper) for Android.

RxJava bindings for DBFlow models, and query language.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes