{ "id": "79182", "key": "TIMOB-5298", "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": "12086", "description": "", "name": "Sprint 2011-46", "archived": true, "released": true, "releaseDate": "2011-11-21" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-01-04T14:55:56.000+0000", "created": "2011-08-11T16:24:17.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "module_media", "qe-testadded" ], "versions": [], "issuelinks": [], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-01-04T14:55:56.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": "Playing sound files repeatedly after each others by, for example pressing a button is very buggy in 1.7.2.\r\nIt works perfect in 1.6.2 so something must have happened. There are some forum threads about it also.\r\n\r\nI've made a sample application that has a button which will play a sound if clicked (attaching sample soundfile: cat.wav). Note that the format doesn't matter at all.\r\n\r\nWhen running the app, note that the sound won't play all of the times the button is pressed. You can also see that the complete event is not run on these occasions. This is in 1.7.2, switching to 1.6.2 the sound plays every time 100%. I've tried reusing the player, not releasing it and so on, no luck.\r\n\r\n{code:title=app.js|borderStyle=solid}\r\nvar playCounter = 0;\r\n\r\nvar win = Titanium.UI.createWindow({ \r\n backgroundColor:'#fff',\r\n orientationModes:[Ti.UI.LANDSCAPE_RIGHT]\r\n});\r\n\r\nvar button = Ti.UI.createButton({\r\n\ttitle:'click'\r\n});\r\nbutton.addEventListener('click', Playsound);\r\nwin.add(button);\r\n\r\nwin.open();\r\n\r\nfunction Playsound(){\r\n\tplayCounter++;\r\n\tTi.API.info(\"Playing sound, nr: \" + playCounter);\r\n\tvar player =Ti.Media.createSound({\r\n\t\turl: \"cat.mp3\"\r\n\t});\r\n\t\r\n\tplayer.addEventListener('complete', function(e) {\r\n\t\tplayer.release();\r\n\t\tplayer = null;\r\n\t\tTi.API.info(\"Sound played correctly\");\r\n\t});\r\n\tplayer.play();\r\n}\r\n{code} ", "attachment": [ { "id": "22548", "filename": "cat.mp3", "author": { "name": "gibson", "key": "gibson", "displayName": "Andreas Oberg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-11T16:24:17.000+0000", "size": 23822, "mimeType": "audio/mp3" } ], "flagged": false, "summary": "iOS: Can't play sound files repeatedly in 1.7.2", "creator": { "name": "gibson", "key": "gibson", "displayName": "Andreas Oberg", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "gibson", "key": "gibson", "displayName": "Andreas Oberg", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OSX 10.6.5. Macbook Air 1.86GHz IC2Duo, 4GB RAM\r\nTitanium Studio, build: 1.0.2.201107130739\r\nSDK: 1.7.2", "comment": { "comments": [ { "id": "166318", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Andreas\r\n\r\nWhich release of the 1.7.2 SDK did you test? It's worth including date and hash that is output to log when the app is launched to make this obvious. However, thanks for the great ticket - moving to the main project.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-09-17T11:03:58.000+0000", "updated": "2011-09-17T11:03:58.000+0000" }, { "id": "166321", "author": { "name": "gibson", "key": "gibson", "displayName": "Andreas Oberg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The log tells me: 1.7.2.97c3689\r\nThe date would be 5 minutes ago I suppose since I tested it again to be sure it still doesn't work :)\r\nThe hash: (I'm not sure this is what you are asking for)\r\n...... /iPhone Simulator/4.2/Applications/BFC0BAF2-00E2-4FCB-840C-24B25135645A/ .......", "updateAuthor": { "name": "gibson", "key": "gibson", "displayName": "Andreas Oberg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-17T15:23:37.000+0000", "updated": "2011-09-17T15:23:37.000+0000" }, { "id": "172777", "author": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Fixed by a previous checkin.", "updateAuthor": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-15T13:25:03.000+0000", "updated": "2011-11-15T13:25:03.000+0000" }, { "id": "175511", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Bug fixed. Verified on:\r\nSDK: 1.8.0.1.v20111208104316\r\nStudio: 1.0.7.201112080131\r\nOS: OS X Lion\r\nDevices Tested: iPhone Simulator 5.0, iPod 4.3.3, iPhone 5.0.1", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-08T17:53:37.000+0000", "updated": "2011-12-08T17:53:37.000+0000" }, { "id": "178029", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Open to add label\r\n", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-04T14:50:34.000+0000", "updated": "2012-01-04T14:50:34.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }