Skip to content

Single-header file C libraries for wrapping OS-specific functionality. Compatible with C++.

License

Notifications You must be signed in to change notification settings

NeRdTheNed/OSWrapper

Repository files navigation

OSWrapper

Single-header file libraries to wrap OS-specific functionality.

Build

Library Description Platform implementations
oswrapper_image.h Image decoder using OS libraries macOS, Windows (Vista and higher), Emscripten
oswrapper_audio.h Audio decoder using OS libraries macOS (10.4 and higher), Windows (7 and higher)
oswrapper_audio_enc.h Audio encoder using OS libraries macOS (10.4 and higher), Windows (7 and higher)

Usage

These libraries are single-header file libraries. Include them in exactly one C or C++ file as such:

#define OSWRAPPER_LIBRARYNAME_IMPLEMENTATION
#include "oswrapper_libraryname.h"

Replace libraryname with the name of the library.

Unlike standard single-header file libraries, you'll generally need to link against a system library to use these libraries, or perform some platform-specific initialisation action before using them. Here's the requirements:

Library macOS Windows Emscripten
oswrapper_image.h Link with -framework AppKit Initialise the COM library, link with windowscodecs.lib Compile with Asyncify
oswrapper_audio.h Link with -framework AudioToolbox Initialise the COM library, link with mfplat.lib, mfreadwrite.lib, and shlwapi.lib N/A
oswrapper_audio_enc.h Link with -framework AudioToolbox Initialise the COM library, link with mf.lib, mfplat.lib, mfreadwrite.lib, and shlwapi.lib N/A

Full examples of linking and using OSWrapper libraries can be found in the test folder.

Future work

  • Emscripten audio decoding
  • Haiku support
  • SerenityOS support

Issues and PRs are welcome.

License

All OSWrapper libraries and test / demo applications are licensed under the BSD Zero Clause License.

About

Single-header file C libraries for wrapping OS-specific functionality. Compatible with C++.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy