1

I want to create a component that can put effects on the song played and this obviously mean that I need to use its data, where by data I mean the singnal's amplitude, that is played buy MediaPlayer.

I would prefer to retrieve the data of the file from MediaPlayer to use it in some alteration function, rather that read the file and after pass it to be played. I can take it from file directly but this will mean that I will need to handle the different extensions that the MediaPlayer already supports.
It will be awesome that the player gives me the raw data of the song and I will only modify it.

Thus, the question is "Is possible get the data from the MediaPlayer ?"

2 Answers2

0

Android is pretty high level on that front. I believe what you're looking for is access to the individual samples right? Samples from digital audio perspective? I'd say your best bet is checking out the Super Powered NDK library. It's awesome! Bit difficult to get started with and you'll need a bit of C++ but it's the best audio processing option I've ever seen on Android. Most likely gives access to the samples/amplitude somewhere!

Garry McKee
  • 141
  • 1
  • 9
0

I'm not sure this is exactly what you wanted, it's quite limited, but perhaps it can help anyway. Take a look at the AudioEffect and PresetReverb classes - and for usage example (via another post) you can look here: Android MediaPlayer with AudioEffect.

Community
  • 1
  • 1
yakobom
  • 2,681
  • 1
  • 25
  • 33