#include "oodle.h" CSound::CSound(const string &snd) { string file = CImgLoader::getPath() + "snd/" + snd; const char* f2 = file.c_str(); data = Mix_LoadWAV( f2 ); if (!data) { LOG("Failed to load sound " << snd << ".", 1, LOG_INFO); LOG("This is normal if \"CSoundSystem\" failed to load above.", 1, LOG_INFO); } } CSound::~CSound() { if (data) Mix_FreeChunk(data); } void CSound::setChannel(int c) { chan = c; } int CSound::getChannel() const { return chan; } Mix_Chunk* CSound::getChunk() const { return data; }