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

Two updates to improve performance #39

Closed regennz closed 9 years ago

regennz commented 9 years ago

Increased buffer size to prevent stuttering audio when used with a backgrounded app.

Changed inputUnit reference in dealloc since it was causing a crash

ap4y commented 9 years ago

Thanks for PR!

  1. I'm not against bumping buffer size, it should be ok for the modern devices. I will check on my old iPod just in case. I actually planned to make buffer size dynamic or configurable but didn't have much time to change it.
  2. It's quite strange that it causes crush, it can be a sign of over-release somewhere. I will check this with profiler.
regennz commented 9 years ago

Thanks. I realise that these seem like kludges instead of fixes. Appreciate you looking further into these. The background stuttering was happening for me with a high quality flac.

ap4y commented 9 years ago

@regennz I had the same issues on my iPhone 5 with 192/24 flacs, so I bumped buffer size in my local code. Unfortunately, it may increase pre-buffering time on older devices, so I started thinking about possibilities of adaptive buffer size.