{"id":15047557,"url":"https://github.com/nativeinstruments/ni-media","last_synced_at":"2025-04-06T02:12:47.320Z","repository":{"id":26019139,"uuid":"107114418","full_name":"NativeInstruments/ni-media","owner":"NativeInstruments","description":"NI Media is a C++ library for reading and writing audio streams.","archived":false,"fork":false,"pushed_at":"2024-08-21T09:22:33.000Z","size":32074,"stargazers_count":249,"open_issues_count":15,"forks_count":35,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-04-06T02:12:33.646Z","etag":null,"topics":["aiff","audio","cpp","cpp14","flac","m4a","mp3","mp4","music","ogg","ogg-flac","ogg-vorbis","pcm","sound","streams","wav"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NativeInstruments.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-16T10:44:07.000Z","updated_at":"2025-02-03T13:59:02.000Z","dependencies_parsed_at":"2024-04-30T14:35:26.629Z","dependency_job_id":"b81f3168-c430-4e89-af0a-491bb70269fe","html_url":"https://github.com/NativeInstruments/ni-media","commit_stats":{"total_commits":121,"total_committers":20,"mean_commits":6.05,"dds":0.7520661157024793,"last_synced_commit":"e3074cac962ad320495cdeaf1ddd36aa6e8f3500"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeInstruments%2Fni-media","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeInstruments%2Fni-media/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeInstruments%2Fni-media/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeInstruments%2Fni-media/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NativeInstruments","download_url":"https://codeload.github.com/NativeInstruments/ni-media/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423518,"owners_count":20936626,"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":["aiff","audio","cpp","cpp14","flac","m4a","mp3","mp4","music","ogg","ogg-flac","ogg-vorbis","pcm","sound","streams","wav"],"created_at":"2024-09-24T21:00:17.522Z","updated_at":"2025-04-06T02:12:47.299Z","avatar_url":"https://github.com/NativeInstruments.png","language":"C++","readme":"# NI MEDIA [![ni-media CI](https://github.com/NativeInstruments/ni-media/actions/workflows/ci.yml/badge.svg)](https://github.com/NativeInstruments/ni-media/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/NativeInstruments/ni-media/branch/master/graph/badge.svg)](https://codecov.io/gh/NativeInstruments/ni-media)\n\nNI Media is a library for reading from / writing to audio streams developed at [Native Instruments](https://www.native-instruments.com).\n\n## Motivation\n\nThe goal is to have a modern C++ library for dealing with audio streams in an idiomatic C++ style.\n\nModern:\n- a clear separation of concerns (modular instead of fat classes)\n- support for ranges and iterators\n\nIdiomatic:\n- based on std.streams.\n- integrates well with STL algorithms and boost\n\n\nThe following example demonstrates how to stream an entire audio file into a vector:\n\n```cpp\n#include \u003cni/media/audio/ifstream.h\u003e\n#include \u003cvector\u003e\n\nint main()\n{\n    auto stream = audio::ifstream(\"hello.wav\");\n    auto samples = std::vector\u003cfloat\u003e(stream.info().num_samples());\n    stream \u003e\u003e samples;\n    // use samples\n}\n```\n\n## Components\n\n - [audiostream](audiostream/README.md):  the main library for reading from / writing to audio streams.\n - [pcm](pcm/README.md): a small library to convert [pcm](https://en.wikipedia.org/wiki/Pulse-code_modulation)\n   data from / to [arithmetic](http://en.cppreference.com/w/cpp/language/types) types.\n\n\n## Dependencies\n\n* [boost](https://github.com/boostorg/boost) ( algorithm, endian, filesystem, format, icl, iostream, local, math, program-option, regex, system)\n* [flac](https://github.com/xiph/flac) \u0026 [ogg](https://github.com/xiph/ogg), for  flac support (CMake option `NIMEDIA_ENABLE_FLAC_DECODING`)\n* [vorbis](https://github.com/xiph/vorbis) \u0026 [ogg](https://github.com/xiph/ogg), for ogg vorbis support (CMake option  `NIMEDIA_ENABLE_OGG_DECODING`)\n* [googletest](https://github.com/google/googletest) for building the tests (CMake option `NIMEDIA_TESTS`)\n\n## Platforms\n\nni-media requires a c++14 compliant compiler and is currently supported and tested on these platforms: \n\n* Windows ( requires Visual Studio 2015 Update 3  or higher )\n* Mac OS X ( requires Xcode / Clang 7.3 or higher )\n* iOS ( requires Xcode / Clang 7.3 or higher )\n* Linux ( requires GCC 5.0 or higher, Clang 7.3 or higher should also work )\n\n\n## Building\n\nFirst, build and install boost `filesystem`, `iostream`, `system` and `program-option` to `path/to/dependencies`. Optionally install any codecs that you want to use, for example [flac](https://github.com/xiph/flac) and [ogg-vorbis](https://github.com/xiph/vorbis).\nNow configure ni-media with [CMake](https://cmake.org/) (version 3.16.0 or higher is required)\n\n```\ncmake -G YOUR-PROJECT-GENERATOR -DCMAKE_PREFIX_PATH=path/to/dependencies/ path/to/ni-media\n```\n\nSpecific codecs can be enabled / disabled by passing additional CMake [options](audiostream/doc/ifstream.md).\n\nWe can now build ni-media:\n```\ncmake --build . \n```\n\n## Testing\n\n[googletest](https://github.com/google/googletest) is required for testing and needs to be installed to `path/to/dependencies`. The unit tests can be enabled with CMake option `NIMEDIA_TESTS`.\n\n```\ncmake -G YOUR-PROJECT-GENERATOR -DCMAKE_PREFIX_PATH=path/to/dependencies/ -DNIMEDIA_TESTS=ON path/to/ni-media\n```\n\nTo execute the tests run:\n```\ncmake --build . --target test\n```\n\n## Contributions\n\nWe very much appreciate your contribution! If you want to contribute please get in touch with the maintainers:\n\n* [Marc Boucek](https://github.com/marcrambo) \n* [Nathan Kozlowski](https://github.com/FalconPDX)\n* [Moritz Heppner](https://github.com/ni-mheppner)\n* [Tim Smit](https://github.com/ni-tsmit)\n\nPlease run [clang-format](https://clang.llvm.org/docs/ClangFormat.html) with the provided .clang-format file and if possible add some tests when opening a pull request.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativeinstruments%2Fni-media","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnativeinstruments%2Fni-media","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativeinstruments%2Fni-media/lists"}