Giter Club home page Giter Club logo

arduino-libopus's Introduction

The Opus Codec for Arduino

Opus is a codec for interactive speech and audio transmission over the Internet.

Opus can handle a wide range of interactive audio applications, including Voice over IP, videoconferencing, in-game chat, and even remote live music performances. It can scale from low bit-rate narrowband speech to very high quality stereo music.

Opus, when coupled with an appropriate container format, is also suitable for non-realtime stored-file applications such as music distribution, game soundtracks, portable music players, jukeboxes, and other applications that have historically used high latency formats such as MP3, AAC, or Vorbis.

                Opus is specified by IETF RFC 6716:
                https://tools.ietf.org/html/rfc6716

The Opus format and this implementation of it are subject to the royalty- free patent and copyright licenses specified in the file COPYING.

Opus packets are not self-delimiting, but are designed to be used inside a container of some sort which supplies the decoder with each packet's length. Opus was originally specified for encapsulation in Ogg containers.

This project contains

Installation in Arduino

You can download the library as zip and call include Library -> zip library. Or you can git clone this project into the Arduino libraries folder e.g. with

cd  ~/Documents/Arduino/libraries
git clone https://github.com/pschatzmann/arduino-libopus.git

Documentation

I recommend to use this library together with my Arduino Audio Tools. This is just one of many codecs that I have collected so far: Further details can be found in the Encoding and Decoding Wiki of the Audio Tools.

Design

In order to create an Arduino compatible library I executed the following steps:

  • Added the projects to the src directory
  • Symlinked the header files into src
  • Symlinked additional header subdirectories
  • Moved offending code which was platform specific or contained a main() to the /incompatible directory
  • Renamed all config.h to opus_config.h to avoid conflicts with the standard Arduino environment. I disabled the floating point api and activated the fixed point api instead!
  • Added a opus_config.h to the src directory
  • Replaced #ifdef HAVE_CONFIG_H with #if defined(HAVE_CONFIG_H) || defined(ARDUINO) to make sure the config is used
  • Added define guards to .c files in float and fixed directories to prevent compile errors
  • The functionality requires a big stack. Fortunately we can use a psydostack implementation with NONTHREADSAFE_PSEUDOSTACK you can fine tune the memory requirement by defining GLOBAL_STACK_SIZE. The default setting is 120000 which is too big for most microcontrollers!

arduino-libopus's People

Contributors

dholth avatar pschatzmann 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.