I'm trying to encode an audio into "mp3". I've written the decoded audio bytes into a file successfully. Before I go any further, my app crashes at this line
MediaCodec encoder = MediaCodec.createEncoderByType("audio/mpeg");
The errors are as below:
07-10 07:42:12.646: E/ACodec(6450): Unable to instantiate a decoder for type 'audio/mpeg'.
07-10 07:42:12.646: E/MediaCodec(6450): Codec reported an error. (omx error 0x80001003, internalError -2147483648)
07-10 07:42:12.646: W/dalvikvm(6450): threadid=11: thread exiting with uncaught exception (group=0x41dd1ba8)
07-10 07:42:12.646: E/AndroidRuntime(6450): FATAL EXCEPTION: Thread-4296
07-10 07:42:12.646: E/AndroidRuntime(6450): Process: com.example.letsjam, PID: 6450
07-10 07:42:12.646: E/AndroidRuntime(6450): java.io.IOException: Failed to allocate component instance
07-10 07:42:12.646: E/AndroidRuntime(6450): at android.media.MediaCodec.native_setup(Native Method)
07-10 07:42:12.646: E/AndroidRuntime(6450): at android.media.MediaCodec.<init>(MediaCodec.java:210)
07-10 07:42:12.646: E/AndroidRuntime(6450): at android.media.MediaCodec.createEncoderByType(MediaCodec.java:194)
07-10 07:42:12.646: E/AndroidRuntime(6450): at com.example.letsjam.ExportProject.run(ExportProject.java:263)
07-10 07:42:12.646: E/AndroidRuntime(6450): at java.lang.Thread.run(Thread.java:841)
Any help would be appreciated!
0 comments:
Post a Comment