ap4y / OrigamiEngine

Lightweight audio engine for iOS and OSX with flac, cue, mp3, m4a, m3u support.
http://ap4y.github.com/OrigamiEngine/
MIT License
545 stars 118 forks source link

Cache time for streaming audio? And where i can implement Audio Units for example iPodEQ? #20

Closed dubenko closed 10 years ago

dubenko commented 10 years ago

Hello man, nice library, but how i can get cache time for streaming audio or mb present value of cached time? And second, where i can implement Audio Units for example iPodEQ or Reverb2? Sorry for my broken english and thanks for this library!

ap4y commented 10 years ago

Hey, sorry for the late response.

Regarding the caching. Right now there is no dedicated caching policy, you can think about current caches as temporary files. Since it's impossible to download large files (like FLAC) into memory and I didn't want to block HTTP connection, I'm storing downloaded files into application cache folder(NSCachesDirectory). So OS will manage this caches for us, it will be cleaned once system requires resources, this process is totally nondeterministic. If you want to implement dedicated caching strategy I recommend to take a look into NSURLCache.

About nodes and constructing graphs. I just pushed small change in b943430, which adds new method- (void)playUrl:(NSURL *)url withOutputUnitClass:(Class)outputUnitClass. You can subclass ORGMOutputUnit, define your graph there. Example implementation can be found in ORGMOutputUnit.m (which is default output right now), it is basically simple OutputUnit for Remote I/O node.

ap4y commented 10 years ago

I'm closing this issue, feel free to reopen it if you have questions.