{ "id": "122942", "key": "TIMOB-15831", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15923", "description": "2014 Sprint 03 API", "name": "2014 Sprint 03 API", "archived": true, "released": true, "releaseDate": "2014-02-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-02-14T22:06:47.000+0000", "created": "2013-11-26T14:58:16.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "createsound", "looping", "module_media", "qe-closed-3.3.0", "qe-testadded", "sound" ], "versions": [ { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" } ], "issuelinks": [ { "id": "33392", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "119577", "key": "TIMOB-15830", "fields": { "summary": "iOS: Ti.Media.createSound \"looping\" set on creation fails ", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2014-06-20T10:39:11.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "On iOS this works fine:\r\n\r\n{code:javascript}\r\nvar music = Ti.Media.createSound({\r\n url: 'music.aac',\r\n looping: true\r\n});\r\nmusic.play();\r\n{code}\r\n\r\nOn 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.\r\n\r\n{code:javascript}\r\nvar music = Ti.Media.createSound({\r\n url: 'music.aac',\r\n looping: true\r\n});\r\nmusic.looping = true;\r\nmusic.play();\r\n{code}\r\n\r\nh1. Logs\r\nWhen the playback on Android stops, the logs show:\r\n\r\n{code}\r\n09-10 21:35:16.422: I/ALSAModule(1838): Terminated ALSA PLAYBACK device hifi\r\n09-10 21:35:16.812: I/yamaha::media::UserDep(1838): UserDep::getRouteInfo(output: audioengine=0, devices=00000002h\r\n09-10 21:35:16.812: I/yamaha::media::UserDep(1838): incall: onoff=0, devices=00000000h\r\n09-10 21:35:16.812: I/yamaha::media::UserDep(1838): capture: onoff=0, devices=00000000h, audioSource=0\r\n09-10 21:35:16.812: I/yamaha::media::UserDep(1838): playback: audio_onoff=0, line_onoff=0)\r\n{code}\r\n\r\nh1. Steps to reproduce\r\n\r\n# Create a new app: {{titanium create -p ios,android -n testLoop -d . --id test.loop}}\r\n# As {{app.js}} use:\r\n {code}\r\n var w = Ti.UI.createWindow({backgroundColor:'white'});\r\n var b = Ti.UI.createButton({title:'Play'});\r\n var m = Ti.Media.createSound({\r\n url: 'music.aac',\r\n looping: true\r\n });\r\n b.addEventListener('click', function () {\r\n m.play();\r\n });\r\n w.add(b);\r\n w.open();\r\n {code}\r\n# Drop the attached {{music.acc}} (CCL) in the {{Resources}} folder.\r\n# Run the app on both iOS and Android and see the music stop on Android after one or some loops.", "attachment": [ { "id": "44199", "filename": "music.aac", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-26T14:58:17.000+0000", "size": 121214, "mimeType": "application/octet-stream" } ], "flagged": false, "summary": "Android: Ti.Media.createSound \"looping\" set on creation fails ", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK/CLI 3.1.3.RC\r\niOS7-beta6 on iPhone 4S\r\nAndroid 4.1.2 on Samsung Galaxy S2", "comment": { "comments": [ { "id": "281608", "author": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "body": "PR : - \r\nhttps://github.com/appcelerator/titanium_mobile/pull/5036", "updateAuthor": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-11-27T08:34:23.000+0000", "updated": "2013-11-27T08:34:23.000+0000" }, { "id": "310162", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified with environment:\r\n\r\nAppcelerator-Studio:3.3.0.201406171619\r\nSdk:3.3.0.v20140619164112\r\nacs:1.0.14\r\nalloy:1.4.0-rc\r\nnpm:1.3.2\r\ntitanium:3.3.0-rc\r\ntitanium-code-processor:1.1.1\r\nxcode:5.1.1\r\nOS:Maverick(10.9.3)\r\nDevice:iPhone5s(v7.1.1),Nexus4(v4.1.1)", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-20T10:38:42.000+0000", "updated": "2014-06-20T10:38:42.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }