├── .gitignore ├── .gitmodules ├── AOSP.md ├── LICENSE ├── NOTICE ├── README.md ├── RELEASE-NOTES.md ├── build.gradle ├── common ├── android-disable-default-ndk-build.gradle ├── android-maven-publish.gradle ├── android-set-common-properties.gradle ├── android-setup-custom-ndk-build.gradle └── android-signing-utils.gradle ├── example ├── .gitignore ├── NOTICE ├── build.gradle ├── etc │ └── app_icon.svg ├── proguard-rules.pro └── src │ └── main │ ├── .gitignore │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── h6ah4i │ │ └── android │ │ └── example │ │ └── openslmediaplayer │ │ └── app │ │ ├── AppBaseFragment.java │ │ ├── MainActivity.java │ │ ├── ModeSelectListItemView.java │ │ ├── MyApplication.java │ │ ├── NavigationDrawerFragment.java │ │ ├── contents │ │ ├── AboutFragment.java │ │ ├── AudioEffectSettingsBaseFragment.java │ │ ├── BassBoostFragment.java │ │ ├── ContentsBaseFragment.java │ │ ├── EnvironmentalReverbFragment.java │ │ ├── EqualizerFragment.java │ │ ├── HQEqualizerFragment.java │ │ ├── HQVisualizerFragment.java │ │ ├── LoudnessEnhancerFragment.java │ │ ├── PlayerControlFragment.java │ │ ├── PresetReverbFragment.java │ │ ├── VirtualizerFragment.java │ │ └── VisualizerFragment.java │ │ ├── framework │ │ ├── AppEvent.java │ │ └── AppEventBus.java │ │ ├── model │ │ ├── BaseAudioEffectStateStore.java │ │ ├── BassBoostStateStore.java │ │ ├── EnvironmentalReverbStateStore.java │ │ ├── EqualizerStateStore.java │ │ ├── EventDefs.java │ │ ├── GlobalAppController.java │ │ ├── GlobalAppControllerService.java │ │ ├── HQEqualizerStateStore.java │ │ ├── HQVisualizerStateStore.java │ │ ├── LoudnessEnhancerStateStore.java │ │ ├── MediaMetadata.java │ │ ├── MediaPlayerStateStore.java │ │ ├── NotificationIds.java │ │ ├── PreAmpStateStore.java │ │ ├── PresetReverbStateStore.java │ │ ├── VirtualizerStateStore.java │ │ └── VisualizerStateStore.java │ │ ├── utils │ │ ├── ActionBarTileBuilder.java │ │ ├── EnvironmentalReverbPresetsUtil.java │ │ ├── EqualizerUtil.java │ │ ├── GlobalAppControllerAccessor.java │ │ ├── HQEqualizerUtil.java │ │ ├── LocalServiceBinder.java │ │ ├── MediaMetadataBuilder.java │ │ ├── NotificationBuilder.java │ │ └── OnItemSelectedListenerWrapper.java │ │ └── visualizer │ │ ├── AudioLevelMeterSurfaceView.java │ │ ├── BaseAudioVisualizerSurfaceView.java │ │ ├── FftVisualizerSurfaceView.java │ │ ├── FloatColor.java │ │ ├── HQFftVisualizerSurfaceView.java │ │ ├── HQWaveformVisualizerSurfaceView.java │ │ └── WaveformVisualizerSurfaceView.java │ ├── jni │ ├── .clang-format │ ├── Android.mk │ ├── Application.mk │ └── dummy.cpp │ └── res │ ├── drawable-hdpi │ └── ic_launcher.png │ ├── drawable-mdpi │ └── ic_launcher.png │ ├── drawable-xhdpi │ └── ic_launcher.png │ ├── drawable-xxhdpi │ └── ic_launcher.png │ ├── drawable-xxxhdpi │ └── ic_launcher.png │ ├── layout │ ├── action_bar_spacer.xml │ ├── action_bar_spinner_list_item.xml │ ├── action_bar_switch.xml │ ├── activity_main.xml │ ├── fragment_about.xml │ ├── fragment_bassboost.xml │ ├── fragment_environment_reverb.xml │ ├── fragment_equalizer.xml │ ├── fragment_hq_equalizer.xml │ ├── fragment_hq_visualizer.xml │ ├── fragment_loudness_enhancer.xml │ ├── fragment_navigation_drawer.xml │ ├── fragment_player_control.xml │ ├── fragment_preset_reverb.xml │ ├── fragment_virtualizer.xml │ ├── fragment_visualizer.xml │ ├── navigation_drawer_mode_select_list_item.xml │ └── navigation_drawer_page_select_list_item.xml │ ├── menu │ └── audio_effect_settings.xml │ ├── values-v19 │ └── styles.xml │ ├── values-v21 │ └── styles.xml │ └── values │ ├── arrays.xml │ ├── colors.xml │ ├── dimens.xml │ ├── strings.xml │ ├── strings_licenses.xml │ └── styles.xml ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── library ├── .gitignore ├── build.gradle ├── doclava-template │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ └── template │ │ ├── assets │ │ ├── customizations.css │ │ ├── customizations.js │ │ ├── doclava-developer-core.css │ │ ├── doclava-developer-docs.css │ │ ├── doclava-developer-docs.js │ │ ├── doclava-developer-reference.js │ │ ├── images │ │ │ ├── bg_fade.jpg │ │ │ ├── bg_logo.png │ │ │ ├── body-gradient-tab.png │ │ │ ├── body-gradient.png │ │ │ ├── grad-rule-qv.png │ │ │ ├── hr_gray_main.jpg │ │ │ ├── hr_gray_side.jpg │ │ │ ├── left_off.jpg │ │ │ ├── left_on.jpg │ │ │ ├── preliminary.png │ │ │ ├── resizable-e.gif │ │ │ ├── resizable-e2.gif │ │ │ ├── resizable-eg.gif │ │ │ ├── resizable-s.gif │ │ │ ├── resizable-s2.gif │ │ │ ├── resizable-sg.gif │ │ │ ├── right_off.jpg │ │ │ ├── right_on.jpg │ │ │ ├── sidenav-rule.png │ │ │ ├── spacer.gif │ │ │ ├── triangle-closed-small.png │ │ │ ├── triangle-closed.png │ │ │ ├── triangle-opened-small.png │ │ │ └── triangle-opened.png │ │ ├── jquery-history.js │ │ ├── jquery-resizable.min.js │ │ ├── prettify.js │ │ ├── search_autocomplete.js │ │ ├── style.css │ │ └── triangle-none.gif │ │ ├── class.cs │ │ ├── classes.cs │ │ ├── components.cs │ │ ├── components │ │ ├── api_filter.cs │ │ ├── left_nav.cs │ │ ├── masthead.cs │ │ └── search_box.cs │ │ ├── customizations.cs │ │ ├── data.hdf │ │ ├── diff.cs │ │ ├── docpage.cs │ │ ├── doctype.cs │ │ ├── footer.cs │ │ ├── head_tag.cs │ │ ├── header.cs │ │ ├── hierarchy.cs │ │ ├── index.cs │ │ ├── keywords.cs │ │ ├── lists.cs │ │ ├── macros.cs │ │ ├── navtree_data.cs │ │ ├── nosidenavpage.cs │ │ ├── package-descr.cs │ │ ├── package-list.cs │ │ ├── package.cs │ │ ├── packages.cs │ │ ├── sample.cs │ │ ├── sampleindex.cs │ │ ├── source.cs │ │ ├── todo.cs │ │ ├── trailer.cs │ │ └── yaml_navtree.cs ├── doclava │ ├── .gitignore │ └── build.gradle ├── maven-publish-data.properties ├── proguard-rules.pro └── src │ └── main │ ├── .gitignore │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── h6ah4i │ │ └── android │ │ └── media │ │ ├── IBasicMediaPlayer.java │ │ ├── IMediaPlayerFactory.java │ │ ├── IReleasable.java │ │ ├── audiofx │ │ ├── IAudioEffect.java │ │ ├── IBassBoost.java │ │ ├── IEnvironmentalReverb.java │ │ ├── IEqualizer.java │ │ ├── IHQVisualizer.java │ │ ├── ILoudnessEnhancer.java │ │ ├── IPreAmp.java │ │ ├── IPresetReverb.java │ │ ├── IVirtualizer.java │ │ └── IVisualizer.java │ │ ├── compat │ │ ├── AudioAttributes.java │ │ ├── AudioSystem.java │ │ ├── MediaPlayerCompat.java │ │ ├── MediaPlayerCompatImpl.java │ │ ├── MediaPlayerCompatImplGB.java │ │ ├── MediaPlayerCompatImplJB.java │ │ ├── MediaPlayerCompatImplL.java │ │ └── MediaRecorder.java │ │ ├── hybrid │ │ └── HybridMediaPlayerFactory.java │ │ ├── opensl │ │ ├── OpenSLMediaPlayer.java │ │ ├── OpenSLMediaPlayerContext.java │ │ ├── OpenSLMediaPlayerFactory.java │ │ ├── OpenSLMediaPlayerNativeLibraryLoader.java │ │ └── audiofx │ │ │ ├── OpenSLAudioEffect.java │ │ │ ├── OpenSLBassBoost.java │ │ │ ├── OpenSLEnvironmentalReverb.java │ │ │ ├── OpenSLEqualizer.java │ │ │ ├── OpenSLHQEqualizer.java │ │ │ ├── OpenSLHQVisualizer.java │ │ │ ├── OpenSLPreAmp.java │ │ │ ├── OpenSLPresetReverb.java │ │ │ ├── OpenSLVirtualizer.java │ │ │ └── OpenSLVisualizer.java │ │ ├── standard │ │ ├── MediaPlayerStateManager.java │ │ ├── NuPlayerDetector.java │ │ ├── StandardMediaPlayer.java │ │ ├── StandardMediaPlayerFactory.java │ │ └── audiofx │ │ │ ├── LoudnessEnhancerCompatBase.java │ │ │ ├── LoudnessEnhancerCompatGB.java │ │ │ ├── LoudnessEnhancerCompatKitKat.java │ │ │ ├── StandardAudioEffect.java │ │ │ ├── StandardBassBoost.java │ │ │ ├── StandardEnvironmentalReverb.java │ │ │ ├── StandardEqualizer.java │ │ │ ├── StandardLoudnessEnhancer.java │ │ │ ├── StandardPresetReverb.java │ │ │ ├── StandardVirtualizer.java │ │ │ ├── StandardVisualizer.java │ │ │ ├── VisualizerCompatBase.java │ │ │ ├── VisualizerCompatGB.java │ │ │ ├── VisualizerCompatJB.java │ │ │ └── VisualizerCompatKitKat.java │ │ └── utils │ │ ├── AudioEffectSettingsConverter.java │ │ ├── AudioSystemUtils.java │ │ ├── DefaultEqualizerPresets.java │ │ ├── EnvironmentalReverbPresets.java │ │ └── EqualizerBandInfoCorrector.java │ ├── jni │ ├── .clang-format │ ├── Android.mk │ ├── Application.mk │ ├── android-platform-system-core │ │ ├── Android.mk │ │ ├── README │ │ ├── include │ │ │ └── utils │ │ │ │ ├── RefBase.h │ │ │ │ └── StrongPointer.h │ │ └── source │ │ │ └── libutils │ │ │ ├── MODULE_LICENSE_APACHE2 │ │ │ ├── NOTICE │ │ │ ├── README │ │ │ └── RefBase.cpp │ ├── android-platform-system-media │ │ ├── Android.mk │ │ ├── README │ │ ├── include │ │ │ └── audio_utils │ │ │ │ └── fixedfft.h │ │ └── source │ │ │ └── audio_utils │ │ │ └── fixedfft.cpp │ ├── apply_code_formatter.sh │ ├── cpufeatures │ │ └── Android.mk │ ├── cxxdasp │ │ └── Android.mk │ ├── cxxporthelper │ │ └── Android.mk │ ├── jni_utils │ │ ├── Android.mk │ │ └── include │ │ │ └── jni_utils │ │ │ └── jni_utils.hpp │ ├── lockfreedatastructure │ │ └── Android.mk │ ├── loghelper │ │ ├── Android.mk │ │ └── include │ │ │ └── loghelper │ │ │ └── loghelper.h │ ├── ne10 │ │ └── Android.mk │ ├── openslescxx │ │ └── Android.mk │ ├── openslmediaplayer-cxxdasp-build-setup.mk │ ├── openslmediaplayer-cxxdasp-config.mk │ ├── openslmediaplayer-jni │ │ ├── Android.mk │ │ ├── include │ │ │ ├── OpenSLMediaPlayerContextJNIBinder.hpp │ │ │ ├── OpenSLMediaPlayerHQVisualizerJNIBinder.hpp │ │ │ ├── OpenSLMediaPlayerJNIBinder.hpp │ │ │ └── OpenSLMediaPlayerVisualizerJNIBinder.hpp │ │ └── source │ │ │ ├── OpenSLMediaPlayerContextJNIBinder.cpp │ │ │ ├── OpenSLMediaPlayerHQVisualizerJNIBinder.cpp │ │ │ ├── OpenSLMediaPlayerJNIBinder.cpp │ │ │ ├── OpenSLMediaPlayerVisualizerJNIBinder.cpp │ │ │ ├── com_h6ah4i_android_media_opensl_OpenSLMediaPlayer.cpp │ │ │ ├── com_h6ah4i_android_media_opensl_OpenSLMediaPlayerContext.cpp │ │ │ ├── com_h6ah4i_android_media_opensl_audiofx_OpenSLBassBoost.cpp │ │ │ ├── com_h6ah4i_android_media_opensl_audiofx_OpenSLEnvironmentalReverb.cpp │ │ │ ├── com_h6ah4i_android_media_opensl_audiofx_OpenSLEqualizer.cpp │ │ │ ├── com_h6ah4i_android_media_opensl_audiofx_OpenSLHQEqualizer.cpp │ │ │ ├── com_h6ah4i_android_media_opensl_audiofx_OpenSLHQVisualizer.cpp │ │ │ ├── com_h6ah4i_android_media_opensl_audiofx_OpenSLPreAmp.cpp │ │ │ ├── com_h6ah4i_android_media_opensl_audiofx_OpenSLPresetReverb.cpp │ │ │ ├── com_h6ah4i_android_media_opensl_audiofx_OpenSLVirtualizer.cpp │ │ │ └── com_h6ah4i_android_media_opensl_audiofx_OpenSLVisualizer.cpp │ ├── openslmediaplayer-lib-loader-helper │ │ ├── Android.mk │ │ └── source │ │ │ └── com_h6ah4i_android_media_opensl_OpenSLMediaPlayerNativeLibraryLoader.cpp │ ├── openslmediaplayer │ │ ├── Android.mk │ │ ├── include │ │ │ └── oslmp │ │ │ │ ├── OpenSLMediaPlayer.hpp │ │ │ │ ├── OpenSLMediaPlayerAPICommon.hpp │ │ │ │ ├── OpenSLMediaPlayerBassBoost.hpp │ │ │ │ ├── OpenSLMediaPlayerContext.hpp │ │ │ │ ├── OpenSLMediaPlayerEnvironmentalReverb.hpp │ │ │ │ ├── OpenSLMediaPlayerEqualizer.hpp │ │ │ │ ├── OpenSLMediaPlayerHQEqualizer.hpp │ │ │ │ ├── OpenSLMediaPlayerHQVisualizer.hpp │ │ │ │ ├── OpenSLMediaPlayerPreAmp.hpp │ │ │ │ ├── OpenSLMediaPlayerPresetReverb.hpp │ │ │ │ ├── OpenSLMediaPlayerResultCodes.hpp │ │ │ │ ├── OpenSLMediaPlayerVirtualizer.hpp │ │ │ │ └── OpenSLMediaPlayerVisualizer.hpp │ │ ├── internal_include │ │ │ └── oslmp │ │ │ │ ├── impl │ │ │ │ ├── AndroidHelper.hpp │ │ │ │ ├── AudioCaptureDataPipe.hpp │ │ │ │ ├── AudioDataAdapter.hpp │ │ │ │ ├── AudioDataPipeManager.hpp │ │ │ │ ├── AudioDataTypes.hpp │ │ │ │ ├── AudioFormat.hpp │ │ │ │ ├── AudioMixer.hpp │ │ │ │ ├── AudioPipeBufferQueueBinder.hpp │ │ │ │ ├── AudioPlayer.hpp │ │ │ │ ├── AudioSink.hpp │ │ │ │ ├── AudioSinkAudioTrackBackend.hpp │ │ │ │ ├── AudioSinkDataPipe.hpp │ │ │ │ ├── AudioSinkDataPipeReadBlockQueue.hpp │ │ │ │ ├── AudioSinkOpenSLBackend.hpp │ │ │ │ ├── AudioSource.hpp │ │ │ │ ├── AudioSourceDataPipe.hpp │ │ │ │ ├── AudioSystem.hpp │ │ │ │ ├── AudioTrack.hpp │ │ │ │ ├── AudioTrackStream.hpp │ │ │ │ ├── BaseExtensionModule.hpp │ │ │ │ ├── DebugFeatures.hpp │ │ │ │ ├── EqualizerBandInfoCorrector.hpp │ │ │ │ ├── HQEqualizer.hpp │ │ │ │ ├── HQEqualizerBandCalculator.hpp │ │ │ │ ├── HQEqualizerPresets.hpp │ │ │ │ ├── HQVisualizerCapturedAudioDataBuffer.hpp │ │ │ │ ├── MessageHandlerThread.hpp │ │ │ │ ├── MixedOutputAudioEffect.hpp │ │ │ │ ├── MixingUnit.hpp │ │ │ │ ├── NonBlockingTraceLogger.hpp │ │ │ │ ├── OpenSLES_Android_Complements.h │ │ │ │ ├── OpenSLMediaPlayerExtension.hpp │ │ │ │ ├── OpenSLMediaPlayerImpl.hpp │ │ │ │ ├── OpenSLMediaPlayerInternalContext.hpp │ │ │ │ ├── OpenSLMediaPlayerInternalContextImpl.hpp │ │ │ │ ├── OpenSLMediaPlayerInternalDefs.hpp │ │ │ │ ├── OpenSLMediaPlayerInternalUtils.hpp │ │ │ │ ├── OpenSLMediaPlayerMetadata.hpp │ │ │ │ ├── OpenSLMediaPlayerThreadMessage.hpp │ │ │ │ ├── PreAmp.hpp │ │ │ │ ├── StereoVolumeDataPipe.hpp │ │ │ │ ├── StockVisualizerAlgorithms.hpp │ │ │ │ └── VisualizerCapturedAudioDataBuffer.hpp │ │ │ │ └── utils │ │ │ │ ├── bitmap_looper.hpp │ │ │ │ ├── optional.hpp │ │ │ │ ├── pthread_utils.hpp │ │ │ │ └── timespec_utils.hpp │ │ └── source │ │ │ ├── AndroidHelper.cpp │ │ │ ├── AudioCaptureDataPipe.cpp │ │ │ ├── AudioDataAdapter.cpp │ │ │ ├── AudioDataPipeManager.cpp │ │ │ ├── AudioMixer.cpp │ │ │ ├── AudioPipeBufferQueueBinder.cpp │ │ │ ├── AudioPlayer.cpp │ │ │ ├── AudioSink.cpp │ │ │ ├── AudioSinkAudioTrackBackend.cpp │ │ │ ├── AudioSinkDataPipe.cpp │ │ │ ├── AudioSinkDataPipeReadBlockQueue.cpp │ │ │ ├── AudioSinkOpenSLBackend.cpp │ │ │ ├── AudioSource.cpp │ │ │ ├── AudioSourceDataPipe.cpp │ │ │ ├── AudioSystem.cpp │ │ │ ├── AudioTrack.cpp │ │ │ ├── AudioTrackStream.cpp │ │ │ ├── BaseExtensionModule.cpp │ │ │ ├── EqualizerBandInfoCorrector.cpp │ │ │ ├── HQEqualizer.cpp │ │ │ ├── HQEqualizerPresets.cpp │ │ │ ├── HQVisualizerCapturedAudioDataBuffer.cpp │ │ │ ├── MessageHandlerThread.cpp │ │ │ ├── MixingUnit.cpp │ │ │ ├── NonBlockingTraceLogger.cpp │ │ │ ├── OpenSLMediaPlayer.cpp │ │ │ ├── OpenSLMediaPlayerBassBoost.cpp │ │ │ ├── OpenSLMediaPlayerContext.cpp │ │ │ ├── OpenSLMediaPlayerEnvironmentalReverb.cpp │ │ │ ├── OpenSLMediaPlayerEqualizer.cpp │ │ │ ├── OpenSLMediaPlayerHQEqualizer.cpp │ │ │ ├── OpenSLMediaPlayerHQVisualizer.cpp │ │ │ ├── OpenSLMediaPlayerImpl.cpp │ │ │ ├── OpenSLMediaPlayerInternalContextImpl.cpp │ │ │ ├── OpenSLMediaPlayerInternalUtils.cpp │ │ │ ├── OpenSLMediaPlayerPreAmp.cpp │ │ │ ├── OpenSLMediaPlayerPresetReverb.cpp │ │ │ ├── OpenSLMediaPlayerVirtualizer.cpp │ │ │ ├── OpenSLMediaPlayerVisualizer.cpp │ │ │ ├── PreAmp.cpp │ │ │ ├── StereoVolumeDataPipe.cpp │ │ │ ├── StockVisualizerAlgorithms.cpp │ │ │ ├── VisualizerCapturedAudioDataBuffer.cpp │ │ │ └── pthread_utils.cpp │ └── pffft │ │ └── Android.mk │ └── res │ └── .gitignore ├── native-example ├── .gitignore ├── NOTICE ├── build.gradle ├── etc │ └── app_icon.svg ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── h6ah4i │ │ └── android │ │ └── example │ │ └── nativeopenslmediaplayer │ │ ├── AboutActivity.java │ │ └── MainNativeActivity.java │ ├── jni │ ├── .clang-format │ ├── Android.mk │ ├── Application.mk │ └── src │ │ ├── FloatClolor.hpp │ │ ├── app_command_pipe.cpp │ │ ├── app_command_pipe.hpp │ │ ├── app_engine.cpp │ │ ├── app_engine.hpp │ │ ├── com_h6ah4i_android_example_nativeopenslmediaplayer_MainNativeActivity.cpp │ │ └── main.cpp │ └── res │ ├── drawable-hdpi │ └── ic_launcher.png │ ├── drawable-mdpi │ └── ic_launcher.png │ ├── drawable-xhdpi │ └── ic_launcher.png │ ├── drawable-xxhdpi │ └── ic_launcher.png │ ├── drawable-xxxhdpi │ └── ic_launcher.png │ ├── layout │ ├── activity_about.xml │ └── controls.xml │ ├── values-v14 │ └── styles.xml │ ├── values-v21 │ └── styles.xml │ └── values │ ├── strings.xml │ ├── strings_licenses.xml │ └── styles.xml ├── settings.gradle ├── signing ├── .gitignore ├── README ├── example-signing.properties.template ├── library-maven-publish-signing.properties.template └── native-example-signing.properties.template ├── test-host ├── .gitignore ├── README.md ├── media │ ├── .gitignore │ ├── 440hz_stereo.mp3 │ └── Makefile └── run-server.sh ├── test ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── h6ah4i │ │ └── android │ │ └── media │ │ └── openslmediaplayer │ │ ├── AllTests.java │ │ ├── HybridMediaPlayerTest.java │ │ ├── OpenSLMediaPlayerTest.java │ │ ├── StandardMediaPlayerTest.java │ │ ├── base │ │ ├── BasicMediaPlayerStateTestCaseBase.java │ │ ├── BasicMediaPlayerTestCaseBase.java │ │ ├── GlobalTestOptions.java │ │ ├── TestBasicMediaPlayerWrapper.java │ │ ├── TestHQVisualizerWrapper.java │ │ ├── TestObjectBaseWrapper.java │ │ └── TestVisualizerWrapper.java │ │ ├── classtest │ │ ├── BasicMediaPlayerClassTestCase.java │ │ ├── BassBoostTestCase.java │ │ ├── EnvironmentalReverbTestCase.java │ │ ├── EqualizerBandInfoCorrectorTestCase.java │ │ ├── EqualizerTestCase.java │ │ ├── HQEqualizerTestCase.java │ │ ├── HQVisualizerTestCase.java │ │ ├── LoudnessEnhancerTestCase.java │ │ ├── PreAmpTestCase.java │ │ ├── PresetReverbTestCase.java │ │ ├── VirtualizerTestCase.java │ │ └── VisualizerTestCase.java │ │ ├── methodtest │ │ ├── BasicMediaPlayerTestCase_AttachAuxEffectMethod.java │ │ ├── BasicMediaPlayerTestCase_GetAudioSessionIdMethod.java │ │ ├── BasicMediaPlayerTestCase_GetCurrentPositionMethod.java │ │ ├── BasicMediaPlayerTestCase_GetDurationMethod.java │ │ ├── BasicMediaPlayerTestCase_IsLoopingMethod.java │ │ ├── BasicMediaPlayerTestCase_IsPlayingMethod.java │ │ ├── BasicMediaPlayerTestCase_PauseMethod.java │ │ ├── BasicMediaPlayerTestCase_PrepareAsyncMethod.java │ │ ├── BasicMediaPlayerTestCase_PrepareMethod.java │ │ ├── BasicMediaPlayerTestCase_ReleaseMethod.java │ │ ├── BasicMediaPlayerTestCase_ResetMethod.java │ │ ├── BasicMediaPlayerTestCase_SeekToMethod.java │ │ ├── BasicMediaPlayerTestCase_SetAudioAttributesMethod.java │ │ ├── BasicMediaPlayerTestCase_SetAudioSessionIdMethod.java │ │ ├── BasicMediaPlayerTestCase_SetAudioStreamTypeMethod.java │ │ ├── BasicMediaPlayerTestCase_SetAuxEffectSendLevelMethod.java │ │ ├── BasicMediaPlayerTestCase_SetDataSourceFdMethod.java │ │ ├── BasicMediaPlayerTestCase_SetDataSourceFdOffsetLengthMethod.java │ │ ├── BasicMediaPlayerTestCase_SetDataSourceMethodBase.java │ │ ├── BasicMediaPlayerTestCase_SetDataSourcePathMethod.java │ │ ├── BasicMediaPlayerTestCase_SetDataSourceUriMethod.java │ │ ├── BasicMediaPlayerTestCase_SetLoopingMethod.java │ │ ├── BasicMediaPlayerTestCase_SetNextMediaPlayerMethod.java │ │ ├── BasicMediaPlayerTestCase_SetOnBufferingUpdateListenerMethod.java │ │ ├── BasicMediaPlayerTestCase_SetOnCompletionListenerMethod.java │ │ ├── BasicMediaPlayerTestCase_SetOnErrorListenerMethod.java │ │ ├── BasicMediaPlayerTestCase_SetOnInfoListenerMethod.java │ │ ├── BasicMediaPlayerTestCase_SetOnPreparedListenerMethod.java │ │ ├── BasicMediaPlayerTestCase_SetOnSeekCompleteListenerMethod.java │ │ ├── BasicMediaPlayerTestCase_SetVolumeMethod.java │ │ ├── BasicMediaPlayerTestCase_SetWakeModeMethod.java │ │ ├── BasicMediaPlayerTestCase_StartMethod.java │ │ └── BasicMediaPlayerTestCase_StopMethod.java │ │ ├── testing │ │ ├── ParameterizedInstrumentationTestCase.java │ │ ├── ParameterizedTestArgs.java │ │ └── ParameterizedTestSuiteBuilder.java │ │ └── utils │ │ ├── BasicMediaPlayerEventListenerObject.java │ │ ├── BasicMediaPlayerTestCase_CleanupDummyTestCase.java │ │ ├── BufferingUpdateListenerObject.java │ │ ├── CommonTestCaseUtils.java │ │ ├── CompletionListenerObject.java │ │ ├── DebugCompat.java │ │ ├── DebugCompatImplGB.java │ │ ├── DebugCompatImplICS.java │ │ ├── EmptyOnDataCaptureListenerObj.java │ │ ├── ErrorListenerObject.java │ │ ├── InfoListenerObject.java │ │ ├── MockBasicMediaPlayer.java │ │ ├── PreparedListenerObject.java │ │ ├── SeekCompleteListenerObject.java │ │ └── ThrowableRunnable.java │ └── main │ ├── AndroidManifest.xml │ └── assets │ └── testsounds │ ├── 440hz_monaural.mp3 │ ├── 440hz_monaural.ogg │ ├── 440hz_stereo.mp3 │ ├── 440hz_stereo.ogg │ ├── 440hz_stereo_48k.mp3 │ ├── 880hz_monaural.mp3 │ ├── 880hz_monaural.ogg │ ├── 880hz_stereo.mp3 │ ├── 880hz_stereo.ogg │ └── short_silent.mp3 └── utils ├── license_header.txt └── visualizer_capture_buffer_analyzer ├── .gitignore ├── README ├── capture_buffer_log.sh ├── plot.plt ├── split_log.py └── split_log.sh /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /.idea/ 3 | .gradle 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /repository 10 | 11 | /*/externalNativeBuild/ 12 | 13 | *.iml 14 | 15 | hs_err_*.log 16 | 17 | # backup files 18 | *~ 19 | *.orig 20 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "library/dep_libs/cxxdasp"] 2 | path = library/dep_libs/cxxdasp 3 | url = https://github.com/h6ah4i/cxxdasp.git 4 | [submodule "library/dep_libs/openslescxx"] 5 | path = library/dep_libs/openslescxx 6 | url = https://github.com/h6ah4i/openslescxx.git 7 | [submodule "library/dep_libs/lockfreedatastructure"] 8 | path = library/dep_libs/lockfreedatastructure 9 | url = https://github.com/h6ah4i/lockfreedatastructure.git 10 | [submodule "android-studio/OpenSLMediaPlayer/library/doclava-template"] 11 | path = android-studio/OpenSLMediaPlayer/library/doclava-template 12 | url = https://github.com/h6ah4i/android-openslmediaplayer-doclava-template.git 13 | [submodule "library/src/main/dep_libs/cxxdasp"] 14 | path = library/src/main/dep_libs/cxxdasp 15 | url = https://github.com/h6ah4i/cxxdasp.git 16 | [submodule "library/src/main/dep_libs/lockfreedatastructure"] 17 | path = library/src/main/dep_libs/lockfreedatastructure 18 | url = https://github.com/h6ah4i/lockfreedatastructure.git 19 | [submodule "library/src/main/dep_libs/openslescxx"] 20 | path = library/src/main/dep_libs/openslescxx 21 | url = https://github.com/h6ah4i/openslescxx.git 22 | -------------------------------------------------------------------------------- /RELEASE-NOTES.md: -------------------------------------------------------------------------------- 1 | ## 0.7.5 2 | 3 | - Fixed monotonic clock not used Android 6.0 or prior devices (issue #35) 4 | - Fixed prepareAsync() broken on StandardMediaPlayer 5 | 6 | ## 0.7.4 7 | 8 | - Strip debug info on AAR (issue #33) 9 | - Fix compilation error with NDK v15 10 | 11 | ## 0.7.3 12 | 13 | - Add workaround for incomplete AudioTrack.write() (issue #26) 14 | - Fix warning message due to inappropriate use of AudioTrack.write() (issue #26) 15 | 16 | ## 0.7.2 17 | 18 | - Fixed 176.4 kHz, 192 kHz audio playback issue 19 | - Fixed build failure issue with the latest NDK (13.0.3315539) 20 | 21 | ## 0.7.1 22 | 23 | - Fixed 11.025 kHz, 12 kHz, 22.05 kHz and 24 kHz audio playback issue (issue #20) 24 | - Update FFTW, libsamplerate, soxr and PFFFT libraries 25 | 26 | 27 | ## 0.7.0 28 | 29 | - Added `HybridMediaPlayerFactory` which creates `AudioTrack` audio sink player. It is more tolerant against glitches and strongly recommended than normal `OpenSLMediaPlayer`. 30 | - Fully migrated to Gradle build system. Eclipse is no longer supported. 31 | - Bug fixes 32 | 33 | 34 | ## 0.6.0 35 | 36 | - Changed the Standard* prefixed classes not to inherit Android framework classes 37 | - Upgrade Android Gradle build tool version 38 | - Bug fixes 39 | - Code refactoring 40 | 41 | ## 0.5.0 42 | 43 | - Initial release 44 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 18 | 19 | buildscript { 20 | repositories { 21 | jcenter() 22 | } 23 | dependencies { 24 | classpath 'com.android.tools.build:gradle:2.3.0' 25 | 26 | // NOTE: Do not place your application dependencies here; they belong 27 | // in the individual module build.gradle files 28 | } 29 | } 30 | 31 | allprojects { 32 | repositories { 33 | jcenter() 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /common/android-disable-default-ndk-build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | android { 18 | sourceSets.main { 19 | jni.srcDirs = [] //disable automatic ndk-build call 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /common/android-set-common-properties.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | android { 18 | compileSdkVersion 25 19 | buildToolsVersion '25.0.3' 20 | 21 | compileOptions { 22 | sourceCompatibility JavaVersion.VERSION_1_7 23 | targetCompatibility JavaVersion.VERSION_1_7 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /common/android-signing-utils.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | def loadSigningConfigFromPropertiesFile(project, signingConfig, propFileName) { 18 | def props = new Properties() 19 | def propFile = project.file(propFileName) 20 | 21 | if (!propFile.exists()) { 22 | return false 23 | } 24 | 25 | props.load(propFile.newDataInputStream()) 26 | 27 | if ((props.storeFile != null) && 28 | (props.storePassword != null) && 29 | (props.keyAlias != null) && 30 | (props.keyPassword != null)) { 31 | 32 | signingConfig.storeFile = project.file(props.storeFile) 33 | signingConfig.storePassword = props.storePassword 34 | signingConfig.keyAlias = props.keyAlias 35 | signingConfig.keyPassword = props.keyPassword 36 | 37 | return true 38 | } else { 39 | return false 40 | } 41 | } 42 | 43 | // Export methods by turning them into closures 44 | ext { 45 | loadSigningConfigFromPropertiesFile = this.&loadSigningConfigFromPropertiesFile 46 | } 47 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /example/NOTICE: -------------------------------------------------------------------------------- 1 | Additional NOTICEs for the "example" application. 2 | 3 | ====================================================================== 4 | Android v7 Support Library (appcompat, gridlayout) 5 | ---------------------------------------------------------------------- 6 | 7 | Copyright (c) 2005-2013, The Android Open Source Project 8 | 9 | Licensed under the Apache License, Version 2.0 (the "License"); 10 | you may not use this file except in compliance with the License. 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | See the License for the specific language governing permissions and 16 | limitations under the License. 17 | 18 | 19 | ====================================================================== 20 | Android v4 Support Library 21 | ---------------------------------------------------------------------- 22 | 23 | Copyright (c) 2005-2013, The Android Open Source Project 24 | 25 | Licensed under the Apache License, Version 2.0 (the "License"); 26 | you may not use this file except in compliance with the License. 27 | 28 | Unless required by applicable law or agreed to in writing, software 29 | distributed under the License is distributed on an "AS IS" BASIS, 30 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 31 | See the License for the specific language governing permissions and 32 | limitations under the License. 33 | -------------------------------------------------------------------------------- /example/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/hasegawa/Applications/android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /example/src/main/.gitignore: -------------------------------------------------------------------------------- 1 | libs/ 2 | obj/ 3 | -------------------------------------------------------------------------------- /example/src/main/java/com/h6ah4i/android/example/openslmediaplayer/app/AppBaseFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | package com.h6ah4i.android.example.openslmediaplayer.app; 19 | 20 | import android.support.v4.app.Fragment; 21 | import android.support.v7.app.ActionBar; 22 | import android.support.v7.app.AppCompatActivity; 23 | 24 | import com.h6ah4i.android.example.openslmediaplayer.app.framework.AppEventBus; 25 | import com.h6ah4i.android.example.openslmediaplayer.app.model.GlobalAppController; 26 | 27 | public class AppBaseFragment extends Fragment { 28 | 29 | protected ActionBar getActionBar() { 30 | return ((AppCompatActivity) getActivity()).getSupportActionBar(); 31 | } 32 | 33 | protected boolean isNavigationDrawerOpen() { 34 | return ((MainActivity) getActivity()).isNavigationDrawerOpen(); 35 | } 36 | 37 | protected GlobalAppController getAppController() { 38 | return ((MainActivity) getActivity()).getAppController(); 39 | } 40 | 41 | protected AppEventBus eventBus() { 42 | return ((MainActivity) getActivity()).eventBus(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /example/src/main/java/com/h6ah4i/android/example/openslmediaplayer/app/contents/AboutFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.h6ah4i.android.example.openslmediaplayer.app.contents; 18 | 19 | import android.os.Bundle; 20 | import android.support.v7.app.ActionBar; 21 | import android.view.LayoutInflater; 22 | import android.view.Menu; 23 | import android.view.MenuInflater; 24 | import android.view.View; 25 | import android.view.ViewGroup; 26 | 27 | import com.h6ah4i.android.example.openslmediaplayer.R; 28 | 29 | public class AboutFragment extends ContentsBaseFragment { 30 | @Override 31 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 32 | View rootView = inflater.inflate(R.layout.fragment_about, container, false); 33 | return rootView; 34 | } 35 | 36 | @Override 37 | protected void onUpdateActionBarAndOptionsMenu(Menu menu, MenuInflater inflater) { 38 | super.onUpdateActionBarAndOptionsMenu(menu, inflater); 39 | 40 | ActionBar actionBar = getActionBar(); 41 | 42 | actionBar.setTitle(R.string.title_about); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /example/src/main/java/com/h6ah4i/android/example/openslmediaplayer/app/model/MediaMetadata.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | package com.h6ah4i.android.example.openslmediaplayer.app.model; 19 | 20 | public class MediaMetadata { 21 | private String titile; 22 | private String artist; 23 | private String album; 24 | 25 | public String getTitile() { 26 | return titile; 27 | } 28 | 29 | public void setTitile(String titile) { 30 | this.titile = titile; 31 | } 32 | 33 | public String getArtist() { 34 | return artist; 35 | } 36 | 37 | public void setArtist(String artist) { 38 | this.artist = artist; 39 | } 40 | 41 | public String getAlbum() { 42 | return album; 43 | } 44 | 45 | public void setAlbum(String album) { 46 | this.album = album; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /example/src/main/java/com/h6ah4i/android/example/openslmediaplayer/app/model/NotificationIds.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | package com.h6ah4i.android.example.openslmediaplayer.app.model; 19 | 20 | public class NotificationIds { 21 | public static final int ONGOING_NOTIFICATION = 1; 22 | } 23 | -------------------------------------------------------------------------------- /example/src/main/java/com/h6ah4i/android/example/openslmediaplayer/app/utils/GlobalAppControllerAccessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | package com.h6ah4i.android.example.openslmediaplayer.app.utils; 19 | 20 | import android.content.Context; 21 | 22 | import com.h6ah4i.android.example.openslmediaplayer.app.model.GlobalAppController; 23 | 24 | public class GlobalAppControllerAccessor { 25 | public static interface Provider { 26 | GlobalAppController getGlobalAppControllerInstance(); 27 | } 28 | 29 | public static GlobalAppController getInstance(Context context) { 30 | return ((Provider) context.getApplicationContext()).getGlobalAppControllerInstance(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /example/src/main/java/com/h6ah4i/android/example/openslmediaplayer/app/utils/LocalServiceBinder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | package com.h6ah4i.android.example.openslmediaplayer.app.utils; 19 | 20 | import java.lang.ref.WeakReference; 21 | 22 | import android.os.Binder; 23 | 24 | public class LocalServiceBinder extends Binder { 25 | @SuppressWarnings("unused") 26 | private static final String TAG = "LocalServiceBinder"; 27 | private final WeakReference mService; 28 | 29 | public LocalServiceBinder(T service) { 30 | mService = new WeakReference(service); 31 | } 32 | 33 | public T getService() { 34 | return mService.get(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /example/src/main/java/com/h6ah4i/android/example/openslmediaplayer/app/utils/MediaMetadataBuilder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | package com.h6ah4i.android.example.openslmediaplayer.app.utils; 19 | 20 | import android.content.Context; 21 | import android.media.MediaMetadataRetriever; 22 | import android.net.Uri; 23 | 24 | import com.h6ah4i.android.example.openslmediaplayer.app.model.MediaMetadata; 25 | 26 | public class MediaMetadataBuilder { 27 | 28 | private MediaMetadataBuilder() { 29 | } 30 | 31 | public static MediaMetadata create(Context context, Uri uri) { 32 | MediaMetadataRetriever retriever = new MediaMetadataRetriever(); 33 | 34 | retriever.setDataSource(context, uri); 35 | 36 | MediaMetadata metadata = new MediaMetadata(); 37 | 38 | metadata.setTitile(retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_TITLE)); 39 | metadata.setArtist(retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_ARTIST)); 40 | metadata.setAlbum(retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_ALBUM)); 41 | 42 | return metadata; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /example/src/main/java/com/h6ah4i/android/example/openslmediaplayer/app/utils/OnItemSelectedListenerWrapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | package com.h6ah4i.android.example.openslmediaplayer.app.utils; 19 | 20 | import java.lang.ref.WeakReference; 21 | 22 | import android.view.View; 23 | import android.widget.AdapterView; 24 | 25 | public class OnItemSelectedListenerWrapper implements AdapterView.OnItemSelectedListener { 26 | private WeakReference mListenerRef; 27 | private boolean mIsLoaded; 28 | 29 | public OnItemSelectedListenerWrapper(AdapterView.OnItemSelectedListener listener) { 30 | mListenerRef = new WeakReference(listener); 31 | } 32 | 33 | @Override 34 | public void onItemSelected(AdapterView parent, View view, int position, long id) { 35 | AdapterView.OnItemSelectedListener listener = mListenerRef.get(); 36 | 37 | if (mIsLoaded && listener != null) { 38 | listener.onItemSelected(parent, view, position, id); 39 | } 40 | 41 | mIsLoaded = true; 42 | } 43 | 44 | @Override 45 | public void onNothingSelected(AdapterView parent) { 46 | AdapterView.OnItemSelectedListener listener = mListenerRef.get(); 47 | 48 | if (mIsLoaded && listener != null) { 49 | listener.onNothingSelected(parent); 50 | } 51 | 52 | mIsLoaded = true; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /example/src/main/java/com/h6ah4i/android/example/openslmediaplayer/app/visualizer/FloatColor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | package com.h6ah4i.android.example.openslmediaplayer.app.visualizer; 19 | 20 | public class FloatColor { 21 | public float red; 22 | public float green; 23 | public float blue; 24 | public float alpha; 25 | 26 | public FloatColor() { 27 | } 28 | 29 | public FloatColor(float r, float g, float b, float a) { 30 | red = r; 31 | green = g; 32 | blue = b; 33 | alpha = a; 34 | } 35 | 36 | public void set(float r, float g, float b, float a) { 37 | red = r; 38 | green = g; 39 | blue = b; 40 | alpha = a; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /example/src/main/jni/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | Language: Cpp 3 | Standard: Cpp11 4 | ColumnLimit: 120 5 | IndentWidth: 4 6 | AccessModifierOffset: -4 7 | UseTab: Never 8 | BreakBeforeBraces: Stroustrup 9 | BinPackParameters: true 10 | AllowShortIfStatementsOnASingleLine: false 11 | IndentCaseLabels: false 12 | CommentPragmas: '\*' 13 | AlwaysBreakTemplateDeclarations: true 14 | AllowAllParametersOfDeclarationOnNextLine: true 15 | -------------------------------------------------------------------------------- /example/src/main/jni/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # 18 | # THIS FILE IS NEEDED TO DEBUG AS A NATIVE APP 19 | # 20 | 21 | LOCAL_PATH := $(call my-dir) 22 | 23 | include $(CLEAR_VARS) 24 | 25 | LOCAL_MODULE := dummy 26 | LOCAL_SRC_FILES := dummy.cpp 27 | 28 | include $(BUILD_SHARED_LIBRARY) 29 | 30 | -------------------------------------------------------------------------------- /example/src/main/jni/Application.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # 18 | # THIS FILE IS NEEDED TO DEBUG AS A NATIVE APP 19 | # 20 | 21 | APP_PLATFORM := android-14 22 | APP_OPTIM := debug 23 | 24 | APP_ABI := all 25 | # APP_ABI := armeabi-v7a 26 | 27 | APP_MODULES := dummy 28 | 29 | -------------------------------------------------------------------------------- /example/src/main/jni/dummy.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // 18 | // THIS FILE IS NEEDED TO DEBUG AS A NATIVE APP 19 | // 20 | 21 | int dummy_func(void) { return 0; } 22 | -------------------------------------------------------------------------------- /example/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/example/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/example/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/example/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/example/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/example/src/main/res/drawable-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/layout/action_bar_spacer.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 20 | -------------------------------------------------------------------------------- /example/src/main/res/layout/action_bar_spinner_list_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 22 | 23 | 34 | 35 | 46 | 47 | -------------------------------------------------------------------------------- /example/src/main/res/layout/action_bar_switch.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | -------------------------------------------------------------------------------- /example/src/main/res/layout/fragment_virtualizer.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 26 | 27 | 28 | 29 | 33 | 34 | 42 | 43 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /example/src/main/res/menu/audio_effect_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 20 | 21 | 26 | 30 | 31 | -------------------------------------------------------------------------------- /example/src/main/res/values-v19/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 23 | 24 | -------------------------------------------------------------------------------- /example/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 23 | 24 | -------------------------------------------------------------------------------- /example/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | #ffab40 20 | #f57c00 21 | #dd4000 22 | #aa000000 23 | #eeeeee 24 | #cccccc 25 | #ffffff 26 | 27 | -------------------------------------------------------------------------------- /example/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 16dp 18 | 16dp 19 | 20 | 304dp 21 | 22 | 23 | 48dp 24 | 16dp 25 | 16dp 26 | 27 | -------------------------------------------------------------------------------- /example/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | OpenSLMediaPlayer Example App 20 | 21 | 22 | Open navigation drawer 23 | Close navigation drawer 24 | 25 | 26 | Player Control 27 | Equalizer 28 | Bass Boost 29 | Virtualizer 30 | Loudness Enhancer 31 | Preset Reverb 32 | Environmental Reverb 33 | Visualizer 34 | HQEqualizer 35 | HQVisualizer 36 | About 37 | 38 | 39 | Standard MediaPlayer 40 | OpenSL MediaPlayer 41 | Hybrid MediaPlayer 42 | 43 | 44 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | org.gradle.jvmargs=-Xmx2048M 20 | org.gradle.daemon=true 21 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jan 27 19:50:29 JST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip 7 | -------------------------------------------------------------------------------- /library/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /.externalNativeBuild 3 | -------------------------------------------------------------------------------- /library/doclava-template/README.md: -------------------------------------------------------------------------------- 1 | Doclava template for OpenSLMediaPlayer project 2 | =============== 3 | 4 | This project is a part of the product of [OpenSLMediaPlayer](https://github.com/h6ah4i/android-openslmediaplayer) project. 5 | -------------------------------------------------------------------------------- /library/doclava-template/template/assets/customizations.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #f9f9f9; 3 | } 4 | 5 | #header { 6 | background: #2b3d4f; 7 | border-bottom: 0px; 8 | } 9 | 10 | #headerLeft { 11 | bottom: 0; 12 | top: 0; 13 | left: 10px; 14 | } 15 | 16 | #headerRight { 17 | top: 0; 18 | bottom: 0; 19 | right: 10px; 20 | display: table; 21 | height: 100%; 22 | } 23 | 24 | #masthead-title { 25 | color: #ffffff; 26 | font-size: 1.5em; 27 | } 28 | 29 | #search { 30 | display: table-cell; 31 | vertical-align: middle 32 | } 33 | 34 | #searchForm { 35 | margin: 0 auto; 36 | } 37 | 38 | #search-button { 39 | padding: 5px; 40 | } 41 | 42 | #searchForm td.gsc-input { 43 | padding-right: 10px; 44 | } 45 | 46 | #searchForm input.gsc-input { 47 | padding: 5px; 48 | } 49 | 50 | #search_filtered_div { 51 | margin-top: 5px; 52 | position: absolute; 53 | } 54 | 55 | #search_filtered td { 56 | line-height: 2.0em; 57 | } 58 | 59 | #header .gsc-search-box { 60 | margin: 0; 61 | } 62 | 63 | #search_filtered .jd-selected { 64 | background-color: #0767a4; 65 | } 66 | 67 | #nav-panels { 68 | background: #f9f9f9; 69 | } 70 | 71 | .ui-resizable-s { 72 | background: #cccccc; 73 | } 74 | 75 | .ui-resizable-e { 76 | background: #cccccc; 77 | } 78 | 79 | tr.alt-color { 80 | background: #f0f0f0; 81 | } 82 | 83 | .jd-tagtable td, .jd-tagtable th { 84 | background: transparent; 85 | } 86 | 87 | #index-links .selected { 88 | background: transparent; 89 | font-weight: bold; 90 | } 91 | 92 | th { 93 | background: #9cacbe; 94 | } 95 | 96 | h4.jd-details-title { 97 | padding: 4px 8px; 98 | } 99 | 100 | 101 | a, a:visited { 102 | color: #437dbe; 103 | } 104 | 105 | a:hover, a:active { 106 | color: #f08000; 107 | } -------------------------------------------------------------------------------- /library/doclava-template/template/assets/customizations.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/customizations.js -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/bg_fade.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/bg_fade.jpg -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/bg_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/bg_logo.png -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/body-gradient-tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/body-gradient-tab.png -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/body-gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/body-gradient.png -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/grad-rule-qv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/grad-rule-qv.png -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/hr_gray_main.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/hr_gray_main.jpg -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/hr_gray_side.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/hr_gray_side.jpg -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/left_off.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/left_off.jpg -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/left_on.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/left_on.jpg -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/preliminary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/preliminary.png -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/resizable-e.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/resizable-e.gif -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/resizable-e2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/resizable-e2.gif -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/resizable-eg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/resizable-eg.gif -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/resizable-s.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/resizable-s.gif -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/resizable-s2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/resizable-s2.gif -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/resizable-sg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/resizable-sg.gif -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/right_off.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/right_off.jpg -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/right_on.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/right_on.jpg -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/sidenav-rule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/sidenav-rule.png -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/spacer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/spacer.gif -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/triangle-closed-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/triangle-closed-small.png -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/triangle-closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/triangle-closed.png -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/triangle-opened-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/triangle-opened-small.png -------------------------------------------------------------------------------- /library/doclava-template/template/assets/images/triangle-opened.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/images/triangle-opened.png -------------------------------------------------------------------------------- /library/doclava-template/template/assets/triangle-none.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/doclava-template/template/assets/triangle-none.gif -------------------------------------------------------------------------------- /library/doclava-template/template/classes.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 |
10 |

11 |
12 | 13 |
14 | 15 |
16 | 17 |
18 | 19 | 20 | 21 |

22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
 
32 | 33 | 34 | 35 |
36 |
37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /library/doclava-template/template/components.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /library/doclava-template/template/components/api_filter.cs: -------------------------------------------------------------------------------- 1 | 4 |
5 | 6 | 7 | 10 |
11 | 28 | 29 | -------------------------------------------------------------------------------- /library/doclava-template/template/components/masthead.cs: -------------------------------------------------------------------------------- 1 | 2 | 15 | -------------------------------------------------------------------------------- /library/doclava-template/template/components/search_box.cs: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /library/doclava-template/template/customizations.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /library/doclava-template/template/data.hdf: -------------------------------------------------------------------------------- 1 | template { 2 | which = normal 3 | } 4 | 5 | -------------------------------------------------------------------------------- /library/doclava-template/template/docpage.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 |
11 | 12 | 13 | > 14 |   15 | 16 | 17 |

18 |
19 | 20 |
21 | 22 |
23 | 24 |
25 | 26 | ↑ Go to top 27 | 28 |

← Back to

29 | 30 |
31 | 32 | 33 |
34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /library/doclava-template/template/doctype.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /library/doclava-template/template/footer.cs: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /library/doclava-template/template/head_tag.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | <?cs if:page.title ?> 11 | <?cs var:page.title ?> 12 | <?cs /if ?> 13 | <?cs if:project.name ?> 14 | | <?cs var:project.name ?> 15 | <?cs /if ?> 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 28 | 30 | 31 | 41 | 42 | -------------------------------------------------------------------------------- /library/doclava-template/template/header.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /library/doclava-template/template/hierarchy.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | 15 |
16 | 17 |
18 |

19 |
20 | 21 |
22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |    43 | 44 |   45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 |
ClassInterfaces
57 | 58 |
59 | 60 | 61 |
62 |
63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /library/doclava-template/template/index.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /library/doclava-template/template/keywords.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 | 8 |
9 |

10 |
11 | 12 |
13 | 14 |
15 | 16 |
17 | 18 | 19 | 20 |

21 |
    22 |
  •  ()
  • 25 |
27 | 28 | 29 | 30 | 31 |
32 |
33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /library/doclava-template/template/lists.cs: -------------------------------------------------------------------------------- 1 | var DATA = [ 2 | { id:, label:"", link:"", type:"" }, 4 | 5 | ]; 6 | -------------------------------------------------------------------------------- /library/doclava-template/template/navtree_data.cs: -------------------------------------------------------------------------------- 1 | var NAVTREE_DATA = 2 | 3 | ; 4 | 5 | -------------------------------------------------------------------------------- /library/doclava-template/template/nosidenavpage.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /library/doclava-template/template/package-descr.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 |
11 |
12 | 13 | 14 |
15 |
16 | 17 |
18 | package 19 |

20 |
21 | Classes | Description 22 |
23 |
24 | 25 |
26 | 27 |
28 |
29 |

30 |
31 | 32 | 33 |
34 |
35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /library/doclava-template/template/package-list.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /library/doclava-template/template/package.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 |
11 |
12 | 13 | 14 |
15 |
16 | 17 |
18 | package 19 |

20 |
21 | 22 |
23 | 24 |
25 | 26 | 27 |
28 | 29 |
30 | 31 | 32 | 33 | 34 |

35 |
36 | 37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |
49 |
50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /library/doclava-template/template/packages.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 |
11 |

12 |
13 | 14 |
15 | 16 |
17 |

18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 32 |
33 |
34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /library/doclava-template/template/sample.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |   14 |

15 |
16 | 17 |
18 |

← Back

19 | 20 |

The file containing the source code shown below is located in the corresponding directory in <sdk>/samples/android-<version>/...

21 | 22 | 23 |
24 | 25 | 26 | 27 |
28 |
29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /library/doclava-template/template/sampleindex.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |   14 |

15 |
16 | 17 |
18 |

← Back

19 | 20 | 21 | 22 | 23 |

Subdirectories

24 |
    25 | 26 |
  • /
  • 28 | 29 |
30 | 31 | 32 | 33 |

Files

34 |
    35 | 36 |
  • 38 | 39 |
40 | 41 | 42 |
43 | 44 | 45 | 46 |
47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /library/doclava-template/template/trailer.cs: -------------------------------------------------------------------------------- 1 |
2 | 3 | -------------------------------------------------------------------------------- /library/doclava-template/template/yaml_navtree.cs: -------------------------------------------------------------------------------- 1 | 11 | - title: "" 12 | path: 14 | section: 17 | - title: "" 18 | path: 20 | section: 33 | toc: 37 | -------------------------------------------------------------------------------- /library/doclava/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /library/doclava/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | apply plugin: 'java' 18 | 19 | repositories { 20 | mavenCentral() 21 | } 22 | 23 | dependencies { 24 | compile 'com.google.doclava:doclava:1.0.6' 25 | } 26 | 27 | task download(type: Copy) { 28 | from configurations.compile 29 | into 'build/libs' 30 | 31 | // "doclava-1.0.6.jar" -> "doclava.jar" 32 | rename '(doclava)(-[0-9\\.]+)(\\.jar)', '$1$3' 33 | } 34 | -------------------------------------------------------------------------------- /library/maven-publish-data.properties: -------------------------------------------------------------------------------- 1 | VERSION_NAME=0.7.5 2 | VERSION_CODE=8 3 | 4 | POM_GROUP_ID=com.h6ah4i.android 5 | POM_ARTIFACT_ID=openslmediaplayer 6 | 7 | POM_APACHE_V2_LICENCE_NAME=The Apache Software License, Version 2.0 8 | POM_APACHE_V2_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt 9 | POM_APACHE_V2_LICENCE_DIST=repo 10 | 11 | POM_FFTPACK5_LICENCE_NAME=FFTPACK5 (the "Software") License 12 | POM_FFTPACK5_LICENCE_URL=https://www2.cisl.ucar.edu/resources/legacy/fft5/license 13 | POM_FFTPACK5_LICENCE_DIST=repo 14 | 15 | POM_BSD_3_CLAUSE_LICENCE_NAME=The BSD 3-Clause License 16 | POM_BSD_3_CLAUSE_LICENCE_URL=http://opensource.org/licenses/BSD-3-Clause 17 | POM_BSD_3_CLAUSE_LICENCE_DIST=repo 18 | 19 | POM_DEVELOPER_ID=h6ah4i 20 | POM_DEVELOPER_NAME=Haruki Hasegawa 21 | 22 | POM_SCM_URL=https://github.com/h6ah4i/android-openslmediaplayer 23 | POM_SCM_CONNECTION=git:https://github.com/h6ah4i/android-openslmediaplayer.git 24 | POM_SCM_DEVELOPER_CONNECTION=git:git@github.com:h6ah4i/android-openslmediaplayer.git 25 | -------------------------------------------------------------------------------- /library/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | -keepclassmembers class com.h6ah4i.android.media.opensl.** { 18 | void *FromNative*(...); 19 | *** *FromNative*(...); 20 | } 21 | -------------------------------------------------------------------------------- /library/src/main/.gitignore: -------------------------------------------------------------------------------- 1 | libs/ 2 | obj/ 3 | -------------------------------------------------------------------------------- /library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | -------------------------------------------------------------------------------- /library/src/main/java/com/h6ah4i/android/media/IReleasable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.h6ah4i.android.media; 18 | 19 | public interface IReleasable { 20 | /** 21 | * Release associated resources. 22 | */ 23 | void release(); 24 | } 25 | -------------------------------------------------------------------------------- /library/src/main/java/com/h6ah4i/android/media/compat/AudioSystem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | package com.h6ah4i.android.media.compat; 19 | 20 | /* 21 | * This class is a mock class for AudioAttributes 22 | */ 23 | 24 | class AudioSystem { 25 | public static final int STREAM_VOICE_CALL = 0; 26 | public static final int STREAM_SYSTEM = 1; 27 | public static final int STREAM_RING = 2; 28 | public static final int STREAM_MUSIC = 3; 29 | public static final int STREAM_ALARM = 4; 30 | public static final int STREAM_NOTIFICATION = 5; 31 | public static final int STREAM_BLUETOOTH_SCO = 6; 32 | public static final int STREAM_SYSTEM_ENFORCED = 7; 33 | public static final int STREAM_DTMF = 8; 34 | public static final int STREAM_TTS = 9; 35 | } 36 | -------------------------------------------------------------------------------- /library/src/main/java/com/h6ah4i/android/media/compat/MediaPlayerCompat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | package com.h6ah4i.android.media.compat; 19 | 20 | import android.media.MediaPlayer; 21 | import android.os.Build; 22 | 23 | public class MediaPlayerCompat { 24 | private static final MediaPlayerCompatImpl mImpl; 25 | 26 | static { 27 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { 28 | mImpl = new MediaPlayerCompatImplL(); 29 | } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { 30 | mImpl = new MediaPlayerCompatImplJB(); 31 | } else { 32 | mImpl = new MediaPlayerCompatImplGB(); 33 | } 34 | } 35 | 36 | public static boolean supportsSetNextMediaPlayer() { 37 | return mImpl.supportsSetNextMediaPlayer(); 38 | } 39 | 40 | public static boolean supportsSetAudioAttributes() { 41 | return mImpl.supportsSetAudioAttributes(); 42 | } 43 | 44 | public static void setNextMediaPlayer(MediaPlayer instance, MediaPlayer next) { 45 | mImpl.setNextMediaPlayer(instance, next); 46 | } 47 | 48 | public static void setAudioAttributes(MediaPlayer instance, AudioAttributes attributes) { 49 | mImpl.setAudioAttributes(instance, attributes); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /library/src/main/java/com/h6ah4i/android/media/compat/MediaPlayerCompatImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | package com.h6ah4i.android.media.compat; 19 | 20 | import android.media.MediaPlayer; 21 | 22 | abstract class MediaPlayerCompatImpl { 23 | boolean supportsSetNextMediaPlayer() { 24 | return false; 25 | } 26 | 27 | boolean supportsSetAudioAttributes() { 28 | return false; 29 | } 30 | 31 | void setNextMediaPlayer(MediaPlayer instance, MediaPlayer next) { 32 | throw new UnsupportedOperationException("setNextMediaPlayer() is not supported"); 33 | } 34 | 35 | void setAudioAttributes(MediaPlayer instance, AudioAttributes attributes) { 36 | throw new UnsupportedOperationException("setAudioAttributes() is not supported"); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /library/src/main/java/com/h6ah4i/android/media/compat/MediaPlayerCompatImplGB.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | package com.h6ah4i.android.media.compat; 19 | 20 | import android.annotation.TargetApi; 21 | import android.os.Build; 22 | 23 | @TargetApi(Build.VERSION_CODES.GINGERBREAD) 24 | class MediaPlayerCompatImplGB extends MediaPlayerCompatImpl { 25 | } 26 | -------------------------------------------------------------------------------- /library/src/main/java/com/h6ah4i/android/media/compat/MediaPlayerCompatImplJB.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | package com.h6ah4i.android.media.compat; 19 | 20 | import android.annotation.TargetApi; 21 | import android.media.MediaPlayer; 22 | import android.os.Build; 23 | 24 | @TargetApi(Build.VERSION_CODES.JELLY_BEAN) 25 | class MediaPlayerCompatImplJB extends MediaPlayerCompatImpl { 26 | 27 | @Override 28 | boolean supportsSetNextMediaPlayer() { 29 | return true; 30 | } 31 | 32 | @Override 33 | void setNextMediaPlayer(MediaPlayer instance, MediaPlayer next) { 34 | instance.setNextMediaPlayer(next); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /library/src/main/java/com/h6ah4i/android/media/compat/MediaPlayerCompatImplL.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | package com.h6ah4i.android.media.compat; 19 | 20 | import android.annotation.TargetApi; 21 | import android.media.MediaPlayer; 22 | import android.os.Build; 23 | 24 | @TargetApi(Build.VERSION_CODES.LOLLIPOP) 25 | class MediaPlayerCompatImplL extends MediaPlayerCompatImpl { 26 | 27 | @Override 28 | boolean supportsSetNextMediaPlayer() { 29 | return true; 30 | } 31 | 32 | @Override 33 | boolean supportsSetAudioAttributes() { 34 | return true; 35 | } 36 | 37 | @Override 38 | void setNextMediaPlayer(MediaPlayer instance, MediaPlayer next) { 39 | instance.setNextMediaPlayer(next); 40 | } 41 | 42 | @Override 43 | void setAudioAttributes(MediaPlayer instance, AudioAttributes attributes) { 44 | android.media.AudioAttributes attributes2; 45 | 46 | attributes2 = (new android.media.AudioAttributes.Builder()) 47 | .setContentType(attributes.getContentType()) 48 | .setUsage(attributes.getUsage()) 49 | .setFlags(attributes.getFlags()) 50 | .build(); 51 | 52 | instance.setAudioAttributes(attributes2); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /library/src/main/java/com/h6ah4i/android/media/compat/MediaRecorder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | package com.h6ah4i.android.media.compat; 19 | 20 | /* 21 | * This class is a mock class for AudioAttributes 22 | */ 23 | 24 | class MediaRecorder { 25 | public final class AudioSource { 26 | 27 | public final static int AUDIO_SOURCE_INVALID = -1; 28 | 29 | public static final int DEFAULT = 0; 30 | public static final int MIC = 1; 31 | public static final int VOICE_UPLINK = 2; 32 | public static final int VOICE_DOWNLINK = 3; 33 | public static final int VOICE_CALL = 4; 34 | public static final int CAMCORDER = 5; 35 | public static final int VOICE_RECOGNITION = 6; 36 | public static final int VOICE_COMMUNICATION = 7; 37 | public static final int REMOTE_SUBMIX = 8; 38 | protected static final int HOTWORD = 1999; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /library/src/main/java/com/h6ah4i/android/media/opensl/audiofx/OpenSLAudioEffect.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.h6ah4i.android.media.opensl.audiofx; 18 | 19 | import java.io.IOException; 20 | 21 | import com.h6ah4i.android.media.audiofx.IAudioEffect; 22 | import com.h6ah4i.android.media.opensl.OpenSLMediaPlayer; 23 | 24 | abstract class OpenSLAudioEffect implements IAudioEffect { 25 | 26 | @Override 27 | public void setControlStatusListener(OnControlStatusChangeListener listener) 28 | throws IllegalStateException { 29 | // this method is not supported. 30 | } 31 | 32 | @Override 33 | public void setEnableStatusListener(OnEnableStatusChangeListener listener) 34 | throws IllegalStateException { 35 | // this method is not supported. 36 | } 37 | 38 | protected static void parseResultAndThrowException(int result) throws IOException { 39 | OpenSLMediaPlayer.Internal.parseResultAndThrowException(result); 40 | } 41 | 42 | protected static void parseResultAndThrowExceptForIOExceptions(int result) { 43 | OpenSLMediaPlayer.Internal.parseResultAndThrowExceptForIOExceptions(result); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /library/src/main/java/com/h6ah4i/android/media/standard/audiofx/LoudnessEnhancerCompatBase.java: -------------------------------------------------------------------------------- 1 | 2 | package com.h6ah4i.android.media.standard.audiofx; 3 | 4 | import android.media.audiofx.AudioEffect; 5 | 6 | abstract class LoudnessEnhancerCompatBase { 7 | // from effect_loudnessenhancer.h 8 | public static final int LOUDNESS_ENHANCER_DEFAULT_TARGET_GAIN_MB = 0; 9 | 10 | abstract AudioEffect create(int audioSession); 11 | 12 | abstract boolean isAvailable(); 13 | 14 | abstract float getTargetGain(AudioEffect effect); 15 | 16 | abstract void setTargetGain(AudioEffect effect, int gainmB); 17 | } 18 | -------------------------------------------------------------------------------- /library/src/main/java/com/h6ah4i/android/media/standard/audiofx/LoudnessEnhancerCompatGB.java: -------------------------------------------------------------------------------- 1 | 2 | package com.h6ah4i.android.media.standard.audiofx; 3 | 4 | import android.media.audiofx.AudioEffect; 5 | 6 | class LoudnessEnhancerCompatGB extends LoudnessEnhancerCompatBase { 7 | 8 | @Override 9 | public AudioEffect create(int audioSession) { 10 | return null; 11 | } 12 | 13 | @Override 14 | public boolean isAvailable() { 15 | return false; 16 | } 17 | 18 | @Override 19 | public float getTargetGain(AudioEffect effect) { 20 | return (float) LOUDNESS_ENHANCER_DEFAULT_TARGET_GAIN_MB; 21 | } 22 | 23 | @Override 24 | public void setTargetGain(AudioEffect effect, int gainmB) { 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /library/src/main/java/com/h6ah4i/android/media/standard/audiofx/LoudnessEnhancerCompatKitKat.java: -------------------------------------------------------------------------------- 1 | 2 | package com.h6ah4i.android.media.standard.audiofx; 3 | 4 | import android.annotation.TargetApi; 5 | import android.media.audiofx.AudioEffect; 6 | import android.media.audiofx.LoudnessEnhancer; 7 | import android.os.Build; 8 | import android.util.Log; 9 | 10 | @TargetApi(Build.VERSION_CODES.KITKAT) 11 | class LoudnessEnhancerCompatKitKat extends LoudnessEnhancerCompatBase { 12 | private static final String TAG = "LoudEnhancerCompatKK"; 13 | 14 | @Override 15 | public AudioEffect create(int audioSession) { 16 | try { 17 | return new LoudnessEnhancer(audioSession); 18 | } catch (RuntimeException e) { 19 | // NOTE: some devices doesn't support LoudnessEnhancer class and may throw an exception 20 | // (ME176C throws IllegalArgumentException) 21 | Log.w(TAG, "Failed to instantiate loudness enhancer class", e); 22 | } 23 | return null; 24 | } 25 | 26 | @Override 27 | public boolean isAvailable() { 28 | return true; 29 | } 30 | 31 | @Override 32 | public float getTargetGain(AudioEffect effect) { 33 | return ((LoudnessEnhancer) effect).getTargetGain(); 34 | } 35 | 36 | @Override 37 | public void setTargetGain(AudioEffect effect, int gainmB) { 38 | ((LoudnessEnhancer) effect).setTargetGain(gainmB); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /library/src/main/java/com/h6ah4i/android/media/standard/audiofx/VisualizerCompatBase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.h6ah4i.android.media.standard.audiofx; 18 | 19 | import android.media.audiofx.Visualizer; 20 | 21 | import com.h6ah4i.android.media.audiofx.IVisualizer; 22 | 23 | abstract class VisualizerCompatBase { 24 | public int getScalingModeCompat(Visualizer visualizer) throws IllegalStateException { 25 | // NOTE: 26 | // Normalization is always applied on prior to Jelly Bean devices. 27 | return IVisualizer.SCALING_MODE_NORMALIZED; 28 | } 29 | 30 | public int setScalingModeCompat(Visualizer visualizer, int mode) throws IllegalStateException { 31 | return IVisualizer.SUCCESS; 32 | } 33 | 34 | public int getMeasurementModeCompat(Visualizer visualizer) throws IllegalStateException { 35 | return IVisualizer.MEASUREMENT_MODE_NONE; 36 | } 37 | 38 | public int setMeasurementModeCompat(Visualizer visualizer, int mode) 39 | throws IllegalStateException { 40 | return IVisualizer.SUCCESS; 41 | } 42 | 43 | public int getMeasurementPeakRmsCompat(Visualizer visualizer, 44 | IVisualizer.MeasurementPeakRms measurement) { 45 | if (measurement != null) { 46 | measurement.mPeak = -9600; // -96 dB 47 | measurement.mRms = -9600; // -96 dB 48 | } 49 | return IVisualizer.SUCCESS; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /library/src/main/java/com/h6ah4i/android/media/standard/audiofx/VisualizerCompatGB.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.h6ah4i.android.media.standard.audiofx; 18 | 19 | import android.annotation.TargetApi; 20 | import android.os.Build; 21 | 22 | @TargetApi(Build.VERSION_CODES.GINGERBREAD) 23 | class VisualizerCompatGB extends VisualizerCompatBase { 24 | } 25 | -------------------------------------------------------------------------------- /library/src/main/java/com/h6ah4i/android/media/standard/audiofx/VisualizerCompatJB.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Haruki Hasegawa 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.h6ah4i.android.media.standard.audiofx; 18 | 19 | import android.annotation.TargetApi; 20 | import android.media.audiofx.Visualizer; 21 | import android.os.Build; 22 | 23 | @TargetApi(Build.VERSION_CODES.JELLY_BEAN) 24 | class VisualizerCompatJB extends VisualizerCompatBase { 25 | 26 | @Override 27 | public int getScalingModeCompat(Visualizer visualizer) throws IllegalStateException { 28 | return visualizer.getScalingMode(); 29 | } 30 | 31 | @Override 32 | public int setScalingModeCompat(Visualizer visualizer, int mode) throws IllegalStateException { 33 | return visualizer.setScalingMode(mode); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /library/src/main/jni/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | Language: Cpp 3 | Standard: Cpp11 4 | ColumnLimit: 120 5 | IndentWidth: 4 6 | AccessModifierOffset: -4 7 | UseTab: Never 8 | BreakBeforeBraces: Stroustrup 9 | BinPackParameters: true 10 | AllowShortIfStatementsOnASingleLine: false 11 | IndentCaseLabels: false 12 | CommentPragmas: '\*' 13 | AlwaysBreakTemplateDeclarations: true 14 | AllowAllParametersOfDeclarationOnNextLine: true 15 | -------------------------------------------------------------------------------- /library/src/main/jni/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | LOCAL_PATH:= $(call my-dir) 18 | 19 | include $(LOCAL_PATH)/openslmediaplayer-cxxdasp-build-setup.mk 20 | include $(call all-makefiles-under,$(LOCAL_PATH)) 21 | -------------------------------------------------------------------------------- /library/src/main/jni/android-platform-system-core/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | LOCAL_PATH:= $(call my-dir) 18 | 19 | include $(CLEAR_VARS) 20 | 21 | LOCAL_MODULE:= android-platform-system-core-utils 22 | 23 | LOCAL_SRC_FILES:= \ 24 | source/libutils/RefBase.cpp 25 | 26 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include 27 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include 28 | 29 | include $(BUILD_STATIC_LIBRARY) 30 | -------------------------------------------------------------------------------- /library/src/main/jni/android-platform-system-core/README: -------------------------------------------------------------------------------- 1 | This directory contains a part of the Android frameworks libraries. 2 | 3 | Original repository: 4 | https://android.googlesource.com/platform/system/core 5 | 6 | Based commit-ID: 7 | 47770b7396186d6700688fd039320283e5b68501 8 | 9 | 10 | libutils (libandroid-platform-system-core-utils.a): 11 | 12 | License: 13 | Apache License, Version 2.0 (see libutils/NOTICE) 14 | 15 | Classes: 16 | - RefBase 17 | - Strong Pointer (sp) 18 | - Weak Pointer (wp) 19 | -------------------------------------------------------------------------------- /library/src/main/jni/android-platform-system-core/source/libutils/MODULE_LICENSE_APACHE2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/src/main/jni/android-platform-system-core/source/libutils/MODULE_LICENSE_APACHE2 -------------------------------------------------------------------------------- /library/src/main/jni/android-platform-system-media/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | LOCAL_PATH:= $(call my-dir) 18 | 19 | include $(CLEAR_VARS) 20 | 21 | LOCAL_MODULE:= android-platform-system-media-audio_utils 22 | 23 | LOCAL_SRC_FILES:= \ 24 | source/audio_utils/fixedfft.cpp 25 | 26 | LOCAL_STATIC_LIBRARIES := cxxporthelper_static 27 | 28 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include 29 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include 30 | 31 | include $(BUILD_STATIC_LIBRARY) 32 | -------------------------------------------------------------------------------- /library/src/main/jni/android-platform-system-media/README: -------------------------------------------------------------------------------- 1 | This directory contains a part of the Android frameworks libraries. 2 | 3 | Original repository: 4 | https://android.googlesource.com/platform/system/media 5 | 6 | Based commit-ID: 7 | 16ef11bf7f6a220aa8eb3d358f1aada33a1b5a46 8 | 9 | 10 | libaudio_utils (libandroid-platform-system-media-audio_utils.a): 11 | 12 | License: 13 | Apache License, Version 2.0 14 | -------------------------------------------------------------------------------- /library/src/main/jni/android-platform-system-media/include/audio_utils/fixedfft.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_AUDIO_FIXEDFFT_H 18 | #define ANDROID_AUDIO_FIXEDFFT_H 19 | 20 | #include 21 | #include 22 | 23 | __BEGIN_DECLS 24 | 25 | /* See description in fixedfft.cpp */ 26 | extern void fixed_fft_real(int n, int32_t *v); 27 | 28 | __END_DECLS 29 | 30 | #endif // ANDROID_AUDIO_FIXEDFFT_H 31 | -------------------------------------------------------------------------------- /library/src/main/jni/apply_code_formatter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2014 Haruki Hasegawa 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | # loghelper 19 | find ./loghelper -name "*.h" | xargs -i clang-format -i {} 20 | 21 | # openslmediaplayer 22 | find ./openslmediaplayer -name "*.cpp" -or -name "*.hpp" | xargs -i clang-format -i {} 23 | 24 | # openslmediaplayer-jni 25 | find ./openslmediaplayer-jni -name "*.cpp" -or -name "*.hpp" | xargs -i clang-format -i {} 26 | 27 | 28 | -------------------------------------------------------------------------------- /library/src/main/jni/cpufeatures/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # 18 | # cpufeatures 19 | # 20 | include $(CLEAR_VARS) 21 | $(call import-module, android/cpufeatures) 22 | -------------------------------------------------------------------------------- /library/src/main/jni/cxxdasp/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # 18 | # cxxdasp 19 | # 20 | include $(CLEAR_VARS) 21 | $(call import-module, cxxdasp/cxxdasp) 22 | -------------------------------------------------------------------------------- /library/src/main/jni/cxxporthelper/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # 18 | # cxxporthelper 19 | # 20 | include $(CLEAR_VARS) 21 | $(call import-module, cxxporthelper/cxxporthelper) 22 | -------------------------------------------------------------------------------- /library/src/main/jni/jni_utils/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # 18 | # jni_utils 19 | # 20 | LOCAL_PATH := $(call my-dir) 21 | 22 | include $(CLEAR_VARS) 23 | 24 | LOCAL_MODULE := jni_utils 25 | 26 | LOCAL_STATIC_LIBRARIES := cxxporthelper_static 27 | 28 | LOCAL_SRC_FILES := # no source files 29 | 30 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include 31 | 32 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include 33 | 34 | include $(BUILD_STATIC_LIBRARY) 35 | -------------------------------------------------------------------------------- /library/src/main/jni/lockfreedatastructure/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # 18 | # lockfreedatastructure 19 | # 20 | include $(CLEAR_VARS) 21 | $(call import-module, lockfreedatastructure/lockfreedatastructure) 22 | -------------------------------------------------------------------------------- /library/src/main/jni/loghelper/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # 18 | # loghelper 19 | # 20 | LOCAL_PATH := $(call my-dir) 21 | 22 | include $(CLEAR_VARS) 23 | 24 | LOCAL_MODULE := loghelper 25 | 26 | LOCAL_SRC_FILES := # no source files 27 | 28 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include 29 | 30 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include 31 | LOCAL_EXPORT_LDLIBS := -llog 32 | 33 | include $(BUILD_STATIC_LIBRARY) 34 | -------------------------------------------------------------------------------- /library/src/main/jni/loghelper/include/loghelper/loghelper.h: -------------------------------------------------------------------------------- 1 | /* * Copyright (C) 2014 Haruki Hasegawa 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | /* 17 | * loghelper.h 18 | * 19 | * Created on: Jan 26, 2013 20 | * Author: hasegawa 21 | */ 22 | 23 | #ifndef LOGHELPER_H_ 24 | #define LOGHELPER_H_ 25 | 26 | #include 27 | 28 | #ifdef LOG_TAG 29 | #define LOG_PRINT(LEVEL_, LOG_TAG_, ...) __android_log_print(LEVEL_, LOG_TAG_, __VA_ARGS__) 30 | 31 | #define LOGV(...) LOG_PRINT(ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__) 32 | #define LOGD(...) LOG_PRINT(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__) 33 | #define LOGI(...) LOG_PRINT(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__) 34 | #define LOGW(...) LOG_PRINT(ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__) 35 | #define LOGE(...) LOG_PRINT(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__) 36 | #define LOGF(...) LOG_PRINT(ANDROID_LOG_FATAL, LOG_TAG, __VA_ARGS__) 37 | #else 38 | 39 | #define LOGV(...) 40 | #define LOGD(...) 41 | #define LOGI(...) 42 | #define LOGW(...) 43 | #define LOGE(...) 44 | #define LOGF(...) 45 | #endif 46 | 47 | #endif // LOGHELPER_H_ 48 | -------------------------------------------------------------------------------- /library/src/main/jni/ne10/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # 18 | # Ne10 19 | # 20 | include $(CLEAR_VARS) 21 | $(call import-module, cxxdasp/dep_libs/ne10) 22 | -------------------------------------------------------------------------------- /library/src/main/jni/openslescxx/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # 18 | # OpenSL ES CXX 19 | # 20 | include $(CLEAR_VARS) 21 | $(call import-module, openslescxx/openslescxx) 22 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer-cxxdasp-build-setup.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | 18 | LOCAL_PATH := $(call my-dir) 19 | 20 | CXXDASP_TOP_DIR := $(LOCAL_PATH)/../dep_libs/cxxdasp 21 | CXXPORTHELPER_TOP_DIR := $(CXXDASP_TOP_DIR)/android/dep_libs/cxxporthelper 22 | OPENSLESCXX_TOP_DIR := $(LOCAL_PATH)/../dep_libs/openslescxx 23 | LFDS_TOP_DIR := $(LOCAL_PATH)/../dep_libs/lockfreedatastructure 24 | 25 | 26 | 27 | # Override cxxdasp configurations 28 | include $(LOCAL_PATH)/openslmediaplayer-cxxdasp-config.mk 29 | include $(CXXDASP_TOP_DIR)/android/build-utils/cxxdasp-build-setup.mk 30 | 31 | # Add cxxporthelper's path 32 | $(call import-add-path, $(CXXPORTHELPER_TOP_DIR)/android/module) 33 | 34 | # Add openslescxx'path 35 | $(call import-add-path, $(OPENSLESCXX_TOP_DIR)/android/module) 36 | 37 | # Add lockfreedatastructure'path 38 | $(call import-add-path, $(LFDS_TOP_DIR)/android/module) 39 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer-cxxdasp-config.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # config (default FFT library: PFFFT) 18 | CXXDASP_USE_FFT_BACKEND_FFTS := 0 19 | CXXDASP_USE_FFT_BACKEND_PFFFT := 1 20 | CXXDASP_USE_FFT_BACKEND_KISS_FFT := 0 21 | CXXDASP_USE_FFT_BACKEND_NE10 := 0 22 | CXXDASP_USE_FFT_BACKEND_GP_FFT := 0 23 | 24 | # use Ne10 library for armeabi-v7a, armeabi-v7a-hard 25 | ifneq (, $(filter armeabi-v7a | armeabi-v7a-hard, $(TARGET_ARCH_ABI))) 26 | CXXDASP_USE_FFT_BACKEND_PFFFT := 0 27 | CXXDASP_USE_FFT_BACKEND_NE10 := 1 28 | endif 29 | 30 | CXXDASP_ENABLE_POLYPHASE_RESAMPLER_FACTORY_LOW_QUALITY := 1 31 | CXXDASP_ENABLE_POLYPHASE_RESAMPLER_FACTORY_HIGH_QUALITY := 1 32 | 33 | # set override flag 34 | CXXDASP_OVERRIDE_CONFIG_FILE := 1 35 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer-jni/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # 18 | # OpenSLMediaPlayerJNI 19 | # 20 | LOCAL_PATH := $(call my-dir) 21 | 22 | include $(CLEAR_VARS) 23 | 24 | LOCAL_MODULE := OpenSLMediaPlayerJNI 25 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include 26 | LOCAL_SHARED_LIBRARIES := OpenSLMediaPlayer 27 | LOCAL_STATIC_LIBRARIES := cxxporthelper_static jni_utils loghelper 28 | 29 | # enumerate all *.cpp files in the /source directory 30 | LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/source/*.cpp) 31 | # remove unnecessary $(LOCAL_PATH) 32 | LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,, $(LOCAL_SRC_FILES)) 33 | 34 | 35 | include $(BUILD_SHARED_LIBRARY) 36 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer-jni/include/OpenSLMediaPlayerContextJNIBinder.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef OPENSLMEDIAPLAYERCONTEXTJNIBINDER_HPP_ 18 | #define OPENSLMEDIAPLAYERCONTEXTJNIBINDER_HPP_ 19 | 20 | #include 21 | #include 22 | 23 | namespace oslmp { 24 | namespace jni { 25 | 26 | class OpenSLMediaPlayerContextJNIBinder : public oslmp::OpenSLMediaPlayerContext::InternalThreadEventListener { 27 | public: 28 | OpenSLMediaPlayerContextJNIBinder(JNIEnv *env); 29 | virtual ~OpenSLMediaPlayerContextJNIBinder(); 30 | 31 | virtual void onEnterInternalThread(OpenSLMediaPlayerContext *context) noexcept override; 32 | virtual void onLeaveInternalThread(OpenSLMediaPlayerContext *context) noexcept override; 33 | 34 | // This function returns JNIEnv for internal thread 35 | JNIEnv *getJNIEnv() const noexcept { return env_; } 36 | 37 | private: 38 | JavaVM *jvm_; 39 | JNIEnv *env_; 40 | bool jvm_attached_; 41 | }; 42 | 43 | } // namespace jni 44 | } // namespace oslmp 45 | 46 | #endif // OPENSLMEDIAPLAYERCONTEXTJNIBINDER_HPP_ 47 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer-lib-loader-helper/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # 18 | # OpenSLMediaPlayerLibLoaderHelper 19 | # 20 | LOCAL_PATH := $(call my-dir) 21 | 22 | include $(CLEAR_VARS) 23 | 24 | LOCAL_MODULE := OpenSLMediaPlayerLibLoaderHelper 25 | LOCAL_STATIC_LIBRARIES := cpufeatures 26 | 27 | # enumerate all *.cpp files in the /source directory 28 | LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/source/*.cpp) 29 | # remove unnecessary $(LOCAL_PATH) 30 | LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,, $(LOCAL_SRC_FILES)) 31 | 32 | include $(BUILD_SHARED_LIBRARY) 33 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer-lib-loader-helper/source/com_h6ah4i_android_media_opensl_OpenSLMediaPlayerNativeLibraryLoader.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #include 18 | #include 19 | 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | 26 | JNIEXPORT jboolean JNICALL 27 | Java_com_h6ah4i_android_media_opensl_OpenSLMediaPlayerNativeLibraryLoader_checkIsNeonDisabledLibRequired( 28 | JNIEnv *env, jclass clazz) noexcept 29 | { 30 | const AndroidCpuFamily cpu_family = android_getCpuFamily(); 31 | const uint64_t cpu_features = android_getCpuFeatures(); 32 | 33 | const bool is_arm_v7a = 34 | (cpu_family == ANDROID_CPU_FAMILY_ARM) && 35 | ((cpu_features & ANDROID_CPU_ARM_FEATURE_ARMv7) != 0); 36 | 37 | if (!is_arm_v7a) { 38 | return false; 39 | } 40 | 41 | const bool support_neon = ((cpu_features & ANDROID_CPU_ARM_FEATURE_NEON) != 0); 42 | 43 | if (support_neon) { 44 | return false; 45 | } 46 | 47 | return true; 48 | } 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/include/oslmp/OpenSLMediaPlayerAPICommon.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef OPENSLMEDIAPLAYERAPICOMMONHPP_ 18 | #define OPENSLMEDIAPLAYERAPICOMMONHPP_ 19 | 20 | #include // NOTE: do not use cxxportheler/cstdint to avoid cxxporthelper dependencies 21 | 22 | #include 23 | #include 24 | 25 | #include 26 | 27 | #define OSLMP_API_ABI 28 | 29 | #endif // OPENSLMEDIAPLAYERAPICOMMONHPP_ 30 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/include/oslmp/OpenSLMediaPlayerBassBoost.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef OPENSLMEDIAPLAYERBASSBOOST_HPP_ 18 | #define OPENSLMEDIAPLAYERBASSBOOST_HPP_ 19 | 20 | #include 21 | 22 | namespace oslmp { 23 | 24 | class OpenSLMediaPlayerContext; 25 | 26 | class OpenSLMediaPlayerBassBoost : public virtual android::RefBase { 27 | public: 28 | struct Settings { 29 | int16_t strength; 30 | }; 31 | 32 | OpenSLMediaPlayerBassBoost(const android::sp &context) OSLMP_API_ABI; 33 | virtual ~OpenSLMediaPlayerBassBoost() OSLMP_API_ABI; 34 | 35 | int setEnabled(bool enabled) noexcept OSLMP_API_ABI; 36 | int getEnabled(bool *enabled) noexcept OSLMP_API_ABI; 37 | int getId(int *id) noexcept OSLMP_API_ABI; 38 | int hasControl(bool *hasControl) noexcept OSLMP_API_ABI; 39 | int getStrengthSupported(bool *strengthSupported) noexcept OSLMP_API_ABI; 40 | int getRoundedStrength(int16_t *roundedStrength) noexcept OSLMP_API_ABI; 41 | int getProperties(Settings *settings) noexcept OSLMP_API_ABI; 42 | int setStrength(int16_t strength) noexcept OSLMP_API_ABI; 43 | int setProperties(const Settings *settings) noexcept OSLMP_API_ABI; 44 | 45 | private: 46 | class Impl; 47 | Impl *impl_; // NOTE: do not use unique_ptr to avoid cxxporthelper dependencies 48 | }; 49 | 50 | } // namespace oslmp 51 | 52 | #endif // OPENSLMEDIAPLAYERBASSBOOST_HPP_ 53 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/include/oslmp/OpenSLMediaPlayerPreAmp.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef OPENSLMEDIAPLAYERPREAMP_HPP_ 18 | #define OPENSLMEDIAPLAYERPREAMP_HPP_ 19 | 20 | #include 21 | 22 | namespace oslmp { 23 | 24 | class OpenSLMediaPlayerContext; 25 | 26 | class OpenSLMediaPlayerPreAmp : public virtual android::RefBase { 27 | public: 28 | struct Settings { 29 | float level; 30 | }; 31 | 32 | OpenSLMediaPlayerPreAmp(const android::sp &context) OSLMP_API_ABI; 33 | virtual ~OpenSLMediaPlayerPreAmp() OSLMP_API_ABI; 34 | 35 | int setEnabled(bool enabled) noexcept OSLMP_API_ABI; 36 | int getEnabled(bool *enabled) noexcept OSLMP_API_ABI; 37 | int getId(int *id) noexcept OSLMP_API_ABI; 38 | int hasControl(bool *hasControl) noexcept OSLMP_API_ABI; 39 | int getLevel(float *level) noexcept OSLMP_API_ABI; 40 | int getProperties(Settings *settings) noexcept OSLMP_API_ABI; 41 | int setLevel(float level) noexcept OSLMP_API_ABI; 42 | int setProperties(const Settings *settings) noexcept OSLMP_API_ABI; 43 | 44 | private: 45 | class Impl; 46 | Impl *impl_; // NOTE: do not use unique_ptr to avoid cxxporthelper dependencies 47 | }; 48 | 49 | } // namespace oslmp 50 | 51 | #endif // OPENSLMEDIAPLAYERPREAMP_HPP_ 52 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/include/oslmp/OpenSLMediaPlayerResultCodes.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef OPENSLMEDIAPLAYERRESULTCODES_HPP_ 18 | #define OPENSLMEDIAPLAYERRESULTCODES_HPP_ 19 | 20 | #define OSLMP_RESULT_SUCCESS 0 21 | #define OSLMP_RESULT_ERROR -1 22 | #define OSLMP_RESULT_INVALID_HANDLE -2 23 | #define OSLMP_RESULT_ILLEGAL_STATE -3 24 | #define OSLMP_RESULT_ILLEGAL_ARGUMENT -4 25 | #define OSLMP_RESULT_INTERNAL_ERROR -5 26 | #define OSLMP_RESULT_MEMORY_ALLOCATION_FAILED -6 27 | #define OSLMP_RESULT_RESOURCE_ALLOCATION_FAILED -7 28 | #define OSLMP_RESULT_CONTENT_NOT_FOUND -8 29 | #define OSLMP_RESULT_CONTENT_UNSUPPORTED -9 30 | #define OSLMP_RESULT_IO_ERROR -10 31 | #define OSLMP_RESULT_PERMISSION_DENIED -11 32 | #define OSLMP_RESULT_TIMED_OUT -12 33 | #define OSLMP_RESULT_IN_ERROR_STATE -13 34 | #define OSLMP_RESULT_CONTROL_LOST -14 35 | #define OSLMP_RESULT_DEAD_OBJECT -15 36 | 37 | #endif // OPENSLMEDIAPLAYERRESULTCODES_HPP_ 38 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/include/oslmp/OpenSLMediaPlayerVirtualizer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef OPENSLMEDIAPLAYERVIRTUALIZER_HPP_ 18 | #define OPENSLMEDIAPLAYERVIRTUALIZER_HPP_ 19 | 20 | #include 21 | 22 | namespace oslmp { 23 | 24 | class OpenSLMediaPlayerContext; 25 | 26 | class OpenSLMediaPlayerVirtualizer : public virtual android::RefBase { 27 | public: 28 | struct Settings { 29 | int16_t strength; 30 | }; 31 | 32 | OpenSLMediaPlayerVirtualizer(const android::sp &context) OSLMP_API_ABI; 33 | virtual ~OpenSLMediaPlayerVirtualizer() OSLMP_API_ABI; 34 | 35 | int setEnabled(bool enabled) noexcept OSLMP_API_ABI; 36 | int getEnabled(bool *enabled) noexcept OSLMP_API_ABI; 37 | int getId(int *id) noexcept OSLMP_API_ABI; 38 | int hasControl(bool *hasControl) noexcept OSLMP_API_ABI; 39 | int getStrengthSupported(bool *strengthSupported) noexcept OSLMP_API_ABI; 40 | int getRoundedStrength(int16_t *roundedStrength) noexcept OSLMP_API_ABI; 41 | int getProperties(Settings *settings) noexcept OSLMP_API_ABI; 42 | int setStrength(int16_t strength) noexcept OSLMP_API_ABI; 43 | int setProperties(const Settings *settings) noexcept OSLMP_API_ABI; 44 | 45 | private: 46 | class Impl; 47 | Impl *impl_; // NOTE: do not use unique_ptr to avoid cxxporthelper dependencies 48 | }; 49 | 50 | } // namespace oslmp 51 | 52 | #endif // OPENSLMEDIAPLAYERVIRTUALIZER_HPP_ 53 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/internal_include/oslmp/impl/AudioDataTypes.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef AUDIODATATYPES_HPP_ 18 | #define AUDIODATATYPES_HPP_ 19 | 20 | #include 21 | 22 | namespace oslmp { 23 | namespace impl { 24 | 25 | enum sample_format_type { kAudioSampleFormatType_Unknown, kAudioSampleFormatType_S16, kAudioSampleFormatType_F32, }; 26 | 27 | inline size_t getBytesPerSample(sample_format_type fmt) 28 | { 29 | switch (fmt) { 30 | case kAudioSampleFormatType_S16: 31 | return 2; 32 | case kAudioSampleFormatType_F32: 33 | return 4; 34 | default: 35 | return 0; 36 | } 37 | } 38 | 39 | } // namespace impl 40 | } // namespace oslmp 41 | 42 | #endif // AUDIODATATYPES_HPP_ 43 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/internal_include/oslmp/impl/AudioSinkDataPipeReadBlockQueue.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2016 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef AUDIOSINKDATAPIPEREADBLOCKQUEUE_HPP_ 18 | #define AUDIOSINKDATAPIPEREADBLOCKQUEUE_HPP_ 19 | 20 | #include "oslmp/impl/AudioSinkDataPipe.hpp" 21 | 22 | namespace opensles { 23 | class CSLAndroidSimpleBufferQueueItf; 24 | } 25 | 26 | namespace oslmp { 27 | namespace impl { 28 | 29 | class AudioSinkDataPipeReadBlockQueue { 30 | public: 31 | AudioSinkDataPipeReadBlockQueue(); 32 | ~AudioSinkDataPipeReadBlockQueue(); 33 | 34 | int initialize(int capacity) noexcept; 35 | int capacity() const noexcept; 36 | int count() const noexcept; 37 | void clear() noexcept; 38 | bool enqueue(const AudioSinkDataPipe::read_block_t &src) noexcept; 39 | bool dequeue(AudioSinkDataPipe::read_block_t &dest) noexcept; 40 | 41 | enum { 42 | MAX_BLOCK_COUNT = 32 43 | }; 44 | 45 | private: 46 | AudioSinkDataPipe::read_block_t rb_queue_[MAX_BLOCK_COUNT]; 47 | int capacity_; 48 | int count_; 49 | int rp_; 50 | int wp_; 51 | }; 52 | 53 | } // namespace impl 54 | } // namespace oslmp 55 | 56 | #endif // AUDIOSINKDATAPIPEREADBLOCKQUEUE_HPP_ 57 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/internal_include/oslmp/impl/EqualizerBandInfoCorrector.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef EQUALIZERBANDINFOCORRECTOR_HPP_ 18 | #define EQUALIZERBANDINFOCORRECTOR_HPP_ 19 | 20 | namespace oslmp { 21 | namespace impl { 22 | 23 | class EqualizerBandInfoCorrector { 24 | private: 25 | EqualizerBandInfoCorrector(); 26 | 27 | public: 28 | ~EqualizerBandInfoCorrector() {} 29 | 30 | static bool correct(int numBands, const int *inCenterFreq, const int (*inBandFreqRange)[2], int *outCenterFreq, 31 | int (*outBandFreqRange)[2]) noexcept; 32 | }; 33 | 34 | } // namespace impl 35 | } // namespace oslmp 36 | 37 | #endif // EQUALIZERBANDINFOCORRECTOR_HPP_ 38 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/internal_include/oslmp/impl/HQEqualizerPresets.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef HQEQUALIZER_PRESETS_HPP_ 18 | #define HQEQUALIZER_PRESETS_HPP_ 19 | 20 | #include 21 | 22 | namespace oslmp { 23 | namespace impl { 24 | 25 | class HQEqualizerPresets { 26 | 27 | HQEqualizerPresets() = delete; 28 | 29 | public: 30 | struct PresetData { 31 | const char *name; 32 | int16_t num_bands; 33 | const int16_t *band_level; 34 | }; 35 | 36 | static int16_t sGetNumPresets() noexcept; 37 | static const PresetData *sGetPresetData(uint16_t preset_no) noexcept; 38 | }; 39 | 40 | } // namespace impl 41 | } // namespace oslmp 42 | 43 | #endif // HQEQUALIZER_PRESETS_HPP_ 44 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/internal_include/oslmp/impl/MixedOutputAudioEffect.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef MIXEDOUTPUTAUDIOEFFECT_HPP_ 18 | #define MIXEDOUTPUTAUDIOEFFECT_HPP_ 19 | 20 | namespace oslmp { 21 | namespace impl { 22 | 23 | class MixedOutputAudioEffect { 24 | protected: 25 | MixedOutputAudioEffect() {} 26 | 27 | public: 28 | virtual ~MixedOutputAudioEffect() {} 29 | 30 | // these methods are called from message handler thread 31 | virtual bool isPollingRequired() const noexcept = 0; 32 | virtual int poll() noexcept = 0; 33 | 34 | // these methods are called from mixer thread context 35 | virtual void onAttachedToMixerThread() noexcept = 0; 36 | virtual void onDetachedFromMixerThread() noexcept = 0; 37 | 38 | virtual int pollFromMixerThread() noexcept = 0; 39 | virtual int process(float *data, uint32_t num_channels, uint32_t num_frames) noexcept = 0; 40 | }; 41 | 42 | } // namespace impl 43 | } // namespace oslmp 44 | 45 | #endif // MIXEDOUTPUTAUDIOEFFECT_HPP_ 46 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/internal_include/oslmp/impl/OpenSLES_Android_Complements.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2016 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef OPENSLES_ANDROID_COMPLEMENTS_H_ 18 | #define OPENSLES_ANDROID_COMPLEMENTS_H_ 19 | 20 | #include 21 | #include 22 | 23 | #if (__ANDROID_API__ < 21) && !defined(SL_ANDROID_PCM_REPRESENTATION_SIGNED_INT) 24 | extern "C" { 25 | 26 | /* The following pcm representations and data formats map to those in OpenSLES 1.1 */ 27 | #define SL_ANDROID_PCM_REPRESENTATION_SIGNED_INT ((SLuint32)0x00000001) 28 | #define SL_ANDROID_PCM_REPRESENTATION_UNSIGNED_INT ((SLuint32)0x00000002) 29 | #define SL_ANDROID_PCM_REPRESENTATION_FLOAT ((SLuint32)0x00000003) 30 | 31 | #define SL_ANDROID_DATAFORMAT_PCM_EX ((SLuint32)0x00000004) 32 | 33 | typedef struct SLAndroidDataFormat_PCM_EX_ { 34 | SLuint32 formatType; 35 | SLuint32 numChannels; 36 | SLuint32 sampleRate; 37 | SLuint32 bitsPerSample; 38 | SLuint32 containerSize; 39 | SLuint32 channelMask; 40 | SLuint32 endianness; 41 | SLuint32 representation; 42 | } SLAndroidDataFormat_PCM_EX; 43 | 44 | } // extern "C" 45 | #endif 46 | 47 | #endif // OPENSLES_ANDROID_COMPLEMENTS_H_ 48 | 49 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/internal_include/oslmp/impl/OpenSLMediaPlayerInternalDefs.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef OPENSLMEDIAPLAYERINTERNALDEFS_HPP_ 18 | #define OPENSLMEDIAPLAYERINTERNALDEFS_HPP_ 19 | 20 | #include 21 | 22 | // 23 | // Error codes 24 | // 25 | 26 | // NOTE: 27 | // The error codes are same with Android platform ones. 28 | // (ref. platform/frameworks/base/include/utils/Errors.h) 29 | 30 | #define ERROR_WHAT_NO_ERROR (0) 31 | #define ERROR_WHAT_UNKNOWN_ERROR (0x80000000) 32 | #define ERROR_WHAT_NO_MEMORY (-ENOMEM) 33 | #define ERROR_WHAT_INVALID_OPERATION (-ENOSYS) 34 | #define ERROR_WHAT_BAD_VALUE (-EINVAL) 35 | #define ERROR_WHAT_BAD_TYPE (0x80000001) 36 | #define ERROR_WHAT_PERMISSION_DENIED (-EPERM) 37 | #define ERROR_WHAT_NO_INIT (-ENODEV) 38 | #define ERROR_WHAT_DEAD_OBJECT (-EPIPE) 39 | #define ERROR_WHAT_TIMED_OUT (-ETIMEDOUT) 40 | 41 | namespace oslmp { 42 | namespace impl { 43 | 44 | // 45 | // Player state 46 | // 47 | typedef enum { 48 | STATE_CREATED, 49 | STATE_IDLE, 50 | STATE_INITIALIZED, 51 | STATE_PREPARING_SYNC, 52 | STATE_PREPARING_ASYNC, 53 | STATE_PREPARED, 54 | STATE_STARTED, 55 | STATE_PAUSED, 56 | STATE_PLAYBACK_COMPLETED, 57 | STATE_STOPPED, 58 | STATE_END, 59 | STATE_ERROR, 60 | } PlayerState; 61 | 62 | } // namespace impl 63 | } // namespace oslmp 64 | 65 | #endif // OPENSLMEDIAPLAYERINTERNALDEFS_HPP_ 66 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/internal_include/oslmp/impl/OpenSLMediaPlayerInternalUtils.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef OPENSLMEDIAPLAYERINTERNALUTILS_HPP_ 18 | #define OPENSLMEDIAPLAYERINTERNALUTILS_HPP_ 19 | 20 | #include 21 | #include 22 | #include "oslmp/impl/OpenSLMediaPlayerInternalDefs.hpp" 23 | 24 | namespace oslmp { 25 | namespace impl { 26 | 27 | class OpenSLMediaPlayerInternalUtils { 28 | 29 | OpenSLMediaPlayerInternalUtils() = delete; 30 | 31 | public: 32 | static bool sDecodeUri(const std::string &src, std::string &dest) noexcept; 33 | static int sTranslateOpenSLErrorCode(SLresult result) noexcept; 34 | static bool sTranslateToOpenSLStreamType(int streamType, SLint32 *slStreamType) noexcept; 35 | static bool sTranslateOpenSLStreamType(SLint32 slStreamType, int *streamType) noexcept; 36 | static const char *sGetPlayerStateName(PlayerState state) noexcept; 37 | }; 38 | 39 | } // namespace impl 40 | } // namespace oslmp 41 | 42 | #endif // OPENSLMEDIAPLAYERINTERNALUTILS_HPP_ 43 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/internal_include/oslmp/impl/OpenSLMediaPlayerMetadata.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef OPENSLMEDIAPLAYERMETADATA_HPP_ 18 | #define OPENSLMEDIAPLAYERMETADATA_HPP_ 19 | 20 | #include 21 | #include "oslmp/utils/optional.hpp" 22 | 23 | namespace oslmp { 24 | namespace impl { 25 | 26 | struct OpenSLMediaPlayerMetadata { 27 | utils::optional numChannels; // [ch] 28 | utils::optional samplesPerSec; // [milliHz] 29 | utils::optional bitsPerSample; // [bits] 30 | utils::optional containerSize; // [bytes] 31 | utils::optional channelMask; 32 | utils::optional endianness; 33 | utils::optional duration; // [ms] 34 | 35 | void clear() noexcept 36 | { 37 | numChannels.clear(); 38 | samplesPerSec.clear(); 39 | bitsPerSample.clear(); 40 | containerSize.clear(); 41 | channelMask.clear(); 42 | endianness.clear(); 43 | duration.clear(); 44 | } 45 | 46 | bool isValid() const noexcept 47 | { 48 | return numChannels.available() && samplesPerSec.available() && bitsPerSample.available() && 49 | containerSize.available() && channelMask.available() && endianness.available() && duration.available(); 50 | } 51 | }; 52 | 53 | } // namespace impl 54 | } // namespace oslmp 55 | 56 | #endif // OPENSLMEDIAPLAYERMETADATA_HPP_ 57 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/internal_include/oslmp/impl/PreAmp.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef PREAMP_HPP_ 18 | #define PREAMP_HPP_ 19 | 20 | #include 21 | 22 | // 23 | // forward declarations 24 | // 25 | namespace oslmp { 26 | namespace impl { 27 | class AudioMixer; 28 | } // namespace impl 29 | } // namespace oslmp 30 | 31 | namespace oslmp { 32 | namespace impl { 33 | 34 | class PreAmp { 35 | public: 36 | struct initialize_args_t { 37 | AudioMixer *mixer; 38 | 39 | initialize_args_t() : mixer(nullptr) {} 40 | }; 41 | 42 | PreAmp(); 43 | ~PreAmp(); 44 | 45 | bool initialize(const initialize_args_t &args) noexcept; 46 | 47 | int setEnabled(bool enabled) noexcept; 48 | int getEnabled(bool *enabled) const noexcept; 49 | int setLevel(float level) noexcept; 50 | int getLevel(float *level) const noexcept; 51 | 52 | private: 53 | class Impl; 54 | std::unique_ptr impl_; 55 | }; 56 | 57 | } // namespace impl 58 | } // namespace oslmp 59 | 60 | #endif // PREAMP_HPP_ 61 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/internal_include/oslmp/impl/StereoVolumeDataPipe.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef STEREOVOLUMEDATAPIPE_HPP_ 18 | #define STEREOVOLUMEDATAPIPE_HPP_ 19 | 20 | #include 21 | #include 22 | 23 | namespace oslmp { 24 | namespace impl { 25 | 26 | class StereoVolumeDataPipe { 27 | public: 28 | enum { PIPE_ITEM_COUNT = 3 }; 29 | 30 | struct write_block_t { 31 | float volume_left; 32 | float volume_right; 33 | uintptr_t lock; 34 | }; 35 | 36 | struct read_block_t { 37 | float volume_left; 38 | float volume_right; 39 | uintptr_t lock; 40 | }; 41 | 42 | StereoVolumeDataPipe(); 43 | ~StereoVolumeDataPipe(); 44 | 45 | int initialize() noexcept; 46 | int reset() noexcept; 47 | 48 | bool lockWrite(write_block_t &block) noexcept; 49 | bool unlockWrite(write_block_t &block) noexcept; 50 | 51 | bool lockRead(read_block_t &block) noexcept; 52 | bool unlockRead(read_block_t &block) noexcept; 53 | 54 | private: 55 | class Impl; 56 | std::unique_ptr impl_; 57 | }; 58 | 59 | } // namespace impl 60 | } // namespace oslmp 61 | 62 | #endif // STEREOVOLUMEDATAPIPE_HPP_ 63 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/internal_include/oslmp/impl/StockVisualizerAlgorithms.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef STOCKVISUALIZERALGORITHMS_HPP_ 18 | #define STOCKVISUALIZERALGORITHMS_HPP_ 19 | 20 | #include 21 | #include 22 | 23 | namespace oslmp { 24 | namespace impl { 25 | 26 | class StockVisualizerAlgorithms { 27 | private: 28 | StockVisualizerAlgorithms(); 29 | 30 | public: 31 | static void doFft(int8_t *CXXPH_RESTRICT fft, const uint8_t *CXXPH_RESTRICT waveform, uint32_t capture_size); 32 | 33 | static void measurePeakRmsSquared(const int16_t *CXXPH_RESTRICT waveform, uint32_t frameCount, 34 | uint32_t channelCount, uint16_t *CXXPH_RESTRICT outPeakU16, 35 | float *CXXPH_RESTRICT outRmsSquared); 36 | 37 | static void convertWaveformS16StereoToU8Mono(uint8_t *CXXPH_RESTRICT out_u8, const int16_t *CXXPH_RESTRICT in_s16, 38 | uint32_t frameCount, int32_t mode); 39 | 40 | static int32_t linearToMillibel(float linear); 41 | }; 42 | 43 | } // namespace impl 44 | } // namespace oslmp 45 | 46 | #endif // STOCKVISUALIZERALGORITHMS_HPP_ 47 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/internal_include/oslmp/utils/bitmap_looper.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef BITMAP_LOOPER_HPP_ 18 | #define BITMAP_LOOPER_HPP_ 19 | 20 | #include 21 | #include 22 | 23 | namespace oslmp { 24 | namespace utils { 25 | 26 | // [Usage] 27 | // 28 | // --- 29 | // bitmap_looper looper(0xA); 30 | // while (looper.loop()) { 31 | // printf("%d\n", looper.index()); 32 | // } 33 | // --- 34 | // > 1 35 | // > 3 36 | // --- 37 | class bitmap_looper { 38 | public: 39 | bitmap_looper(uint32_t bm) : bm_(bm), index_(-1) {} 40 | 41 | ~bitmap_looper() {} 42 | 43 | bool loop() noexcept 44 | { 45 | if (CXXPH_LIKELY(bm_ != 0UL)) { 46 | index_ = ::__builtin_ctz(bm_); 47 | bm_ ^= static_cast(1 << index_); 48 | return true; 49 | } else { 50 | index_ = -1; 51 | return false; 52 | } 53 | } 54 | 55 | int index() const noexcept { return index_; } 56 | 57 | private: 58 | uint32_t bm_; 59 | int index_; 60 | }; 61 | 62 | } // namespace utils 63 | } // namespace oslmp 64 | 65 | #endif // BITMAP_LOOPER_HPP_ 66 | -------------------------------------------------------------------------------- /library/src/main/jni/openslmediaplayer/internal_include/oslmp/utils/optional.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef OPTIONAL_HPP_ 18 | #define OPTIONAL_HPP_ 19 | 20 | namespace oslmp { 21 | namespace utils { 22 | 23 | template 24 | class optional { 25 | public: 26 | optional() : available_(false), value_() {} 27 | 28 | optional(T value) : available_(true), value_(value) {} 29 | 30 | const T &get() const noexcept { return value_; } 31 | 32 | optional &set(T value) noexcept 33 | { 34 | available_ = true; 35 | value_ = value; 36 | return (*this); 37 | } 38 | 39 | void clear() noexcept 40 | { 41 | available_ = false; 42 | value_ = T(); 43 | } 44 | 45 | bool available() const noexcept { return available_; } 46 | 47 | private: 48 | bool available_; 49 | T value_; 50 | }; 51 | 52 | } // namespace utils 53 | } // namespace oslmp 54 | 55 | #endif // OPTIONAL_HPP_ 56 | -------------------------------------------------------------------------------- /library/src/main/jni/pffft/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Haruki Hasegawa 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # 18 | # pffft 19 | # 20 | include $(CLEAR_VARS) 21 | $(call import-module, cxxdasp/dep_libs/pffft) 22 | -------------------------------------------------------------------------------- /library/src/main/res/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/library/src/main/res/.gitignore -------------------------------------------------------------------------------- /native-example/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /.externalNativeBuild 3 | -------------------------------------------------------------------------------- /native-example/NOTICE: -------------------------------------------------------------------------------- 1 | Additional NOTICEs for the "native-example" application. 2 | 3 | ====================================================================== 4 | native_app_glue 5 | ---------------------------------------------------------------------- 6 | 7 | Copyright (C) 2010 The Android Open Source Project 8 | 9 | Licensed under the Apache License, Version 2.0 (the "License"); 10 | you may not use this file except in compliance with the License. 11 | You may obtain a copy of the License at 12 | 13 | http://www.apache.org/licenses/LICENSE-2.0 14 | 15 | Unless required by applicable law or agreed to in writing, software 16 | distributed under the License is distributed on an "AS IS" BASIS, 17 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | See the License for the specific language governing permissions and 19 | limitations under the License. 20 | -------------------------------------------------------------------------------- /native-example/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/hasegawa/Applications/android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /native-example/src/main/java/com/h6ah4i/android/example/nativeopenslmediaplayer/AboutActivity.java: -------------------------------------------------------------------------------- 1 | package com.h6ah4i.android.example.nativeopenslmediaplayer; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | 6 | public class AboutActivity extends Activity { 7 | 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | setContentView(R.layout.activity_about); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /native-example/src/main/jni/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | Language: Cpp 3 | Standard: Cpp11 4 | ColumnLimit: 120 5 | IndentWidth: 4 6 | AccessModifierOffset: -4 7 | UseTab: Never 8 | BreakBeforeBraces: Stroustrup 9 | BinPackParameters: true 10 | AllowShortIfStatementsOnASingleLine: false 11 | IndentCaseLabels: false 12 | CommentPragmas: '\*' 13 | AlwaysBreakTemplateDeclarations: true 14 | AllowAllParametersOfDeclarationOnNextLine: true 15 | -------------------------------------------------------------------------------- /native-example/src/main/jni/Android.mk: -------------------------------------------------------------------------------- 1 | 2 | MY_DIR := $(call my-dir) 3 | 4 | # 5 | # 6 | # 7 | LOCAL_PATH := $(MY_DIR) 8 | 9 | include $(CLEAR_VARS) 10 | 11 | LOCAL_MODULE := OpenSLMediaPlayerNativeAPIExample 12 | LOCAL_SRC_FILES := \ 13 | src/main.cpp \ 14 | src/app_engine.cpp \ 15 | src/app_command_pipe.cpp \ 16 | src/com_h6ah4i_android_example_nativeopenslmediaplayer_MainNativeActivity.cpp 17 | LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv1_CM 18 | LOCAL_STATIC_LIBRARIES := android_native_app_glue 19 | LOCAL_SHARED_LIBRARIES := OpenSLMediaPlayer 20 | 21 | include $(BUILD_SHARED_LIBRARY) 22 | 23 | # 24 | # native_app_glue 25 | # 26 | $(call import-module,android/native_app_glue) 27 | 28 | # 29 | # OpenSLMediaPlayer 30 | # 31 | OPENSLMEDIAPLAYER_TOP_DIR := $(MY_DIR)/../../../../ 32 | $(call import-add-path,$(OPENSLMEDIAPLAYER_TOP_DIR)) 33 | $(call import-module,library/src/main/jni) 34 | -------------------------------------------------------------------------------- /native-example/src/main/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_ABI := all 2 | #APP_ABI := armeabi-v7a 3 | APP_PLATFORM := android-14 4 | APP_STL := stlport_static 5 | APP_CPPFLAGS := -std=gnu++11 -fexceptions -frtti -pthread 6 | -------------------------------------------------------------------------------- /native-example/src/main/jni/src/FloatClolor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef FLOAT_COLOR_HPP_ 18 | #define FLOAT_COLOR_HPP_ 19 | 20 | struct FloatColor { 21 | float red; 22 | float green; 23 | float blue; 24 | float alpha; 25 | 26 | FloatColor() : red(0), green(0), blue(0), alpha(0) {} 27 | 28 | FloatColor(float r, float g, float b, float a) : red(r), green(g), blue(b), alpha(a) {} 29 | }; 30 | 31 | #endif // FLOAT_COLOR_HPP_ 32 | -------------------------------------------------------------------------------- /native-example/src/main/jni/src/app_command_pipe.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #ifndef APP_COMMAND_PIPE_HPP_ 18 | #define APP_COMMAND_PIPE_HPP_ 19 | 20 | #include 21 | 22 | class AppCommandPipe { 23 | public: 24 | enum { MAX_COMMAND_LENGTH = 1024 }; 25 | 26 | class EventHandler { 27 | public: 28 | virtual ~EventHandler() {} 29 | virtual void onHandleAppComand_SetDataAndPrepare(const char *file_path) = 0; 30 | virtual void onHandleAppComand_Play() = 0; 31 | virtual void onHandleAppComand_Pause() = 0; 32 | }; 33 | 34 | AppCommandPipe(android_app *state, int ident, EventHandler *handler); 35 | ~AppCommandPipe(); 36 | 37 | int setDataSourceAndPrepare(const char *file_path); 38 | int play(); 39 | int pause(); 40 | 41 | private: 42 | static void process(android_app *app, android_poll_source *source); 43 | void onReceiveCommand(); 44 | void handleCommand(const void *cmd); 45 | 46 | private: 47 | android_app *state_; 48 | EventHandler *handler_; 49 | 50 | int fd_r_cmdpipe_; 51 | int fd_w_cmdpipe_; 52 | 53 | char recv_buff_[MAX_COMMAND_LENGTH]; 54 | 55 | android_poll_source poll_source_; 56 | }; 57 | 58 | #endif // APP_COMMAND_PIPE_HPP_ 59 | -------------------------------------------------------------------------------- /native-example/src/main/jni/src/main.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2014 Haruki Hasegawa 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | #include 18 | 19 | #include "app_engine.hpp" 20 | 21 | extern "C" { 22 | 23 | void android_main(struct android_app *state) 24 | { 25 | // NOTE: AppEngine extends android::RefBase, so have to use android::sp 26 | android::sp engine; 27 | 28 | // Make sure glue isn't stripped. 29 | app_dummy(); 30 | 31 | engine = new AppEngine(); 32 | 33 | engine->initialize(state); 34 | 35 | while (true) { 36 | int ident; 37 | int events; 38 | struct android_poll_source *source; 39 | 40 | // process looper events 41 | while ((ident = ::ALooper_pollAll(engine->isActive() ? 0 : -1, NULL, &events, (void **)&source)) >= 0) { 42 | if (source != NULL) { 43 | source->process(state, source); 44 | } 45 | 46 | if (state->destroyRequested) { 47 | break; 48 | } 49 | } 50 | 51 | if (state->destroyRequested) { 52 | break; 53 | } 54 | 55 | if (engine->isActive()) { 56 | engine->render(); 57 | } 58 | } 59 | 60 | engine->terminate(); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /native-example/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/native-example/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /native-example/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/native-example/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /native-example/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/native-example/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /native-example/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/native-example/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /native-example/src/main/res/drawable-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h6ah4i/android-openslmediaplayer/50d88111af9a8055bc5098d5cd485f2bdfbe57fc/native-example/src/main/res/drawable-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /native-example/src/main/res/layout/controls.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | 22 |