Code Monkey home page Code Monkey logo

oswrapper's Introduction

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.

oswrapper's People

Contributors

nerdthened avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.