errorCheck(system.createSound(buffer, FMOD_MODE.FMOD_SOFTWARE | FMOD_MODE.FMOD_OPENMEMORY, exinfo, sound));
}
@Override
public SoundInstance play(SoundChannel soundChannel, float volume, float pan) throws SoundSystemException {
Channel channel = new Channel();
errorCheck(system.playSound(FMOD_CHANNELINDEX.FMOD_CHANNEL_FREE, sound, true, channel));
errorCheck(channel.setVolume(Math.min(1, volume)));
errorCheck(channel.setPan(pan));
errorCheck(channel.setPaused(false));
errorCheck(channel.setLoopCount(0));
errorCheck(channel.setChannelGroup(soundChannel == SoundChannel.BGM ? bgmGroup : keyGroup));
system.update();
if (channel.isNull()) return null;
return new FmodSoundInstance(channel);
}