Giter Site home page Giter Site logo

liufeigit / origamiengine Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ap4y/origamiengine

0.0 2.0 0.0 1.51 MB

Lightweight audio engine for iOS and OSX with flac, cue, mp3, m4a, m3u support.

Home Page: http://ap4y.github.com/OrigamiEngine/

License: MIT License

Objective-C 98.49% Ruby 1.51%

origamiengine's Introduction

Lightweight iOS and OSX audio engine with opus, flac, cue, mp3, m4a, m3u support.

Supported formats

  • Audio sources: http and local files
  • Audio files: opus, flac, mp3, m4a, wav and other from CoreAudio
  • Playlists: cue, m3u

Features

  • Ligthweight: 300kb compiled, 1.2mb with libFLAC
  • Small memory foorprint: no more than 2.5mb for the flac files
  • Low resource consumption: about 14% CPU usage for FLAC on ipod 4g
  • All operations in background with GCD
  • Event-based (using dispatch sources and CoreAudio async api)
  • Provides full audio metadata (vorbis, id3 tags) with embeeded cover images
  • HTTP data caching
  • Tested (currently about 85% code coverage)

Overview

Static library and cocoapods podspec provided. Static library can be compiled with embeeded FLAC library (check project targets). For OSX you can use static framework.

Start playback:

self.player = [[ORGMEngine alloc] init];
NSURL* url = [NSURL URLWithString:tfUrl.text];
[_player playUrl:url];

Common operations:

[_player metadata];                         // current metadata
[_player pause];                            // pause playback
[_player resume];                           // resume playback
[_player stop];                             // stop playback
[_player seekToTime:seekSlider.value];      // seek to second
[_player setNextUrl:url withDataFlush:YES]; // play next track and clear current buffer

Delegate methods:

- (NSURL*)engineExpectsNextUrl:(ORGMEngine*)engine; // provides continious playback
- (void)engine:(ORGMEngine*)engine didChangeState:(ORGMEngineState)state; // state change callback

Check example project and tests for the additional information.

Documentation

Project headers contain appledoc comments, precompiled docset here.

Tests

OCUnit tests included into the project.

Credits

  • http://cogx.org/ by Vincent Spader. FLAC decoder implementation based on Cog sources

License

(MIT license)

origamiengine's People

Contributors

ap4y avatar blnked avatar regennz avatar siuying avatar

Watchers

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