{"id":21187862,"url":"https://github.com/lukasbanana/acousticslib","last_synced_at":"2025-07-10T02:31:15.677Z","repository":{"id":41153171,"uuid":"63451890","full_name":"LukasBanana/AcousticsLib","owner":"LukasBanana","description":"Simple Cross Platform Audio Library","archived":false,"fork":false,"pushed_at":"2022-10-01T20:13:12.000Z","size":2497,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-02-26T03:55:55.866Z","etag":null,"topics":["audio","ogg","ogg-vorbis","openal","sound","xaudio2"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LukasBanana.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-15T21:27:00.000Z","updated_at":"2022-11-16T03:47:22.000Z","dependencies_parsed_at":"2023-01-19T01:45:15.481Z","dependency_job_id":null,"html_url":"https://github.com/LukasBanana/AcousticsLib","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukasBanana%2FAcousticsLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukasBanana%2FAcousticsLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukasBanana%2FAcousticsLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukasBanana%2FAcousticsLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LukasBanana","download_url":"https://codeload.github.com/LukasBanana/AcousticsLib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225612158,"owners_count":17496587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","ogg","ogg-vorbis","openal","sound","xaudio2"],"created_at":"2024-11-20T18:41:28.166Z","updated_at":"2024-11-20T18:41:28.683Z","avatar_url":"https://github.com/LukasBanana.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"AcousticsLib\n============\n\nThis project provides a simple and cross-platform audio library for modern C++11.\n\n\nOverview\n--------\n\n- **Version**: 1.00 Alpha\n- **License**: [3-Clause BSD License](https://github.com/LukasBanana/AcousticsLib/blob/master/LICENSE.txt)\n- **Documentation**: [AcousticsLib Docu.pdf](https://github.com/LukasBanana/AcousticsLib/blob/master/docu/AcousticsLib%20Docu.pdf)\n\n\nDependencies\n------------\n\nUsing this library requires the [GaussianLib](https://github.com/LukasBanana/GaussianLib)\n\nBuilding this library requires the [OpenAL SDK](http://openal.org/), and optionally the [Ogg-Vorbis](http://www.vorbis.com/) libraries\n\n\nSupported Platforms\n-------------------\n\n| Platform | OpenAL | XAudio2 |\n|----------|:------:|:-------:|\n| **Windows Vista/ 7/ 8/ 10** | :heavy_check_mark: | :heavy_check_mark: |\n| **Mac OS X** | :heavy_check_mark: | N/A |\n| **Linux** | :heavy_check_mark: | N/A |\n\n\nSupported File Formats\n----------------------\n\n| Format | File Extensions | Read Support | Write Support |\n|--------|---------|:------------:|:-------------:|\n| Waveform Audio File Format | **WAV** | :heavy_check_mark: | :heavy_check_mark: |\n| Audio Interchange File Format | **AIFF**, **AIFC** | :heavy_check_mark: | :heavy_multiplication_x: |\n| Ogg-Vorbis | **OGG** | :heavy_check_mark: | :heavy_multiplication_x: |\n\n\nAudio Engines\n-------------\n\n- **OpenAL** *(in progress)*\n\n\nGetting Started\n---------------\n\nPlay a sound with less code as possible:\n\n```cpp\n#include \u003cAc/AcLib.h\u003e\n\nint main()\n{\n    // Load default audio system module\n    auto audioSystem = Ac::AudioSystem::Load();\n\n    // Play sound with 100% volume\n    audioSystem-\u003ePlay(\"mySound.wav\");\n\n    // Wait for user input\n    int i = 0;\n    std::cin \u003e\u003e i;\n\n    return 0;\n}\n```\n\nPlay a sound by choosing a module:\n\n```cpp\n#include \u003cAc/AcLib.h\u003e\n#include \u003ciostream\u003e\n#include \u003cthread\u003e\n#include \u003cchrono\u003e\n\nint main()\n{\n    // If an audio system is not available, dynamically catch the\n    // exception an load another audio system, e.g. when \"XAudio2\"\n    // is not available due to a missing DirectX version on a Windows platform.\n    for (auto module : Ac::AudioSystem::FindModules())\n    {\n        try\n        {\n            // Load audio system from shared library\n            auto audioSystem = Ac::AudioSystem::Load(module);\n\n            std::cout\n                \u003c\u003c \"Audio System: \\\" \u003c\u003c audioSystem-\u003eGetName() \u003c\u003c \"\\\"\"\n                \u003c\u003c \", Version: \" \u003c\u003c audioSystem-\u003eGetVersion() \u003c\u003c\n            std::endl;\n\n            if (auto sound = audioSystem-\u003eLoadSound(\"mySound.wav\"))\n            {\n                sound-\u003eSetVolume(0.5f); // set volume to 50%\n                sound-\u003eSetPitch(1.5f);  // play with 1.5x frequency (or speed)\n                sound-\u003ePlay();          // play sound\n\n                while (sound-\u003eIsPlaying())\n                {\n                    // Wait while sound is playing and show current seek position (in seconds)\n                    std::cout \u003c\u003c \"Playing: \" \u003c\u003c sound-\u003eGetSeek() \u003c\u003c std::end;\n\n                    // Wait a moment\n                    std::this_thread::sleep_for(std::chrono::milliseconds(100));\n                }\n            }\n\n            // Break out from loop, we only need one single audio system\n            break;\n        }\n        catch (const std::exception\u0026 e)\n        {\n            std::cerr \u003c\u003c e.what() \u003c\u003c std::endl;\n        }\n    }\n    return 0;\n}\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukasbanana%2Facousticslib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukasbanana%2Facousticslib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukasbanana%2Facousticslib/lists"}