admsyn / ofxAudioUnit

An openFrameworks addon which makes it easy to work with Audio Units on OSX and iOS
MIT License
120 stars 24 forks source link

calling play() is slow #32

Open stephanschulz opened 6 years ago

stephanschulz commented 6 years ago

I have 700 audio files that I manually loop by checking their playhead position against their duration. In previous versions on an older system this worked fine. But on OSX 10.12 with OF 0.10. this slowed my app down to 1fps.

So I made a custom resetToStart() function that basically does the same as play() but does not all of the priming.

https://github.com/antimodular/ofxAudioUnit/blob/b09d380ce3396c38aa700e4d5ca2ef7c112bc15b/src/ofxAudioUnitFilePlayer.cpp#L267-L293

dimitre commented 6 years ago

are you compiling ok for 0.10 ?