{"id":13460136,"url":"https://github.com/mackron/miniaudio","last_synced_at":"2026-03-03T22:03:34.604Z","repository":{"id":37382502,"uuid":"71525630","full_name":"mackron/miniaudio","owner":"mackron","description":"Audio playback and capture library written in C, in a single source file.","archived":false,"fork":false,"pushed_at":"2026-02-21T20:45:50.000Z","size":335450,"stargazers_count":6363,"open_issues_count":4,"forks_count":527,"subscribers_count":95,"default_branch":"master","last_synced_at":"2026-02-22T01:24:13.544Z","etag":null,"topics":["android","audio","audio-library","bsd","capture","decoding","emscripten","flac","ios","linux","macos","mp3","osx","playback","public-domain","recording","vorbis","wasapi","wav","windows"],"latest_commit_sha":null,"homepage":"https://miniaud.io","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mackron.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"mackron"}},"created_at":"2016-10-21T03:17:26.000Z","updated_at":"2026-02-21T02:00:15.000Z","dependencies_parsed_at":"2023-10-20T21:25:20.930Z","dependency_job_id":"2130ad10-b5aa-4655-9814-bdbd06a27d2c","html_url":"https://github.com/mackron/miniaudio","commit_stats":{"total_commits":3405,"total_committers":54,"mean_commits":63.05555555555556,"dds":0.04052863436123344,"last_synced_commit":"3898fff8ed923e118326bf07822961d222cb2a9a"},"previous_names":["dr-soft/miniaudio"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/mackron/miniaudio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackron%2Fminiaudio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackron%2Fminiaudio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackron%2Fminiaudio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackron%2Fminiaudio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mackron","download_url":"https://codeload.github.com/mackron/miniaudio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackron%2Fminiaudio/sbom","scorecard":{"id":609700,"data":{"date":"2025-08-11","repo":{"name":"github.com/mackron/miniaudio","commit":"350784a9467a79d0fa65802132668e5afbcf3777"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":10,"reason":"0 commit(s) and 21 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: tests/android/MiniaudioTester/gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T02:20:33.149Z","repository_id":37382502,"created_at":"2025-08-21T02:20:33.149Z","updated_at":"2025-08-21T02:20:33.149Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30063372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["android","audio","audio-library","bsd","capture","decoding","emscripten","flac","ios","linux","macos","mp3","osx","playback","public-domain","recording","vorbis","wasapi","wav","windows"],"created_at":"2024-07-31T10:00:36.157Z","updated_at":"2026-03-03T22:03:34.584Z","avatar_url":"https://github.com/mackron.png","language":"C","funding_links":["https://github.com/sponsors/mackron"],"categories":["Audio","WELCOME","C","C/C++","语音识别与合成_其他","Libraries"],"sub_categories":["**Minilibx**","资源传输下载","C"],"readme":"\u003ch1 align=\"center\"\u003e\n    \u003ca href=\"https://miniaud.io\"\u003e\u003cimg src=\"https://miniaud.io/img/miniaudio_wide.png\" alt=\"miniaudio\" width=\"1280\"\u003e\u003c/a\u003e\n    \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003eAn audio playback and capture library in a single source file.\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://discord.gg/9vpqbjU\"\u003e\u003cimg src=\"https://img.shields.io/discord/712952679415939085?label=discord\u0026logo=discord\u0026style=flat-square\" alt=\"discord\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://x.com/mackron\"\u003e\u003cimg alt=\"x\" src=\"https://img.shields.io/twitter/url?url=https%3A%2F%2Fx.com%2Fmackron\u0026style=flat-square\u0026logo=x\u0026label=%40mackron\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e -\n    \u003ca href=\"#examples\"\u003eExamples\u003c/a\u003e -\n    \u003ca href=\"#building\"\u003eBuilding\u003c/a\u003e -\n    \u003ca href=\"#documentation\"\u003eDocumentation\u003c/a\u003e -\n    \u003ca href=\"#supported-platforms\"\u003eSupported Platforms\u003c/a\u003e -\n    \u003ca href=\"#security\"\u003eSecurity\u003c/a\u003e -\n    \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\nminiaudio is written in C with no dependencies except the standard library and should compile clean on all major\ncompilers without the need to install any additional development packages. All major desktop and mobile platforms\nare supported.\n\n\nFeatures\n========\n- Simple build system with no external dependencies.\n- Simple and flexible API.\n- Low-level API for direct access to raw audio data.\n- High-level API for sound management, mixing, effects and optional 3D spatialization.\n- Flexible node graph system for advanced mixing and effect processing.\n- Resource management for loading sound files.\n- Decoding, with built-in support for WAV, FLAC, and MP3, in addition to being able to plug in custom decoders.\n- Encoding (WAV only).\n- Data conversion.\n- Resampling, including custom resamplers.\n- Channel mapping.\n- Basic generation of waveforms and noise.\n- Basic effects and filters.\n\nRefer to the [Programming Manual](https://miniaud.io/docs/manual/) for a more complete description of\navailable features in miniaudio.\n\n\nExamples\n========\n\nThis example shows one way to play a sound using the high level API.\n\n```c\n#include \"miniaudio/miniaudio.h\"\n\n#include \u003cstdio.h\u003e\n\nint main()\n{\n    ma_result result;\n    ma_engine engine;\n\n    result = ma_engine_init(NULL, \u0026engine);\n    if (result != MA_SUCCESS) {\n        return -1;\n    }\n\n    ma_engine_play_sound(\u0026engine, \"sound.wav\", NULL);\n\n    printf(\"Press Enter to quit...\");\n    getchar();\n\n    ma_engine_uninit(\u0026engine);\n\n    return 0;\n}\n```\n\nThis example shows how to decode and play a sound using the low level API.\n\n```c\n#include \"miniaudio/miniaudio.h\"\n\n#include \u003cstdio.h\u003e\n\nvoid data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount)\n{\n    ma_decoder* pDecoder = (ma_decoder*)pDevice-\u003epUserData;\n    if (pDecoder == NULL) {\n        return;\n    }\n\n    ma_decoder_read_pcm_frames(pDecoder, pOutput, frameCount, NULL);\n\n    (void)pInput;\n}\n\nint main(int argc, char** argv)\n{\n    ma_result result;\n    ma_decoder decoder;\n    ma_device_config deviceConfig;\n    ma_device device;\n\n    if (argc \u003c 2) {\n        printf(\"No input file.\\n\");\n        return -1;\n    }\n\n    result = ma_decoder_init_file(argv[1], NULL, \u0026decoder);\n    if (result != MA_SUCCESS) {\n        return -2;\n    }\n\n    deviceConfig = ma_device_config_init(ma_device_type_playback);\n    deviceConfig.playback.format   = decoder.outputFormat;\n    deviceConfig.playback.channels = decoder.outputChannels;\n    deviceConfig.sampleRate        = decoder.outputSampleRate;\n    deviceConfig.dataCallback      = data_callback;\n    deviceConfig.pUserData         = \u0026decoder;\n\n    if (ma_device_init(NULL, \u0026deviceConfig, \u0026device) != MA_SUCCESS) {\n        printf(\"Failed to open playback device.\\n\");\n        ma_decoder_uninit(\u0026decoder);\n        return -3;\n    }\n\n    if (ma_device_start(\u0026device) != MA_SUCCESS) {\n        printf(\"Failed to start playback device.\\n\");\n        ma_device_uninit(\u0026device);\n        ma_decoder_uninit(\u0026decoder);\n        return -4;\n    }\n\n    printf(\"Press Enter to quit...\");\n    getchar();\n\n    ma_device_uninit(\u0026device);\n    ma_decoder_uninit(\u0026decoder);\n\n    return 0;\n}\n```\n\nMore examples can be found in the [examples](examples) folder or online here: https://miniaud.io/docs/examples/\n\n\nBuilding\n========\nJust compile miniaudio.c like any other source file and include miniaudio.h like a normal header. There's no need\nto install any dependencies. On Windows and macOS there's no need to link to anything. On Linux and BSD just link\nto `-lpthread` and `-lm`. On iOS you need to compile as Objective-C. Link to `-ldl` if you get errors about\n`dlopen()`, etc.\n\nIf you get errors about undefined references to `__sync_val_compare_and_swap_8`, `__atomic_load_8`, etc. you\nneed to link with `-latomic`.\n\nABI compatibility is not guaranteed between versions so take care if compiling as a DLL/SO. The suggested way\nto integrate miniaudio is by adding it directly to your source tree.\n\nYou can also use CMake if that's your preference.\n\n\nDocumentation\n=============\nOnline documentation can be found here: https://miniaud.io/docs/\n\nDocumentation can also be found at the top of [miniaudio.h](https://raw.githubusercontent.com/mackron/miniaudio/master/miniaudio.h)\nwhich is always the most up-to-date and authoritative source of information on how to use miniaudio. All other\ndocumentation is generated from this in-code documentation.\n\n\nSupported Platforms\n===================\n- Windows\n- macOS, iOS\n- Linux\n- FreeBSD / OpenBSD / NetBSD\n- Android\n- Raspberry Pi\n- Emscripten / HTML5\n\nminiaudio should compile clean on other platforms, but it will not include any support for playback or capture\nby default. To support that, you would need to implement a custom backend. You can do this without needing to\nmodify the miniaudio source code. See the [custom_backend](examples/custom_backend.c) example.\n\nBackends\n--------\n- WASAPI\n- DirectSound\n- WinMM\n- Core Audio (Apple)\n- ALSA\n- PulseAudio\n- JACK\n- sndio (OpenBSD)\n- audio(4) (NetBSD and OpenBSD)\n- OSS (FreeBSD)\n- AAudio (Android 8.0+)\n- OpenSL|ES (Android only)\n- Web Audio (Emscripten)\n- Null (Silence)\n- Custom\n\n\nSecurity\n========\nSee the miniaudio [security policy](.github/SECURITY.md).\n\n\nLicense\n=======\nYour choice of either public domain or [MIT No Attribution](https://github.com/aws/mit-0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmackron%2Fminiaudio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmackron%2Fminiaudio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmackron%2Fminiaudio/lists"}