4

I'm developing an app to play music files. Recently, I received an "opus" coded file. I'm using MediaPlayer class in order to play files, but with this kind of files I get this error:

java.io.IOException: setDataSourceFD failed.: status=0x80000000 when executing MediaPlayer.create(context, soundURI); 

The file type is "audio/ogg; codecs=opus"

I tried to play an audio file from whatsapp media dir. If I open this audio on whatsapp, it sounds perfectly, but if I copy and paste it on my app folder's and try to pay with MediaPlayer, nothing happens.

Any idea?? Thanks!!

Auguste
  • 2,007
  • 2
  • 17
  • 25
Javier Cancio
  • 1,418
  • 12
  • 18

1 Answers1

3

Rename your .opus files to .ogg.

ThatGuyJames
  • 223
  • 2
  • 10