trimmed SDL buffer size to get better latency
added check for looping to avoid accidentally stopping a sound that happens to have size aligned to the buffer size