can not play ogg on android
Asked Answered
U

3

7

does somenone knows what this means? the ogg is played with phonegap`s Meda, which uses MediaPlayer

05-26 15:41:50.007  1160  3631 E AudioFlinger: no more track names available
05-26 15:41:50.007  1160  3631 E AudioTrack: AudioFlinger could not create track, status: -12
05-26 15:41:50.007  1160  3631 E AudioSink: Unable to create audio track
05-26 15:41:50.007  1160  3631 E VorbisPlayer: mAudioSink open failed

thanks!

edit:

new Media('/android_asset/www/sounds/0.mp3',
        function() {
        //alert("playAudio():Audio Success");
    },
        function(err, arg) {
            alert(err + ' ' + arg);
    }).play()
Unbiased answered 26/5, 2011 at 13:47 Comment(5)
developer.android.com/guide/appendix/media-formats.html according to this you should be able to play ogg files . Please put some code that produce this exceptionAntivenin
ok, but its just javascript, the java part is here: github.com/phonegap/phonegap-android/blob/master/framework/src/…Unbiased
Me too. Did you ever solve this?Footworn
I'm having the same problem. Were you able to solve it?Cheney
I'm confused. Did you name an ogg file "0.mp3", or is it an mp3?Sapphire
H
4

I've had Ogg Vorbis music files that the internal Android player wouldn't play and I've found that removing all the Tags embedded in the file solved the problem. Variable bit rate and high bit rate doesn't seem to be the issue for me. The issue seems to be that the internal Android player chokes if the Ogg Vorbis file contains tags in certain formats. I haven't figured out precisely which tags in which formats are the problem. Some work. Some don't. I'll keep looking into the issue.

Heddy answered 25/4, 2016 at 16:37 Comment(0)
S
2

According to this post, you need to play ogg files with constant bitrate. Variable bitrate will cause SoundPool to crash.

There is a bug report about the same error message, but a different cause, here: http://code.google.com/p/android/issues/detail?id=13453

Successor answered 26/5, 2011 at 15:33 Comment(1)
This is commonly cited as the solution. It didn't work for me either.Footworn
C
0

I was able to solve this, but it is more like a workaround. To me it seems like Android is not capable to play ogg-files which have a too high bitrate. I re-encoded my ogg-files in audacity. In Audacity under 'file - export - options' you can configure the ogg-quality. I have set the quality to 0 (I do not hear any difference).

For another song I had to re-encode my ogg to mp3 (48khz) and then back to ogg.

Cholecalciferol answered 4/10, 2013 at 15:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.