0

I need to be able trim wav audio files for an application I'm building.. but I have several problems. I tried using FFmpeg-android, but if you target the latest SDK, and in the future, android no longer allows using "FFmpeg.execute". I also tried with the newer mobile-FFmpeg, but the developer stopped maintaining it a few months ago... I also would like to avoid heavy frameworks to also work with video, since I only need to work with audio. I can't find answers anywhere, what am I supposed to do?

Zoe
  • 27,060
  • 21
  • 118
  • 148

1 Answers1

1

You can use AudioTrack to write PCM.

I don't know how one translates input files into PCM data. But once it is in that form, you can edit it to suit your needs and then use AudioTrack to play back the result.

Maybe the MediaExtractor.readSampleData method can be used to read the audio data into an array where you can get to it and do your trimming. I've not done enough with Android to know if this is a viable plan or not.

Phil Freihofner
  • 7,645
  • 1
  • 20
  • 41