A bit of progress. I think the sample loader is mostly done for now. Now it handles errors correctly and loads samples in chunks to avoid hanging the UI for long samples, displaying a % indicator as it goes. This is quite important on device, as there it can take a lot longer to load larger samples.
Should probably set a smaller limit on the sample size for this (at the moment 8MB of F32 mono sample data).