How to generate waveform for multiple audio files in Android? - android

I have used Rindroid to generate waveform for single audio file. Now I have to display the same audio track for more than one audio files which are selected from the device. How can I use this ringdroid to generate same waveform for multiple audios files.
Atleast is there any possiblity to maintain multiple player instances..?
Any help would be appreciated.

Related

android get frequencies peaks from mp3

im creating android audio player and i want to add the possibility of drawing live chart with frequencies amplitudes (i dont know how it is named exactly). I know how to do it with FFT. But FFT can be applied on raw data only. My player gets mp3's. So how to extract frequencies and their amplitudes from mp3 file?
I see single possible decision: to write own native library that would decompress mp3 file (AFAIK android hasn't tools for decompressing mp3s) and after that to create spectrogram using FFT.
But this method has one essential minus - it needs large quantity of time. Converting mp3 to wav and applying FFT on full raw data consumes many time. Obviously better to do it on-the-go during playback. But i dont know how to do that.
Are there any other ways to achieve my goal?
P.S. I need something like this
This goal can be achived by using mp3 decoders, for example, mpg123. It can be build for android and gives possibility for accessing to raw song data. And i've found this project which use different mp3 decoders.

android : how to play multiple audio files synchronous through media player

I want to play multiple audio files simultaneously in sync. I , file on the SD-Card, or a file in a specific folder). I want to be able to put a delay on the files and adjust the play rate.
I have looked MediaPlayer, MediaPlayer seems like the right path, but they are not synchronous multiple audio into single audio.

Re-sampling audio alters the speed

I need to mix audio files with different sample rates. I'm trying to change the sample rate of all the audio files to say 44100Hz. But when I re-sample the audio files, the speed of the original audio is altered (becomes slow). Is there a way to re-sample the audio without altering the speed? I'm using the following function to re-sample the audio file.
http://code.google.com/p/musicg/source/browse/src/com/musicg/dsp/Resampler.java
When you play the resampled audio you should play it with the new sample rate. You may be using the resampled audio at a faster sample rate.

Mix audio files (.wav) / Add audio to viedo on android

I am developing app, in which I want to :
Mix two audio files ( most probably .wav files ). Mixing here means, output file will sound like two audio files are being played at same time and not concat.
Adding audio to video.
Thanks in advance.

With opensles do you need a seperate audio player for each mp3 you want to play simultaneously?

I have seen how the output-mix can be shared between players but I am wondering how you would play multiple mp3 files simultaneously without using multiple players.
Obviously I could decode the mp3s with a 3rd party library (e.g. ffmpeg) and then mix the buffer streams myself and pass into a player but this about over the top for my needs.
Decoding with opensles seems to require a FD/URI->BufferQueue player object so that would not change the number of players.
Are there techniques I am missing?
The only limitations are that the solution must use c++ and opensles.

Categories

Resources