danomatika / ofxPd

(maintained) a Pure Data addon for OpenFrameworks using libpd
Other
202 stars 45 forks source link

Dynamically change ticksPerBuffer #27

Closed cerupcat closed 11 years ago

cerupcat commented 11 years ago

On iOS, the preferred/requested buffer size may not be the one the OS will use and other apps have the ability to change the size.

If PD's ticksPerBuffer is using the preferred size and not the actual, it'll cause a mismatch.

We need a way to update the ticksPerBuffer so that it matches the actual size the OS is using. I believe the ticksPerBuffer (on iOS at least) should always be sampleRate/actualBufferSize.

What's the easiest way to change the ticksPerBuffer size on the fly?

danomatika commented 11 years ago

I'm not sure. In the libpd docs it seems to suggest you set it once at the beginning and leave it, although you should be able top change it on the fly. Maybe ask on the CDM forum or on the libpd github issues?

cerupcat commented 11 years ago

Actually, with the latest version it seems fine to update it by reinitializing. So it's working as intended. Thanks!