{ "id": "61159", "key": "TIMOB-527", "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": "11225", "name": "Release 1.5.0", "archived": true, "released": true, "releaseDate": "2010-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:53:24.000+0000", "created": "2011-04-15T02:31:03.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "ios", "iphone", "media", "sound" ], "versions": [], "issuelinks": [], "assignee": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:53:24.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

from community. create and play sound in a set timeout. fire 3\nsetTimeouts and the sound stops playing after the 3rd time. sound\nfile is attached. fyi - issue does not occur if sound variable is\ndeclared outside of setTimeout (i.e., var siren = null;)

\n

var label = Titanium.UI.createLabel({

\n
\ncolor: '#fff',\ntext:'Sound will stop in 3 ...',\ntextAlign: 'center',\nfont:{fontSize:20,fontFamily:'Helvetica Neue'}\n
\n

}); win.add(label);

\n

setTimeout(function(){

\n
\nvar siren= Ti.Media.createSound({url:'airraid.wav'});\nsiren.play();\n
\n

}, 1);

\n

setTimeout(function(){ label.text = '2'; }, 1000);
\nsetTimeout(function(){ label.text = '1'; }, 2000);
\nsetTimeout(function(){ label.text = 'Stopped'; }, 3000);

{html}", "attachment": [ { "id": "17863", "filename": "airraid.wav", "author": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:31:03.000+0000", "size": 1611404, "mimeType": "audio/x-pn-windows-acm" } ], "flagged": false, "summary": "setTimeout and sound", "creator": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "123468", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Not seeing this behavior any longer.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:31:04.000+0000", "updated": "2011-04-15T02:31:04.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }