{"id":18556672,"url":"https://github.com/valkryst/v2daudio","last_synced_at":"2026-04-28T17:35:40.863Z","repository":{"id":142749635,"uuid":"226731008","full_name":"Valkryst/V2DAudio","owner":"Valkryst","description":"A library to play music and sound effects, utilizing JavaFX.","archived":false,"fork":false,"pushed_at":"2024-06-03T23:49:17.000Z","size":1783,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-15T13:51:24.516Z","etag":null,"topics":["audio","audio-library","audio-player","awt","effect","effects","game","game-development","java","javafx","library","music","music-library","sound","swing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Valkryst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-08T21:01:51.000Z","updated_at":"2023-04-14T18:19:06.000Z","dependencies_parsed_at":"2023-11-15T04:22:37.202Z","dependency_job_id":"f7b35de1-ce62-4ac3-b2b2-0b27012ba9fb","html_url":"https://github.com/Valkryst/V2DAudio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Valkryst/V2DAudio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valkryst%2FV2DAudio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valkryst%2FV2DAudio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valkryst%2FV2DAudio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valkryst%2FV2DAudio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Valkryst","download_url":"https://codeload.github.com/Valkryst/V2DAudio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valkryst%2FV2DAudio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32392300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","audio-library","audio-player","awt","effect","effects","game","game-development","java","javafx","library","music","music-library","sound","swing"],"created_at":"2024-11-06T21:32:45.110Z","updated_at":"2026-04-28T17:35:40.838Z","avatar_url":"https://github.com/Valkryst.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Release](https://jitpack.io/v/Valkryst/V2DAudio.svg)](https://jitpack.io/#Valkryst/V2DAudio) [![Total alerts](https://img.shields.io/lgtm/alerts/g/Valkryst/V2DAudio.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/Valkryst/V2DAudio/alerts/) [![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/Valkryst/V2DAudio.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/Valkryst/V2DAudio/context:java)\n\n## Jar Files \u0026 Maven\n\nThe Maven dependency is hosted off of JitPack, so you will need to add JitPack as a repository before you add\nV2DAudio as a dependency.\n\n### Maven\n\nJitPack:\n\n```xml=\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ejitpack.io\u003c/id\u003e\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\nDependency:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.Valkryst\u003c/groupId\u003e\n    \u003cartifactId\u003eV2DAudio\u003c/artifactId\u003e\n    \u003cversion\u003e2020.02.01\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Important Notes\n\n* Effect/MusicSettings objects can be reused, so you can use the same object with multiple different music\n    tracks and effects.\n* You _**must**_ exit your program by calling `System.exit(0)`.\n    * The JavaFX runtime is kept open, in the background, so that this library can make use of the AudioClip,\n        Media, and MediaPlayer classes. \n    * If you do not manually exit the application, with `System.ext(0)` where appropriate, then it will \n        remain open in the background, until the user either forcefully closes it or the system is shut down.\n\n## Code Examples\n\nInitializing the AudioController with a JSON file.\n\n```java\nfinal AudioController controller = AudioController.getInstance();\ncontroller.initialize(Paths.get(\"./test_res/data-valid.json\"));\n```\n\n### Playing Music \u0026 Effects\n#### Without Settings\nPlaying a piece of music.\n\n```java\nfinal Music music = controller.loadMusic(\"victory\");\nmusic.play(null);\n```\n\nPlaying an effect.\n\n```java\nfinal Effect effect = controller.loadEffect(\"thunder 2\");\neffect.play(null);\n```\n\n#### With Settings\nPlaying a piece of music.\n\n```java\nfinal MusicSettings settings = new MusicSettings();\nsettings.setVolume(0.5);\n\nfinal Music music = controller.loadMusic(\"victory\");\nmusic.play(settings);\n```\n\nPlaying an effect.\n\n```java\nfinal EffectSettings settings = new EffectSettings();\nsettings.setCycleCount(2);\n\nfinal Effect effect = controller.loadEffect(\"thunder 2\");\neffect.play(settings);\n```\n\n## JSON File Example\n\n* type - Either \"effect\" or \"music\".\n* name - A unique ID for the sprite.\n    * Capital letters are ignored, so the words \"Victory\", \"ViCtoRy\", and \"VICTORY\" are all considered to be\n        the same.\n* path - The relative, or absolute, path to the file.\n   * This _must_ begin with \"./\" if the filesystem is set to \"jar\".\n   * This _must_ begin with \"./\" if the file is relative to the folder that the JAR is running from.\n* filesystem - Either \"local\" or \"jar\".\n\n```json\n[\n    {\n        \"type\": \"effect\",\n        \"name\": \"thunder 1\",\n        \"path\": \"./test_res/effect_1.mp3\",\n        \"filesystem\": \"local\"\n    },\n    {\n        \"type\": \"effect\",\n        \"name\": \"thunder 2\",\n        \"path\": \"./test_res/effect_2.mp3\",\n        \"filesystem\": \"local\"\n    },\n    {\n        \"type\": \"music\",\n        \"name\": \"victory\",\n        \"path\": \"./test_res/music_1.wav\",\n        \"filesystem\": \"local\"\n    }\n]\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalkryst%2Fv2daudio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalkryst%2Fv2daudio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalkryst%2Fv2daudio/lists"}