{ "id": "85482", "key": "TIMOB-7410", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-02-08T14:31:40.000+0000", "created": "2012-01-25T15:55:23.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-and012312" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" } ], "issuelinks": [ { "id": "15116", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "80475", "key": "TIMOB-5330", "fields": { "summary": "iOS: Ti.Media.Sound delay when using preload tag ", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "15126", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "86282", "key": "TIMOB-7597", "fields": { "summary": "Android: Media - Sound plays randomly, not after each press", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "17313", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "91972", "key": "TIDOC-635", "fields": { "summary": "APIDoc: Recommend reuse of sound objects", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2012-05-18T00:43: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": "Android: V8: Titanium.Media.Sound: play() fails to play (6 times out of 10) and generates errors when called on an object created in the event listener doing the play() call. Log Attached.\r\n\r\nIn Rhino, sounds play correctly, but there are error messages. Log Attached.\r\nIn V8, if the sound object is stored in a higher scope, play() works as it does in Rhino.\r\n\r\n\r\nSteps to Reproduce:\r\n\r\n1. Run SoundTest app. Project Attached.\r\n2. Press the sound buttons, read the console, listen to the sounds.\r\n\r\nExpected Result:\r\n\r\nSounds should play every time a button is pressed and generate no error messages.\r\n\r\nActual Result:\r\n\r\nSounds rarely play and generate error messages.\r\n\r\nNote: Test Case exists in /titanium_mobile_tests_internal/FeatureTest/Media/module_media > TIMOB-5330.\r\nNote: Will investigate behavior on more devices in the future.", "attachment": [ { "id": "25333", "filename": "sound android 4.0 rhino 1.8.1.txt", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-25T15:55:23.000+0000", "size": 3947, "mimeType": "text/plain" }, { "id": "25334", "filename": "sounds android 4.0 v8 1.8.1.txt", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-25T15:55:23.000+0000", "size": 7257, "mimeType": "text/plain" }, { "id": "25335", "filename": "SoundTest.zip", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-25T15:55:23.000+0000", "size": 2326035, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android: V8: Titanium.Media.Sound: play() fails when sound object is local to an event listener", "creator": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK: 1.8.0.1.v20120119133134, 1.8.1.v20120124200134\r\nStudio: 1.0.8.201201210622\r\nOS: Lion\r\nDevices Tested: Android Emulator 2.2, Galaxy Nexus 4.0.2", "comment": { "comments": [ { "id": "182324", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "I've been playing with this now for a while on 2 devices and 1 emulator:\r\n\r\nDevice 1:\r\nModel: T-Mobile G-Slate\r\nAndroid: 3.1\r\n\r\nDevice 2:\r\nModel: HTC Desire\r\nAndroid: 2.2\r\n\r\nEmulator:\r\nAndroid 2.2\r\n\r\nI've been using our master branch (hash 6249fc07), and also 1.8.0.1 for comparison purposes. To me it seems like the behavior is already _much_ improved in master, and indeed there have been fairly recent Sound-related changes.\r\n\r\nHowever, it's still not \"perfect\", but the behavior is basically the same as what I see in a native (non-Titanium) Android application that I built for comparison purposes. With this test Titanium app (and my native Android app which follows the same idea), memory will fairly quickly run out and kill the media player.\r\n\r\nThat's because this test app -- at least for Android -- is pretty crazy. Each time you click a button, an entirely new [Android MediaPlayer|http://developer.android.com/reference/android/media/MediaPlayer.html] instance is created and prepared (because our {{createSound}} is called each time), without any of the previous ones being {{release}}'d. This is madness (in Android, anyway), and hopefully not a real-world way that someone is writing an app. If it works fine in iOS, then maybe iOS has a lighter-weight way (or simply better performing, less memory-eating way) of playing sounds: meaning, better than Android's MediaPlayer.\r\n\r\nIn a real app, I would hope our Sound proxy instances would be re-used rather than re-created every time.\r\n\r\nAnyway: @DUSTIN, can you run some tests against master (1.9.0) and see if the behavior is indeed better, as I described? If so, I think you would probably want to close this. I've spent a long time examining our code and comparing it to a native Android app's similar code, and I don't believe we're doing anything different than would be expected.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-02-07T17:33:00.000+0000", "updated": "2012-02-07T17:33:40.000+0000" }, { "id": "182436", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with:\r\nSDK: 1.8.0.1 githash=fbdc96f, 1.9.0.v20120207171634\r\nAndroid: V8\r\nStudio: 1.0.8.201201262211\r\nOS: Lion\r\nDevices Tested: iPhone4 5.0.1, Droid3 2.3.4, Nexus One 2.2.2\r\n\r\nResults:\r\n\r\nThe 1.9.0 behavior is similar/identical to the older 1.8.0.1 behavior.\r\nThe sound object is not being used properly.\r\nClosing issue as invalid.\r\nChanged code to re-use sound objects, opening new issue for iOS/Android sound performance.", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-08T14:25:23.000+0000", "updated": "2012-02-08T14:25:23.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }