Convert to static library.
Fix resampling algorithm.