{"action":"created","issue":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15875","repository_url":"https://api.github.com/repos/cocos2d/cocos2d-x","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15875/labels{/name}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15875/comments","events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15875/events","html_url":"https://github.com/cocos2d/cocos2d-x/pull/15875","id":160852064,"number":15875,"title":"[big refactoring] Audio latency fix for Android. Support to preload effects on Android now.","user":{"login":"dumganhar","id":493372,"avatar_url":"https://avatars.githubusercontent.com/u/493372?v=3","gravatar_id":"","url":"https://api.github.com/users/dumganhar","html_url":"https://github.com/dumganhar","followers_url":"https://api.github.com/users/dumganhar/followers","following_url":"https://api.github.com/users/dumganhar/following{/other_user}","gists_url":"https://api.github.com/users/dumganhar/gists{/gist_id}","starred_url":"https://api.github.com/users/dumganhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dumganhar/subscriptions","organizations_url":"https://api.github.com/users/dumganhar/orgs","repos_url":"https://api.github.com/users/dumganhar/repos","events_url":"https://api.github.com/users/dumganhar/events{/privacy}","received_events_url":"https://api.github.com/users/dumganhar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/labels/module:audio","name":"module:audio","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"dumganhar","id":493372,"avatar_url":"https://avatars.githubusercontent.com/u/493372?v=3","gravatar_id":"","url":"https://api.github.com/users/dumganhar","html_url":"https://github.com/dumganhar","followers_url":"https://api.github.com/users/dumganhar/followers","following_url":"https://api.github.com/users/dumganhar/following{/other_user}","gists_url":"https://api.github.com/users/dumganhar/gists{/gist_id}","starred_url":"https://api.github.com/users/dumganhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dumganhar/subscriptions","organizations_url":"https://api.github.com/users/dumganhar/orgs","repos_url":"https://api.github.com/users/dumganhar/repos","events_url":"https://api.github.com/users/dumganhar/events{/privacy}","received_events_url":"https://api.github.com/users/dumganhar/received_events","type":"User","site_admin":false},"assignees":[{"login":"dumganhar","id":493372,"avatar_url":"https://avatars.githubusercontent.com/u/493372?v=3","gravatar_id":"","url":"https://api.github.com/users/dumganhar","html_url":"https://github.com/dumganhar","followers_url":"https://api.github.com/users/dumganhar/followers","following_url":"https://api.github.com/users/dumganhar/following{/other_user}","gists_url":"https://api.github.com/users/dumganhar/gists{/gist_id}","starred_url":"https://api.github.com/users/dumganhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dumganhar/subscriptions","organizations_url":"https://api.github.com/users/dumganhar/orgs","repos_url":"https://api.github.com/users/dumganhar/repos","events_url":"https://api.github.com/users/dumganhar/events{/privacy}","received_events_url":"https://api.github.com/users/dumganhar/received_events","type":"User","site_admin":false}],"milestone":null,"comments":126,"created_at":"2016-06-17T09:52:04Z","updated_at":"2016-07-13T03:24:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15875","html_url":"https://github.com/cocos2d/cocos2d-x/pull/15875","diff_url":"https://github.com/cocos2d/cocos2d-x/pull/15875.diff","patch_url":"https://github.com/cocos2d/cocos2d-x/pull/15875.patch"},"body":"PLEASE DONT MERGE BEFORE DEVELOPERS TEST IT. AND MORE COMMENTS NEED TO BE ADDED.\r\n\r\nThis Pull Request has done the following things:\r\n\r\n* Supports to preload small audio files and cache them with PCM data buffer\r\n* MP3/Ogg/... files are decoded to PCM data by OpenSLES API\r\n* Decoded PCM buffer data matches the best sample rate & buffer size in frames of device by using resampling source code in Android Source (Android 6.0, platform/frameworks/av)\r\n* Big refactoring for the implementation of AudioEngineImpl for Android, better class responsibility\r\n* Mixing audio clips by ourself, in this way, we only need a single OpenSLES AudioPlayer for playing many clips and this will fix latency of making a AudioPlayer active and play a track. For now, we only support 32 audio clips being played simultaneously. But AudioEngine module has limited  it to 24 clips by default.\r\n* Adds audio performance test case\r\n* Supports to preload audio files asynchronously.\r\n\r\nPlease help to test it on the Android devices which have low performance. Thanks :)\r\n"},"comment":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/comments/232245908","html_url":"https://github.com/cocos2d/cocos2d-x/pull/15875#issuecomment-232245908","issue_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15875","id":232245908,"user":{"login":"ricardoquesada","id":232330,"avatar_url":"https://avatars.githubusercontent.com/u/232330?v=3","gravatar_id":"","url":"https://api.github.com/users/ricardoquesada","html_url":"https://github.com/ricardoquesada","followers_url":"https://api.github.com/users/ricardoquesada/followers","following_url":"https://api.github.com/users/ricardoquesada/following{/other_user}","gists_url":"https://api.github.com/users/ricardoquesada/gists{/gist_id}","starred_url":"https://api.github.com/users/ricardoquesada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricardoquesada/subscriptions","organizations_url":"https://api.github.com/users/ricardoquesada/orgs","repos_url":"https://api.github.com/users/ricardoquesada/repos","events_url":"https://api.github.com/users/ricardoquesada/events{/privacy}","received_events_url":"https://api.github.com/users/ricardoquesada/received_events","type":"User","site_admin":false},"created_at":"2016-07-13T03:24:33Z","updated_at":"2016-07-13T03:24:33Z","body":"@dumganhar yes, `std::future` is super useful. Try with stlport (which is part of the NDK)... I think it is a full-featured implementation of the STL."}}
{"actor":{"display_login":"ricardoquesada"}}