Android: Using MediaRecorder to crop an existing audio file?
Posted
by user141146
on Stack Overflow
See other posts from Stack Overflow
or by user141146
Published on 2010-05-29T07:06:38Z
Indexed on
2010/05/29
7:12 UTC
Read the original article
Hit count: 280
Hi,
I'd like to take an existing mp3 file located on an SD card and arbitrarily crop it (e.g. crop from 0:12 to 1:14 in a 3 minute song).
The only class that I've seen that seems remotely relevant to do this is the MediaRecorder class. My 'hope' would be to "record" an existing file like this:
MediaRecorder recorder = new MediaRecorder();
recorder.setAudioSource(###some magical way of specifying an existing file??###);
But this obviously doesn't work (setAudioSource() takes an int and seems to default to the phone's microphone).
Is there a class or an approach that can be used to crop audio on the phone itself?
TKS!!
© Stack Overflow or respective owner