34 if (Mix_Chunk *soundEffect = Mix_LoadWAV_RW(rw, 1))
39 Log::info(
"Error, failed to load sound effect: %s", Mix_GetError());
45 Mix_VolumeChunk(
mChunk, volume);
46 return Mix_PlayChannel(channel,
mChunk, loops);
Defines a class for loading and storing sound effects.
int play(int loops, int volume, int channel=-1)
Plays the sample.
static SoundEffect * load(SDL_RWops *rw)
Loads a sample from a buffer in memory.
void info(const char *log_text,...) LOG_PRINTF_ATTR