[TIMOB-15830] iOS: Ti.Media.createSound "looping" set on creation fails
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Reopened |
Resolution | Unresolved |
Affected Version/s | Release 3.1.3 |
Fix Version/s | n/a |
Components | iOS |
Labels | android, createsound, looping, sound |
Reporter | Fokke Zandbergen |
Assignee | Unknown |
Created | 2013-09-06T08:12:56.000+0000 |
Updated | 2018-02-28T20:04:04.000+0000 |
Description
On iOS this works fine:
Create a new app:
As
Drop the attached
var music = Ti.Media.createSound({
url: 'music.aac',
looping: true
});
music.play();
On Android you need to set looping
after creation and in the tests I ran even right before calling play()
, or the music will stop after one or some loops.
var music = Ti.Media.createSound({
url: 'music.aac',
looping: true
});
music.looping = true;
music.play();
Logs
When the playback on Android stops, the logs show:
09-10 21:35:16.422: I/ALSAModule(1838): Terminated ALSA PLAYBACK device hifi
09-10 21:35:16.812: I/yamaha::media::UserDep(1838): UserDep::getRouteInfo(output: audioengine=0, devices=00000002h
09-10 21:35:16.812: I/yamaha::media::UserDep(1838): incall: onoff=0, devices=00000000h
09-10 21:35:16.812: I/yamaha::media::UserDep(1838): capture: onoff=0, devices=00000000h, audioSource=0
09-10 21:35:16.812: I/yamaha::media::UserDep(1838): playback: audio_onoff=0, line_onoff=0)
Steps to reproduce
Create a new app: titanium create -p ios,android -n testLoop -d . --id test.loop
As app.js
use:
var w = Ti.UI.createWindow({backgroundColor:'white'});
var b = Ti.UI.createButton({title:'Play'});
var m = Ti.Media.createSound({
url: 'music.aac',
looping: true
});
b.addEventListener('click', function () {
m.play();
});
w.add(b);
w.open();
Drop the attached music.acc
(CCL) in the Resources
folder.
Run the app on both iOS and Android and see the music stop on Android after one or some loops.
Attachments
File | Date | Size |
---|---|---|
music.aac | 2013-09-10T19:37:31.000+0000 | 121214 |
HEllo, I tested your iOS version in a device with Android 4.3, can't reproduce the issue. Anything in your logs? Any specific device? Best, Mauro
Tested, working fine.
Updated the description with exact step. Problem doesn't always occur after one loop, but sometimes after several. Setting
looping
after creation fixes it.[~mpmiranda] did you try again after my update and comment on Sept 10th? I see you are on a closing-tickets spree but that shouldn't go without any decent response!