Skip to content
/ KyAudio Public

High performance Android audio playback library, using FFmpeg decoder and AAudio / OpenSL ES API

License

Notifications You must be signed in to change notification settings

Kyant0/KyAudio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 

Repository files navigation

KyAudio

KyAudio is an idiomatic and high performance Android local audio playback library that utilizes FFmpeg decoder and AAudio / OpenSL ES API.

It seamlessly allows switching between Android's MediaPlayer and CppAudioPlayer (AAudio / OpenSL ES).

Users have the flexibility to customize output sample rate, bit depth, channel layouts and buffer size when using CppAudioPlayer. Additionally, custom equalizers and effects are supported for CppAudioPlayer.

Motivation

Given the scarcity of Android audio playback libraries, especially those supporting software decoding, I embarked on creating KyAudio. With considerable time and effort invested, I hope the library will elliminates some barriers.

Supported audio formats

audio files (FFmpeg)

aac,ac3,aiff,aif,aifc,alac,amr,3ga,ape,asf,au,snd,awb,caf,dff,dsf,flac,mka,mov,qt,m4a,3gp,3g2,mj2,mjp2,mlp,mp1,mpa,mpga,mp2,mp3,mpc,ogg,oga,mogg,ogm,opus,ra,raw,rm,shn,spx,tta,wav,wv,wvc,wma

modules (OpenMPT)

mptm,mod,s3m,xm,it,667,669,amf,ams,c67,dbm,digi,dmf,dsm,dsym,dtm,far,fmt,imf,ice,j2b,m15,mdl,med,mms,mt2,mtm,mus,nst,okt,plm,psm,pt36,ptm,puma,sfx,sfx2,st26,stk,stm,stx,stp,symmod,gmc,gtk,gt2,ult,wow,xmf,gdm,mo3,oxm,umx,xpk,ppm,mmcmp

modules (ModPlug)

669,abc,amf,ams,dbm,dmf,dsm,far,it,mdl,med,mid,mod,mt2,mtm,okt,psm,ptm,s3m,stm,ult,umx,xm,itgz,itr,itz,mdgz,mdr,mdz,s3gz,s3r,s3z,xmgz,xmr,xmz

modules (LibXmp)

mod,m15,flx,wow,dbm,digi,emod,med,mtn,okt,sfx,dtm,mgt,669,far,fnk,imf,it,liq,mdl,mtm,ptm,rtm,s3m,stm,utl,xm,amf,gdm,stx,abk,amf,psm,ps16,j2b,mfp,smp,mmdc,stim,umx,xmf

Extensions

TagLib

Lyrics (lrc) parser

Playlist (m3u*) parser

How to use

Add dependency

Create the implementations of:

MediaItem

MediaItemTree

AudioPlayerState

MediaLibraryService

Connect to the Service

Control the AudioPlayer

Advance usages

Customize the MediaNotification

Switch player to CppAudioPlayer

Customize the CppAudioPlayer

  • Buffer size: supports the minimum of 96 audio frames (2ms in 48kHz)

Apply equalizers or effects to the CppAudioPlayer

Enable double-precision floating-point (64-bit) DSP

About

High performance Android audio playback library, using FFmpeg decoder and AAudio / OpenSL ES API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published