Demand
Android opens a WAV file on the SD card, plays it, adds some effect (for example, echo, pitch shift, etc.), saves the file with the effect. Simple: (
What i know
- I can open and play the file using Soundpool or MediaPlayer.
- I can give some effect during the game using both. those. for the media player I can set the effect of the surrounding reverb. Using SoundPool, I can set the playback speed, which is kind of like a pitch shift. I am successfully implementing them right now.
- But any of these classes has no way to save the reproduced file. Therefore, I can only play, I can not save music using the effect.
What i want to know
- Are there any other classes of interest besides MediaPlayer or Soundpool. Do not pay attention to salvation, just indicate the class, I will do research on saving the file with them.
- Any third-party libraries where I can add effects and save? Happy if it is open source and free. But name them, even if it is a property.
- Any other areas where I can peek. Does OpenAL voice support filtering and voice positioning? Will it work with Android?
Ready for the dirty job. Please lend me a way.
EDIT:
We did a few more searches and stumbled upon
AudioTrack . But it will also not support file saving. So no luck there.
EDIT
OK, what if I do it myself? Get the raw bytes from the
wav file and work on it. I wrote a wav file using AudioRecord, got a wav file. Is there any resource that describes low-level sound processing (I mean byte level).
EDIT
Itβs good that the time of the battle is over, and I give generosity to the only answer that I have. After 7 days, I realized that
- We cannot save what we play using MediaPlayer, AudioTrack, etc.
- No sound processing libraries available.
- You can receive raw wav files and process audio yourself. the answer gave a nice wrapper class for reading / writing wav files. good java code to read and change the tone of wav files here .
android audio-processing android-mediaplayer soundpool audioeffect
Krishnabhadra
source share