GPL-2+
© 2004-2005 Jared Luxenberg; © 2004-2005 Justin Lokey; © 2004-2005 Korina Loumidi; © 2004-2005 Keith Bare
debian/copyright
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
| 1 |
#include "oodle.h" |
| 2 |
|
| 3 |
CSound::CSound(const string &snd) |
| 4 |
{ |
| 5 |
string file = CImgLoader::getPath() + "snd/" + snd; |
| 6 |
const char* f2 = file.c_str(); |
| 7 |
data = Mix_LoadWAV( f2 ); |
| 8 |
|
| 9 |
if (!data) |
| 10 |
_THROWEX(ex_sdl, "Failed to load sound", "CSound", "CSound", "snd = " << snd); |
| 11 |
} |
| 12 |
|
| 13 |
CSound::~CSound() |
| 14 |
{ |
| 15 |
Mix_FreeChunk(data); |
| 16 |
} |
| 17 |
|
| 18 |
void CSound::setChannel(int c) |
| 19 |
{ |
| 20 |
chan = c; |
| 21 |
} |
| 22 |
|
| 23 |
int CSound::getChannel() const |
| 24 |
{ |
| 25 |
return chan; |
| 26 |
} |
| 27 |
|
| 28 |
Mix_Chunk* CSound::getChunk() const |
| 29 |
{ |
| 30 |
return data; |
| 31 |
} |