Improved the resampler and the sound system (it can play loops). Added defines file for portability.