{"action":"created","issue":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/4074","repository_url":"https://api.github.com/repos/dolphin-emu/dolphin","labels_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/4074/labels{/name}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/4074/comments","events_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/4074/events","html_url":"https://github.com/dolphin-emu/dolphin/pull/4074","id":168535007,"number":4074,"title":"AudioCommon: Make the SoundStream global a unique_ptr","user":{"login":"lioncash","id":712067,"avatar_url":"https://avatars.githubusercontent.com/u/712067?v=3","gravatar_id":"","url":"https://api.github.com/users/lioncash","html_url":"https://github.com/lioncash","followers_url":"https://api.github.com/users/lioncash/followers","following_url":"https://api.github.com/users/lioncash/following{/other_user}","gists_url":"https://api.github.com/users/lioncash/gists{/gist_id}","starred_url":"https://api.github.com/users/lioncash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lioncash/subscriptions","organizations_url":"https://api.github.com/users/lioncash/orgs","repos_url":"https://api.github.com/users/lioncash/repos","events_url":"https://api.github.com/users/lioncash/events{/privacy}","received_events_url":"https://api.github.com/users/lioncash/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-31T19:54:34Z","updated_at":"2016-07-31T20:00:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/4074","html_url":"https://github.com/dolphin-emu/dolphin/pull/4074","diff_url":"https://github.com/dolphin-emu/dolphin/pull/4074.diff","patch_url":"https://github.com/dolphin-emu/dolphin/pull/4074.patch"},"body":"Basic stuff.\r\n\r\nAlternatively I could make the function act as a creational one and have it return a unique_ptr instance separate from the global which is then assigned to said global directly at the function usage site in Core.cpp, if preferred.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/dolphin-emu/dolphin/4074)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/comments/236453166","html_url":"https://github.com/dolphin-emu/dolphin/pull/4074#issuecomment-236453166","issue_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/4074","id":236453166,"user":{"login":"BhaaLseN","id":826052,"avatar_url":"https://avatars.githubusercontent.com/u/826052?v=3","gravatar_id":"","url":"https://api.github.com/users/BhaaLseN","html_url":"https://github.com/BhaaLseN","followers_url":"https://api.github.com/users/BhaaLseN/followers","following_url":"https://api.github.com/users/BhaaLseN/following{/other_user}","gists_url":"https://api.github.com/users/BhaaLseN/gists{/gist_id}","starred_url":"https://api.github.com/users/BhaaLseN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BhaaLseN/subscriptions","organizations_url":"https://api.github.com/users/BhaaLseN/orgs","repos_url":"https://api.github.com/users/BhaaLseN/repos","events_url":"https://api.github.com/users/BhaaLseN/events{/privacy}","received_events_url":"https://api.github.com/users/BhaaLseN/received_events","type":"User","site_admin":false},"created_at":"2016-07-31T20:00:42Z","updated_at":"2016-07-31T20:00:42Z","body":"\n\n\n\nReview status: 0 of 2 files reviewed at latest revision, 1 unresolved discussion.\n\n---\n\n*[Source/Core/AudioCommon/AudioCommon.cpp, line 67 \\[r1\\]](https://reviewable.io:443/reviews/dolphin-emu/dolphin/4074#-KO1XFcKADKjDlPJBB6m:-KO1XFcLajqXJQeDmmH-:356999225) ([raw file](https://github.com/dolphin-emu/dolphin/blob/ecc1710676299fea0d170af2365a780d8df76123/Source/Core/AudioCommon/AudioCommon.cpp#L67)):*\n> ```cpp\n>   UpdateSoundStream();\n> \n>   if (!g_sound_stream->Start())\n> ```\n\nWhat will happen down here if `g_sound_stream` isn't initialized (when none of the backends was valid, and `NullSound::isValid` also returned `false`)?\nIt looks a little like `NullSound::isValid` is a tiny bit useless, in the sense of always being valid; or otherwise this piece of code down here (falling back to Null after the other backend failed to start) is rather...strange.\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/dolphin-emu/dolphin/4074)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"BhaaLseN"}}