{"action":"created","comment":{"url":"https://api.github.com/repos/thervh70/SEM_Team9/pulls/comments/39795108","id":39795108,"diff_hunk":"@@ -0,0 +1,72 @@\n+package nl.tudelft.ti2206.group9.audio;\n+\n+import java.io.File;\n+\n+import javafx.scene.media.AudioClip;\n+\n+/**\n+ * Creates an AudioPlayer which you can initialise, start and stop.\n+ * @author Mitchell\n+ *\n+ */\n+public class AudioPlayer {\n+\n+\tprivate static AudioClip audioPlayer;\n+\tprivate static String path;\n+\t\n+\t/**\n+\t * Creates an AudioPlayer with as input a specific path.\n+\t * @param soundPath given path\n+\t */\n+\tpublic AudioPlayer(final String soundPath) {\n+\t\tthis.path = soundPath;\n+\t\tinitialiseTune(path);\n+\t}\n+\n+\t/**\n+\t * Gets the audio file and prepares it for streaming.\n+\t * @param path leads to the soundtrack.\n+\t */\n+\tpublic void initialiseTune(final String path) {\n+\t\taudioPlayer = new AudioClip(new File(path).toURI().toString());\n+\t}\n+\t\n+\t/**\n+\t * Starts the initialised soundtrack.\n+\t */\n+\tpublic void play() {\n+\t\taudioPlayer.play();\n+\t}\n+\t\n+\t/**\n+\t * Stops the initialised soundtrack.\n+\t */\n+\tpublic void stop() {\n+\t\taudioPlayer.stop();\n+\t}\n+\t\n+\t/**\n+\t * Checks if the current audioPlayer is running.\n+\t * @return boolean true if running, false if not.\n+\t */\n+\tpublic final boolean isRunning() {\n+\t\treturn (audioPlayer.isPlaying());\n+\t}\n+\t\n+\t/**\n+\t * Returns the path of the AudioPlayer.\n+\t * @return path leads to the soundtrack.\n+\t */\n+\tpublic final String getPath() {\n+\t\treturn path;\n+\t}\n+\n+\t/**\n+\t * Sets the path of the AudioPlayer.\n+\t * @param location new path to a file.\n+\t */\n+\tpublic final void setPath(final String location) {\n+\t\tAudioPlayer.path = location;","path":"src/main/java/nl/tudelft/ti2206/group9/audio/AudioPlayer.java","position":69,"original_position":69,"commit_id":"e1a30f2d8b948f58a78d92324413d036faa1ce9c","original_commit_id":"e1a30f2d8b948f58a78d92324413d036faa1ce9c","user":{"login":"mdingjan","id":9783684,"avatar_url":"https://avatars.githubusercontent.com/u/9783684?v=3","gravatar_id":"","url":"https://api.github.com/users/mdingjan","html_url":"https://github.com/mdingjan","followers_url":"https://api.github.com/users/mdingjan/followers","following_url":"https://api.github.com/users/mdingjan/following{/other_user}","gists_url":"https://api.github.com/users/mdingjan/gists{/gist_id}","starred_url":"https://api.github.com/users/mdingjan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdingjan/subscriptions","organizations_url":"https://api.github.com/users/mdingjan/orgs","repos_url":"https://api.github.com/users/mdingjan/repos","events_url":"https://api.github.com/users/mdingjan/events{/privacy}","received_events_url":"https://api.github.com/users/mdingjan/received_events","type":"User","site_admin":false},"body":"This is true, the AudioPlayer should indeed be \"reinitialised\". \r\nWill change.\r\n<logic, bug","created_at":"2015-09-17T20:32:07Z","updated_at":"2015-09-17T20:32:07Z","html_url":"https://github.com/thervh70/SEM_Team9/pull/78#discussion_r39795108","pull_request_url":"https://api.github.com/repos/thervh70/SEM_Team9/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/thervh70/SEM_Team9/pulls/comments/39795108"},"html":{"href":"https://github.com/thervh70/SEM_Team9/pull/78#discussion_r39795108"},"pull_request":{"href":"https://api.github.com/repos/thervh70/SEM_Team9/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/thervh70/SEM_Team9/pulls/78","id":45323870,"html_url":"https://github.com/thervh70/SEM_Team9/pull/78","diff_url":"https://github.com/thervh70/SEM_Team9/pull/78.diff","patch_url":"https://github.com/thervh70/SEM_Team9/pull/78.patch","issue_url":"https://api.github.com/repos/thervh70/SEM_Team9/issues/78","number":78,"state":"open","locked":false,"title":"36 settingsscreen","user":{"login":"MKerkhof","id":9801392,"avatar_url":"https://avatars.githubusercontent.com/u/9801392?v=3","gravatar_id":"","url":"https://api.github.com/users/MKerkhof","html_url":"https://github.com/MKerkhof","followers_url":"https://api.github.com/users/MKerkhof/followers","following_url":"https://api.github.com/users/MKerkhof/following{/other_user}","gists_url":"https://api.github.com/users/MKerkhof/gists{/gist_id}","starred_url":"https://api.github.com/users/MKerkhof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MKerkhof/subscriptions","organizations_url":"https://api.github.com/users/MKerkhof/orgs","repos_url":"https://api.github.com/users/MKerkhof/repos","events_url":"https://api.github.com/users/MKerkhof/events{/privacy}","received_events_url":"https://api.github.com/users/MKerkhof/received_events","type":"User","site_admin":false},"body":"Will close #36 ","created_at":"2015-09-17T18:22:24Z","updated_at":"2015-09-17T20:32:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08f207f4533b582e85fc608a5242941df6a6a2e4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thervh70/SEM_Team9/pulls/78/commits","review_comments_url":"https://api.github.com/repos/thervh70/SEM_Team9/pulls/78/comments","review_comment_url":"https://api.github.com/repos/thervh70/SEM_Team9/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thervh70/SEM_Team9/issues/78/comments","statuses_url":"https://api.github.com/repos/thervh70/SEM_Team9/statuses/e1a30f2d8b948f58a78d92324413d036faa1ce9c","head":{"label":"thervh70:36-settingsscreen","ref":"36-settingsscreen","sha":"e1a30f2d8b948f58a78d92324413d036faa1ce9c","user":{"login":"thervh70","id":9721657,"avatar_url":"https://avatars.githubusercontent.com/u/9721657?v=3","gravatar_id":"","url":"https://api.github.com/users/thervh70","html_url":"https://github.com/thervh70","followers_url":"https://api.github.com/users/thervh70/followers","following_url":"https://api.github.com/users/thervh70/following{/other_user}","gists_url":"https://api.github.com/users/thervh70/gists{/gist_id}","starred_url":"https://api.github.com/users/thervh70/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thervh70/subscriptions","organizations_url":"https://api.github.com/users/thervh70/orgs","repos_url":"https://api.github.com/users/thervh70/repos","events_url":"https://api.github.com/users/thervh70/events{/privacy}","received_events_url":"https://api.github.com/users/thervh70/received_events","type":"User","site_admin":false},"repo":{"id":41675883,"name":"SEM_Team9","full_name":"thervh70/SEM_Team9","owner":{"login":"thervh70","id":9721657,"avatar_url":"https://avatars.githubusercontent.com/u/9721657?v=3","gravatar_id":"","url":"https://api.github.com/users/thervh70","html_url":"https://github.com/thervh70","followers_url":"https://api.github.com/users/thervh70/followers","following_url":"https://api.github.com/users/thervh70/following{/other_user}","gists_url":"https://api.github.com/users/thervh70/gists{/gist_id}","starred_url":"https://api.github.com/users/thervh70/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thervh70/subscriptions","organizations_url":"https://api.github.com/users/thervh70/orgs","repos_url":"https://api.github.com/users/thervh70/repos","events_url":"https://api.github.com/users/thervh70/events{/privacy}","received_events_url":"https://api.github.com/users/thervh70/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thervh70/SEM_Team9","description":"","fork":false,"url":"https://api.github.com/repos/thervh70/SEM_Team9","forks_url":"https://api.github.com/repos/thervh70/SEM_Team9/forks","keys_url":"https://api.github.com/repos/thervh70/SEM_Team9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thervh70/SEM_Team9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thervh70/SEM_Team9/teams","hooks_url":"https://api.github.com/repos/thervh70/SEM_Team9/hooks","issue_events_url":"https://api.github.com/repos/thervh70/SEM_Team9/issues/events{/number}","events_url":"https://api.github.com/repos/thervh70/SEM_Team9/events","assignees_url":"https://api.github.com/repos/thervh70/SEM_Team9/assignees{/user}","branches_url":"https://api.github.com/repos/thervh70/SEM_Team9/branches{/branch}","tags_url":"https://api.github.com/repos/thervh70/SEM_Team9/tags","blobs_url":"https://api.github.com/repos/thervh70/SEM_Team9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thervh70/SEM_Team9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thervh70/SEM_Team9/git/refs{/sha}","trees_url":"https://api.github.com/repos/thervh70/SEM_Team9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thervh70/SEM_Team9/statuses/{sha}","languages_url":"https://api.github.com/repos/thervh70/SEM_Team9/languages","stargazers_url":"https://api.github.com/repos/thervh70/SEM_Team9/stargazers","contributors_url":"https://api.github.com/repos/thervh70/SEM_Team9/contributors","subscribers_url":"https://api.github.com/repos/thervh70/SEM_Team9/subscribers","subscription_url":"https://api.github.com/repos/thervh70/SEM_Team9/subscription","commits_url":"https://api.github.com/repos/thervh70/SEM_Team9/commits{/sha}","git_commits_url":"https://api.github.com/repos/thervh70/SEM_Team9/git/commits{/sha}","comments_url":"https://api.github.com/repos/thervh70/SEM_Team9/comments{/number}","issue_comment_url":"https://api.github.com/repos/thervh70/SEM_Team9/issues/comments{/number}","contents_url":"https://api.github.com/repos/thervh70/SEM_Team9/contents/{+path}","compare_url":"https://api.github.com/repos/thervh70/SEM_Team9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thervh70/SEM_Team9/merges","archive_url":"https://api.github.com/repos/thervh70/SEM_Team9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thervh70/SEM_Team9/downloads","issues_url":"https://api.github.com/repos/thervh70/SEM_Team9/issues{/number}","pulls_url":"https://api.github.com/repos/thervh70/SEM_Team9/pulls{/number}","milestones_url":"https://api.github.com/repos/thervh70/SEM_Team9/milestones{/number}","notifications_url":"https://api.github.com/repos/thervh70/SEM_Team9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thervh70/SEM_Team9/labels{/name}","releases_url":"https://api.github.com/repos/thervh70/SEM_Team9/releases{/id}","created_at":"2015-08-31T13:08:41Z","updated_at":"2015-09-11T10:38:33Z","pushed_at":"2015-09-17T20:00:41Z","git_url":"git://github.com/thervh70/SEM_Team9.git","ssh_url":"git@github.com:thervh70/SEM_Team9.git","clone_url":"https://github.com/thervh70/SEM_Team9.git","svn_url":"https://github.com/thervh70/SEM_Team9","homepage":null,"size":48485,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":20,"forks":0,"open_issues":20,"watchers":2,"default_branch":"master"}},"base":{"label":"thervh70:master","ref":"master","sha":"93d4d5f3a9960b8ea6847e5929010ea266e85231","user":{"login":"thervh70","id":9721657,"avatar_url":"https://avatars.githubusercontent.com/u/9721657?v=3","gravatar_id":"","url":"https://api.github.com/users/thervh70","html_url":"https://github.com/thervh70","followers_url":"https://api.github.com/users/thervh70/followers","following_url":"https://api.github.com/users/thervh70/following{/other_user}","gists_url":"https://api.github.com/users/thervh70/gists{/gist_id}","starred_url":"https://api.github.com/users/thervh70/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thervh70/subscriptions","organizations_url":"https://api.github.com/users/thervh70/orgs","repos_url":"https://api.github.com/users/thervh70/repos","events_url":"https://api.github.com/users/thervh70/events{/privacy}","received_events_url":"https://api.github.com/users/thervh70/received_events","type":"User","site_admin":false},"repo":{"id":41675883,"name":"SEM_Team9","full_name":"thervh70/SEM_Team9","owner":{"login":"thervh70","id":9721657,"avatar_url":"https://avatars.githubusercontent.com/u/9721657?v=3","gravatar_id":"","url":"https://api.github.com/users/thervh70","html_url":"https://github.com/thervh70","followers_url":"https://api.github.com/users/thervh70/followers","following_url":"https://api.github.com/users/thervh70/following{/other_user}","gists_url":"https://api.github.com/users/thervh70/gists{/gist_id}","starred_url":"https://api.github.com/users/thervh70/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thervh70/subscriptions","organizations_url":"https://api.github.com/users/thervh70/orgs","repos_url":"https://api.github.com/users/thervh70/repos","events_url":"https://api.github.com/users/thervh70/events{/privacy}","received_events_url":"https://api.github.com/users/thervh70/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thervh70/SEM_Team9","description":"","fork":false,"url":"https://api.github.com/repos/thervh70/SEM_Team9","forks_url":"https://api.github.com/repos/thervh70/SEM_Team9/forks","keys_url":"https://api.github.com/repos/thervh70/SEM_Team9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thervh70/SEM_Team9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thervh70/SEM_Team9/teams","hooks_url":"https://api.github.com/repos/thervh70/SEM_Team9/hooks","issue_events_url":"https://api.github.com/repos/thervh70/SEM_Team9/issues/events{/number}","events_url":"https://api.github.com/repos/thervh70/SEM_Team9/events","assignees_url":"https://api.github.com/repos/thervh70/SEM_Team9/assignees{/user}","branches_url":"https://api.github.com/repos/thervh70/SEM_Team9/branches{/branch}","tags_url":"https://api.github.com/repos/thervh70/SEM_Team9/tags","blobs_url":"https://api.github.com/repos/thervh70/SEM_Team9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thervh70/SEM_Team9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thervh70/SEM_Team9/git/refs{/sha}","trees_url":"https://api.github.com/repos/thervh70/SEM_Team9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thervh70/SEM_Team9/statuses/{sha}","languages_url":"https://api.github.com/repos/thervh70/SEM_Team9/languages","stargazers_url":"https://api.github.com/repos/thervh70/SEM_Team9/stargazers","contributors_url":"https://api.github.com/repos/thervh70/SEM_Team9/contributors","subscribers_url":"https://api.github.com/repos/thervh70/SEM_Team9/subscribers","subscription_url":"https://api.github.com/repos/thervh70/SEM_Team9/subscription","commits_url":"https://api.github.com/repos/thervh70/SEM_Team9/commits{/sha}","git_commits_url":"https://api.github.com/repos/thervh70/SEM_Team9/git/commits{/sha}","comments_url":"https://api.github.com/repos/thervh70/SEM_Team9/comments{/number}","issue_comment_url":"https://api.github.com/repos/thervh70/SEM_Team9/issues/comments{/number}","contents_url":"https://api.github.com/repos/thervh70/SEM_Team9/contents/{+path}","compare_url":"https://api.github.com/repos/thervh70/SEM_Team9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thervh70/SEM_Team9/merges","archive_url":"https://api.github.com/repos/thervh70/SEM_Team9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thervh70/SEM_Team9/downloads","issues_url":"https://api.github.com/repos/thervh70/SEM_Team9/issues{/number}","pulls_url":"https://api.github.com/repos/thervh70/SEM_Team9/pulls{/number}","milestones_url":"https://api.github.com/repos/thervh70/SEM_Team9/milestones{/number}","notifications_url":"https://api.github.com/repos/thervh70/SEM_Team9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thervh70/SEM_Team9/labels{/name}","releases_url":"https://api.github.com/repos/thervh70/SEM_Team9/releases{/id}","created_at":"2015-08-31T13:08:41Z","updated_at":"2015-09-11T10:38:33Z","pushed_at":"2015-09-17T20:00:41Z","git_url":"git://github.com/thervh70/SEM_Team9.git","ssh_url":"git@github.com:thervh70/SEM_Team9.git","clone_url":"https://github.com/thervh70/SEM_Team9.git","svn_url":"https://github.com/thervh70/SEM_Team9","homepage":null,"size":48485,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":20,"forks":0,"open_issues":20,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thervh70/SEM_Team9/pulls/78"},"html":{"href":"https://github.com/thervh70/SEM_Team9/pull/78"},"issue":{"href":"https://api.github.com/repos/thervh70/SEM_Team9/issues/78"},"comments":{"href":"https://api.github.com/repos/thervh70/SEM_Team9/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/thervh70/SEM_Team9/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/thervh70/SEM_Team9/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thervh70/SEM_Team9/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/thervh70/SEM_Team9/statuses/e1a30f2d8b948f58a78d92324413d036faa1ce9c"}}}}