{"id":20733191,"url":"https://github.com/ozguronsoy/hephaudio","last_synced_at":"2026-02-17T01:33:08.750Z","repository":{"id":65615873,"uuid":"407630417","full_name":"ozguronsoy/HephAudio","owner":"ozguronsoy","description":"A cross-platform C++ library for recording, playing, and processing audio.","archived":false,"fork":false,"pushed_at":"2025-01-03T16:26:42.000Z","size":177852,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T22:55:21.780Z","etag":null,"topics":["3d-audio","aaudio","alsa","audio","audio-library","audio-processing","c-plus-plus","coreaudio","cross-platform","directsound","ffmpeg","opensl-es","spatial-audio","wasapi"],"latest_commit_sha":null,"homepage":"https://ozguronsoy.github.io/HephAudio/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ozguronsoy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2021-09-17T17:41:57.000Z","updated_at":"2025-01-21T20:36:43.000Z","dependencies_parsed_at":"2024-03-14T12:01:59.635Z","dependency_job_id":"2679ba36-8a35-4cac-9150-bcaf484eb756","html_url":"https://github.com/ozguronsoy/HephAudio","commit_stats":null,"previous_names":["ozguronsoy/hephaudio"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ozguronsoy/HephAudio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozguronsoy%2FHephAudio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozguronsoy%2FHephAudio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozguronsoy%2FHephAudio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozguronsoy%2FHephAudio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozguronsoy","download_url":"https://codeload.github.com/ozguronsoy/HephAudio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozguronsoy%2FHephAudio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29529445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T00:57:22.232Z","status":"ssl_error","status_checked_at":"2026-02-17T00:54:25.811Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["3d-audio","aaudio","alsa","audio","audio-library","audio-processing","c-plus-plus","coreaudio","cross-platform","directsound","ffmpeg","opensl-es","spatial-audio","wasapi"],"created_at":"2024-11-17T05:24:00.766Z","updated_at":"2026-02-17T01:33:08.723Z","avatar_url":"https://github.com/ozguronsoy.png","language":"C++","readme":"# HephAudio [![Static Badge](https://img.shields.io/badge/License-LGPL%20v2.1-blue)](https://github.com/ozguronsoy/HephAudio/blob/master/LICENSE.md) [![GitHub Release](https://img.shields.io/github/v/release/ozguronsoy/HephAudio)](https://github.com/ozguronsoy/HephAudio/releases/)\n\n[![GitHub Pages](https://github.com/ozguronsoy/HephAudio/actions/workflows/github_pages.yml/badge.svg)](https://github.com/ozguronsoy/HephAudio/actions/workflows/github_pages.yml)\n[![Build Windows](https://github.com/ozguronsoy/HephAudio/actions/workflows/build_windows.yml/badge.svg)](https://github.com/ozguronsoy/HephAudio/actions/workflows/build_windows.yml)\n[![Build Linux](https://github.com/ozguronsoy/HephAudio/actions/workflows/build_linux.yml/badge.svg)](https://github.com/ozguronsoy/HephAudio/actions/workflows/build_linux.yml)\n[![Build Android](https://github.com/ozguronsoy/HephAudio/actions/workflows/build_android.yml/badge.svg)](https://github.com/ozguronsoy/HephAudio/actions/workflows/build_android.yml)\n\n- [Setup](#setup)\u003cbr\u003e\n\t- [Install Dependencies](#install-dependencies)\u003cbr\u003e\n\t- [CMake](#cmake)\u003cbr\u003e\n\t- [Visual Studio](#visual-studio)\u003cbr\u003e\n- Getting Started\u003cbr\u003e\n\t- [Playing Files](https://github.com/ozguronsoy/HephAudio/tree/master/docs/examples/PlayingFiles.md)\u003cbr\u003e\n\t- [Recording](https://github.com/ozguronsoy/HephAudio/tree/master/docs/examples/Recording.md)\u003cbr\u003e\n\t- [Device Enumeration](https://github.com/ozguronsoy/HephAudio/tree/master/docs/examples/DeviceEnumeration.md)\u003cbr\u003e\n\t- [Audio Effects](https://github.com/ozguronsoy/HephAudio/tree/master/docs/examples/Effects.md)\u003cbr\u003e\n\t- [Handling Exceptions](https://github.com/ozguronsoy/HephAudio/tree/master/docs/examples/HandlingExceptions.md)\u003cbr\u003e\n- [Documentation](https://ozguronsoy.github.io/HephAudio/)\u003cbr\u003e\n- [Examples](https://github.com/ozguronsoy/HephAudio/tree/master/docs/examples)\u003cbr\u003e\n\n## Introduction\nHephAudio is a cross-platform audio library that provides:\u003cbr\u003e\n- Playing and recording audio in Windows, Linux, Android, iOS, and macOS.\u003cbr\u003e\n- Audio device enumeration and selection.\u003cbr\u003e\n- Encoding, decoding, and transcoding audio files via [FFmpeg](https://ffmpeg.org/).\u003cbr\u003e\n- FFT for frequency analysis of the audio signals.\u003cbr\u003e\n- Spatialization via HRTF.\u003cbr\u003e\n- Easy to use sound effects and filters.\u003cbr\u003e\n\n## Setup\n\n### Install Dependencies\n\n- Install [CMake](https://cmake.org/download/) 3.28.0 or higher.\u003cbr\u003e\n- Install ALSA development library for **Linux**.\u003cbr\u003e\n- build FFmpeg and libmysofa for **macOS** and **iOS**.\u003cbr\u003e\n\n\n### CMake\n\n#### Create Shared/Static Library\n1) Clone the repo.\u003cbr\u003e\n2) Run one of the following commands:\n\t- to create **shared** library: ``cmake -DENABLE_SHARED=On -DCMAKE_CXX_FLAGS='-DHEPHAUDIO_INFO_LOGGING' .``\u003cbr\u003e\n\t- to create **static** library: ``cmake -DENABLE_STATIC=On -DCMAKE_CXX_FLAGS='-DHEPHAUDIO_INFO_LOGGING' .``\u003cbr\u003e\n3) Run ``cmake --build .`` then ``cmake --install .``\u003cbr\u003e\n4) Create a folder at your project's root and name it ``HephAudio`` (/project_root/HephAudio).\u003cbr\u003e\n5) Copy the contents of the ``build`` folder to ``/project_root/HephAudio``.\u003cbr\u003e\n6) Create a ``CMakeLists.txt`` file at your project's root folder and build it.\u003cbr\u003e\n\nAn example cmake file:\n```\ncmake_minimum_required(VERSION 3.28)\n\n# your project name\nproject(\"my_application\")\n\nset(HEPHAUDIO_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/HephAudio)\n\nif ((NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY) OR (CMAKE_RUNTIME_OUTPUT_DIRECTORY STREQUAL \"\"))\n    set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build)\nendif()\n\nadd_definitions(-DHEPH_SHARED_LIB)\n\ninclude_directories(\n    ${HEPHAUDIO_DIRECTORY}/include/ffmpeg/\n    ${HEPHAUDIO_DIRECTORY}/include/libmysofa/\n    ${HEPHAUDIO_DIRECTORY}/include/HephCommon/\n    ${HEPHAUDIO_DIRECTORY}/include/HephAudio/\n)\n\nadd_executable(\n    ${CMAKE_PROJECT_NAME}\n    main.cpp\n)\n\nif (CMAKE_SYSTEM_NAME STREQUAL \"Windows\")\n\n    target_link_libraries(\n        ${CMAKE_PROJECT_NAME}\n\n        ${HEPHAUDIO_DIRECTORY}/lib/ffmpeg/avcodec.lib\n        ${HEPHAUDIO_DIRECTORY}/lib/ffmpeg/avdevice.lib\n        ${HEPHAUDIO_DIRECTORY}/lib/ffmpeg/avfilter.lib\n        ${HEPHAUDIO_DIRECTORY}/lib/ffmpeg/avformat.lib\n        ${HEPHAUDIO_DIRECTORY}/lib/ffmpeg/avutil.lib\n        ${HEPHAUDIO_DIRECTORY}/lib/ffmpeg/swresample.lib\n        ${HEPHAUDIO_DIRECTORY}/lib/ffmpeg/swscale.lib\n\n        ${HEPHAUDIO_DIRECTORY}/lib/libmysofa/zlib.lib\n        ${HEPHAUDIO_DIRECTORY}/lib/libmysofa/mysofa.lib\n\n        ${HEPHAUDIO_DIRECTORY}/lib/HephAudio.lib\n    )\n\n    # copy the DLL files so they will be in the same folder with the executable.\n    install(\n        DIRECTORY ${HEPHAUDIO_DIRECTORY}/\n        DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}\n        FILES_MATCHING\n        PATTERN \"*.dll\"\n        PATTERN \"include\" EXCLUDE\n        PATTERN \"lib\" EXCLUDE\n    )\n\nelse ()\n\n    target_link_libraries(\n        ${CMAKE_PROJECT_NAME}\n\n        ${HEPHAUDIO_DIRECTORY}/lib/ffmpeg/libavcodec.so\n        ${HEPHAUDIO_DIRECTORY}/lib/ffmpeg/libavdevice.so\n        ${HEPHAUDIO_DIRECTORY}/lib/ffmpeg/libavfilter.so\n        ${HEPHAUDIO_DIRECTORY}/lib/ffmpeg/libavformat.so\n        ${HEPHAUDIO_DIRECTORY}/lib/ffmpeg/libavutil.so\n        ${HEPHAUDIO_DIRECTORY}/lib/ffmpeg/libswresample.so\n        ${HEPHAUDIO_DIRECTORY}/lib/ffmpeg/libswscale.so\n\n        ${HEPHAUDIO_DIRECTORY}/lib/libmysofa/libmysofa.so\n\n        ${HEPHAUDIO_DIRECTORY}/lib/libHephAudio.so\n    )\n\nendif()\n```\n\n\n#### Use Directly\n1) Create a folder at your project's root and name it ``HephAudio`` (/project_root/HephAudio).\u003cbr\u003e\n2) Copy the repo to the folder you created.\u003cbr\u003e\n3) **(WINDOWS ONLY)** Copy the required dll files from the dependencies to the build output folder.\n4) Create a ``CMakeLists.txt`` file at your project's root folder and build it.\u003cbr\u003e\n\nAn example cmake file:\n\n```\ncmake_minimum_required(VERSION 3.28)\n\n# your project name\nproject(\"my_application\")\n\n# execute the HephAudio/CMakeLists.txt file\ninclude(${CMAKE_CURRENT_SOURCE_DIR}/HephAudio/CMakeLists.txt)\n\nadd_executable(\n    ${CMAKE_PROJECT_NAME}\n    ${HEPHAUDIO_SRC}\n    # your files\n    main.cpp\n)\n\ntarget_link_libraries(\n    ${CMAKE_PROJECT_NAME}\n    ${HEPHAUDIO_LINK_LIBS}\n    # your libs\n)\n\n# extra definitions\nadd_definitions(-DHEPHAUDIO_INFO_LOGGING)\n```\n\n\u003cbr\u003e\u003cbr\u003e\n\n### Visual Studio\n1) Create a folder at your project's root and name it ``HephAudio`` (/project_root/HephAudio).\u003cbr\u003e\n2) Copy the repo to the folder you created.\u003cbr\u003e\n3) Right click to your project, go to ``Configuration Properties -\u003e C/C++ -\u003e General -\u003e Additional Including Directories`` and add the locations of the ``HephCommon/HeaderFiles``, ``HephAudio/HeaderFiles``, ``dependencies/ffmpeg/include``, and ``dependencies/libmysofa/include``.\u003cbr\u003e\n4) Now right click the solution and go to ``Add -\u003e Existing Project``, under the HephCommon folder select ``HephCommon.vcxitems`` to add to your project. Repeat the same process for HephAudio.\u003cbr\u003e\n5) Right click to your project, ``Add -\u003e Reference -\u003e Shared Projects`` and check both HephAudio and HephCommon.\u003cbr\u003e\n6) Right click to your project, go to ``Configuration Properties -\u003e Linker -\u003e General -\u003e Additional Library Directories`` and add ``path_to_hephaudio/dependencies``.\u003cbr\u003e\n7) Copy the required dll files from the dependencies to the build output folder.\u003cbr\u003e\n8) Visual studio marks some of the standard C functions as unsafe and prevents from compiling by throwing errors. To fix this, right click to your project and go to ``Configuration Properties -\u003e C/C++ -\u003e Preprocessor -\u003e Preprocessor Definitions`` and add ``_CRT_SECURE_NO_WARNINGS``.\u003cbr\u003e\n9) If you are creating a DLL, add ``HEPH_EXPORTS`` and ``HEPH_SHARED_LIB`` preprocessor definitions.\n\n\u003e [!NOTE]\n\u003e Don't define ``HEPH_EXPORTS`` when using the DLL.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozguronsoy%2Fhephaudio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozguronsoy%2Fhephaudio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozguronsoy%2Fhephaudio/lists"}