Audio on Android disappears

You must Login before you can answer or comment on any questions.

When I try to play audio files on Android in quick succession, the audio disappears after about 10-15 playbacks. It works fine on iOS and never stops on iPhone but there are problems on Android. Here's my code. Any ideas what could be wrong?

//buttons
    var button1 = Ti.UI.createButton({
        height:44,
        width:100,
        title:'play1',
        top:20
    });
    self.add(button1);
    var button2 = Ti.UI.createButton({
        height:44,
        width:100,
        title:'play2',
        top:70
    });
    self.add(button2);
    var button3 = Ti.UI.createButton({
        height:44,
        width:100,
        title:'play3',
        top:120
    });
    self.add(button3);
 
 
    //Audio files
    button1.addEventListener('click', function(e) {
        var player = Titanium.Media.createSound({url: '/audio/1_0.mp3'});
        player.play();
    });
    button2.addEventListener('click', function(e) {
        var player = Titanium.Media.createSound({url: '/audio/1_1.mp3'});
        player.play();
    });
    button3.addEventListener('click', function(e) {
        var player = Titanium.Media.createSound({url: '/audio/1_10.mp3'});
        player.play();
    });

— asked 11 months ago by Alex Raz
0 Comments

2 Answers

Any ideas??? API 3.0.0 doesn't fix this problem!

Your Answer

Think you can help? Login to answer this question!