{"action":"created","issue":{"url":"https://api.github.com/repos/MonoGame/MonoGame/issues/6516","repository_url":"https://api.github.com/repos/MonoGame/MonoGame","labels_url":"https://api.github.com/repos/MonoGame/MonoGame/issues/6516/labels{/name}","comments_url":"https://api.github.com/repos/MonoGame/MonoGame/issues/6516/comments","events_url":"https://api.github.com/repos/MonoGame/MonoGame/issues/6516/events","html_url":"https://github.com/MonoGame/MonoGame/pull/6516","id":375466380,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2OTA0MDUy","number":6516,"title":"Refactoring AL entry points loading","user":{"login":"mrhelmut","id":3427451,"node_id":"MDQ6VXNlcjM0Mjc0NTE=","avatar_url":"https://avatars3.githubusercontent.com/u/3427451?v=4","gravatar_id":"","url":"https://api.github.com/users/mrhelmut","html_url":"https://github.com/mrhelmut","followers_url":"https://api.github.com/users/mrhelmut/followers","following_url":"https://api.github.com/users/mrhelmut/following{/other_user}","gists_url":"https://api.github.com/users/mrhelmut/gists{/gist_id}","starred_url":"https://api.github.com/users/mrhelmut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrhelmut/subscriptions","organizations_url":"https://api.github.com/users/mrhelmut/orgs","repos_url":"https://api.github.com/users/mrhelmut/repos","events_url":"https://api.github.com/users/mrhelmut/events{/privacy}","received_events_url":"https://api.github.com/users/mrhelmut/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-10-30T12:35:20Z","updated_at":"2018-10-30T23:07:56Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/MonoGame/MonoGame/pulls/6516","html_url":"https://github.com/MonoGame/MonoGame/pull/6516","diff_url":"https://github.com/MonoGame/MonoGame/pull/6516.diff","patch_url":"https://github.com/MonoGame/MonoGame/pull/6516.patch"},"body":"This is a first pass at addressing #6515. It refactors the entry points so that ```DllNotFoundException``` and ```NoAudioHardwareException``` are correctly thrown upon OpenAL initialization failures.\r\n\r\ncc @cra0zy @Jjagg \r\n\r\nIf this gets merged, I'll work on another PR to make the ```Audio``` namespace optional."},"comment":{"url":"https://api.github.com/repos/MonoGame/MonoGame/issues/comments/434502765","html_url":"https://github.com/MonoGame/MonoGame/pull/6516#issuecomment-434502765","issue_url":"https://api.github.com/repos/MonoGame/MonoGame/issues/6516","id":434502765,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDUwMjc2NQ==","user":{"login":"mrhelmut","id":3427451,"node_id":"MDQ6VXNlcjM0Mjc0NTE=","avatar_url":"https://avatars3.githubusercontent.com/u/3427451?v=4","gravatar_id":"","url":"https://api.github.com/users/mrhelmut","html_url":"https://github.com/mrhelmut","followers_url":"https://api.github.com/users/mrhelmut/followers","following_url":"https://api.github.com/users/mrhelmut/following{/other_user}","gists_url":"https://api.github.com/users/mrhelmut/gists{/gist_id}","starred_url":"https://api.github.com/users/mrhelmut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrhelmut/subscriptions","organizations_url":"https://api.github.com/users/mrhelmut/orgs","repos_url":"https://api.github.com/users/mrhelmut/repos","events_url":"https://api.github.com/users/mrhelmut/events{/privacy}","received_events_url":"https://api.github.com/users/mrhelmut/received_events","type":"User","site_admin":false},"created_at":"2018-10-30T23:07:56Z","updated_at":"2018-10-30T23:07:56Z","author_association":"CONTRIBUTOR","body":"We do, if we want to make sure that ```DllNotFoundException``` and ```NoAudioHardwareException``` are correctly thrown. With static initialization it can get initialized anywhere and most importantly, outside the scope of these statements: \r\n\r\nhttps://github.com/MonoGame/MonoGame/blob/develop/MonoGame.Framework/Audio/OpenALSoundController.cs#L152\r\n\r\nhttps://github.com/MonoGame/MonoGame/blob/6f34eb393aa0ac005888d74c5c4c6ab5615fdc8c/MonoGame.Framework/Audio/SoundEffect.OpenAL.cs#L245\r\n\r\nWhich makes those try/catch blocks useless, because any exception is uncatchable due to its static ctor nature (and a missing library is currently not a silent error), which makes the detection of an audio initialization failures impossible (or at least, not consistent at all).\r\n\r\nWe need to make sure that things are done in an ordered and timed manner. We also need to have a control over whether or not the library is getting loaded if we want to avoid it be loaded while using third party audio engines."}}
{"actor":{"display_login":"mrhelmut"}}