h6ah4i / android-openslmediaplayer

Re-implementation of Android's MediaPlayer and audio effect classes based on OpenSL ES APIs.
https://openslmediaplayer.h6ah4i.com
Apache License 2.0
418 stars 97 forks source link

OpenSLMediaPlayer (Java API) on Play Store - can't play file #13

Open benvium opened 9 years ago

benvium commented 9 years ago

Perhaps I am missing something obvious, but I'm unable to get the example app from the Play Store to play anything.

Steps:

Popup message IllegalStateException.

Same for every other combination of in-app button presses I've tried. I can't get any audio out at all.

Tried on Nexus 4 (4.4) Samsung S4 (4.2.2)

Any ideas?

h6ah4i commented 9 years ago

Hi. Try the following procedure:

  1. Pick song 1
  2. Create
  3. SetDataSource
  4. Prepare (or PrepareAsync)
  5. Start

Please check the following official state diagram of the MediaPlayer class for more detail.

Thanks.