简体   繁体   中英

How do you get amplitude of audio file in Android before you play it?

I know we can easily do it when we record it (several ways, actually). But how are we going about getting an amplitude graph from an mp3/ogg file?

As it is now, I see two options: 1. Quickly play it & construct it while its playing 2. Try to do it with ffmpeg (but I really don't want to do NDK)

Are there any other options beside these? Thank you

You can try to use my library Amplituda which calculate amplitudes from audio and provide it in different formats like json, list of integers and sequences.

If you want to draw a waveform from amplitudes data, you can directly use my WaveformSeekBar library fork in which Amplituda implemented.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM