Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can not play ogg on android

Tags:

android

ogg

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()
like image 668
ihucos Avatar asked May 26 '11 13:05

ihucos


2 Answers

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.

like image 180
Carl Watts Avatar answered Sep 19 '22 01:09

Carl Watts


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

like image 44
Aleadam Avatar answered Sep 19 '22 01:09

Aleadam