日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

[翻译] OrigamiEngine

發(fā)布時間:2025/5/22 编程问答 24 豆豆
生活随笔 收集整理的這篇文章主要介紹了 [翻译] OrigamiEngine 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

OrigamiEngine

https://github.com/ap4y/OrigamiEngine

?

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

輕量級iOS,OSX音頻處理工具,支持opus, flac, cue, mp3, m4a, m3u

?

Supported formats

  • Audio sources: http and local files?支持http方式以及本地文件方式
  • Audio files:?opus,?flac,?mp3,?m4a,?wav?and other from CoreAudio?支持的文件格式包括opus,?flac,?mp3,?m4a,?wav以及其他CoreAudio支持的類型
  • Playlists:?cue,?m3u?支持播放列表

?

Features

  • Ligthweight: 300kb compiled, 1.2mb with libFLAC?輕量級:編譯后是300kb,鏈接到libFLAC后是1.2mb
  • Small memory foorprint: no more than 2.5mb for the flac files?占用內存小:flac文件不會超過2.5mb
  • Low resource consumption: about 14% CPU usage for FLAC on ipod 4g?低資源消耗:在ipod 4g上只用到了14%的CPU
  • All operations in background with GCD?所有后臺操作基于GCD
  • Event-based (using dispatch sources and CoreAudio async api)?事件觸發(fā)機制(使用了dispatch source以及CoreAudio 異步的api)
  • Provides full audio metadata (vorbis, id3 tags) with embeeded cover images?提供全部的音頻元數(shù)據(jù)包括嵌入的圖片資源
  • HTTP data caching?HTTP數(shù)據(jù)緩存
  • Tested (currently about 85% code coverage)?已經(jīng)測試過了(當前超過85%已經(jīng)測試過)

?

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.

提供靜態(tài)庫或者cocoapods.靜態(tài)庫可用來編譯嵌入FLAC的庫,在OSX上,你可以使用靜態(tài)庫.

?

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.

工程頭文件件中包含了appledoc的描述.

?

Tests

OCUnit?tests included into the project.

?

Credits

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

總結

以上是生活随笔為你收集整理的[翻译] OrigamiEngine的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內容還不錯,歡迎將生活随笔推薦給好友。