{"action":"created","issue":{"url":"https://api.github.com/repos/goldfire/howler.js/issues/355","labels_url":"https://api.github.com/repos/goldfire/howler.js/issues/355/labels{/name}","comments_url":"https://api.github.com/repos/goldfire/howler.js/issues/355/comments","events_url":"https://api.github.com/repos/goldfire/howler.js/issues/355/events","html_url":"https://github.com/goldfire/howler.js/issues/355","id":107965708,"number":355,"title":"stop fading","user":{"login":"verybigelephants","id":3118985,"avatar_url":"https://avatars.githubusercontent.com/u/3118985?v=3","gravatar_id":"","url":"https://api.github.com/users/verybigelephants","html_url":"https://github.com/verybigelephants","followers_url":"https://api.github.com/users/verybigelephants/followers","following_url":"https://api.github.com/users/verybigelephants/following{/other_user}","gists_url":"https://api.github.com/users/verybigelephants/gists{/gist_id}","starred_url":"https://api.github.com/users/verybigelephants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verybigelephants/subscriptions","organizations_url":"https://api.github.com/users/verybigelephants/orgs","repos_url":"https://api.github.com/users/verybigelephants/repos","events_url":"https://api.github.com/users/verybigelephants/events{/privacy}","received_events_url":"https://api.github.com/users/verybigelephants/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/goldfire/howler.js/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/goldfire/howler.js/milestones/1","html_url":"https://github.com/goldfire/howler.js/milestones/2.0","labels_url":"https://api.github.com/repos/goldfire/howler.js/milestones/1/labels","id":1324492,"number":1,"title":"2.0","description":"","creator":{"login":"goldfire","id":882005,"avatar_url":"https://avatars.githubusercontent.com/u/882005?v=3","gravatar_id":"","url":"https://api.github.com/users/goldfire","html_url":"https://github.com/goldfire","followers_url":"https://api.github.com/users/goldfire/followers","following_url":"https://api.github.com/users/goldfire/following{/other_user}","gists_url":"https://api.github.com/users/goldfire/gists{/gist_id}","starred_url":"https://api.github.com/users/goldfire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldfire/subscriptions","organizations_url":"https://api.github.com/users/goldfire/orgs","repos_url":"https://api.github.com/users/goldfire/repos","events_url":"https://api.github.com/users/goldfire/events{/privacy}","received_events_url":"https://api.github.com/users/goldfire/received_events","type":"User","site_admin":false},"open_issues":41,"closed_issues":63,"state":"open","created_at":"2015-09-25T20:33:57Z","updated_at":"2015-10-16T19:22:33Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-09-23T17:15:42Z","updated_at":"2015-10-16T19:22:33Z","closed_at":"2015-10-16T19:22:33Z","body":"currently there is no way to stop the fade(). it is useful when you want to fade the sound in at the start but also let user control the volume, which then brings unexpected thigns.\r\n\r\nright now it is much better to include jquery and use $.animate on some object, and update howler volume() on each step. i don't know about the performance but at least you can .stop(); the animation \r\n\r\nif someone is looking for a hotfix, here's an example of how i currently do it via jquery. you can even set an easing function like this!\r\n\r\nlet's say we have a list of all sounds in an object `sounds`, they are indexed, let's pick an arbitrary index `some_sound`. now let\\s say `sounds[some_sound].howl` contains the holwer sound object\r\n\r\nfirst we define an animator object like this `sounds[some_sound].animator={vol:0, my_id:\"some_sound\"}` - here 0 will be a starting animation property, because i am fading in\r\n\r\nnow we can fade into some `some_target_volume` at `some_duration`\r\n\r\n    $(sounds[some_sound].animator).stop().animate({\r\n        vol: some_target_volume\r\n    }, {\r\n        'duration': some_duration,\r\n        'easing': 'easeInSine', //or other easing function\r\n        'step':function(a){\r\n            sounds[this.my_id].howl.volume(a);\r\n        }\r\n    });\r\n\r\nif you need to stop the fade anytime you do `$(sounds[some_sound].animator).stop()`"},"comment":{"url":"https://api.github.com/repos/goldfire/howler.js/issues/comments/148811902","html_url":"https://github.com/goldfire/howler.js/issues/355#issuecomment-148811902","issue_url":"https://api.github.com/repos/goldfire/howler.js/issues/355","id":148811902,"user":{"login":"goldfire","id":882005,"avatar_url":"https://avatars.githubusercontent.com/u/882005?v=3","gravatar_id":"","url":"https://api.github.com/users/goldfire","html_url":"https://github.com/goldfire","followers_url":"https://api.github.com/users/goldfire/followers","following_url":"https://api.github.com/users/goldfire/following{/other_user}","gists_url":"https://api.github.com/users/goldfire/gists{/gist_id}","starred_url":"https://api.github.com/users/goldfire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldfire/subscriptions","organizations_url":"https://api.github.com/users/goldfire/orgs","repos_url":"https://api.github.com/users/goldfire/repos","events_url":"https://api.github.com/users/goldfire/events{/privacy}","received_events_url":"https://api.github.com/users/goldfire/received_events","type":"User","site_admin":false},"created_at":"2015-10-16T19:22:33Z","updated_at":"2015-10-16T19:22:33Z","body":"This has been fixed in 7c2b9dc0f7c3c42c22eda4a4a67c8e1929a401cf."}}