ByteStreams.copy(reader, bos);
ByteBuffer data = BufferUtils.createByteBuffer(bos.size()).put(bos.toByteArray());
data.flip();
return new StaticSoundData(data, reader.getChannels(), reader.getRate(), 16);
} catch (IOException e) {
throw new IOException("Failed to load sound: " + e.getMessage(), e);
}
}