fix segfault when playing trimmed samples