summaryrefslogtreecommitdiff
path: root/src/resources/music.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-29 22:00:35 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-29 22:00:35 +0000
commit5352c44d1ab542c64c421afcc690b200f7231a9d (patch)
tree4695c79a788c3ab9daeaf2972052a6ea9821bf13 /src/resources/music.cpp
parent52a7af6227d0b2ff94ff2c8fecd708d4d6a71466 (diff)
downloadmana-5352c44d1ab542c64c421afcc690b200f7231a9d.tar.gz
mana-5352c44d1ab542c64c421afcc690b200f7231a9d.tar.bz2
mana-5352c44d1ab542c64c421afcc690b200f7231a9d.tar.xz
mana-5352c44d1ab542c64c421afcc690b200f7231a9d.zip
Clean up of the ConfigListener and Resource interfaces.
Diffstat (limited to 'src/resources/music.cpp')
-rw-r--r--src/resources/music.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resources/music.cpp b/src/resources/music.cpp
index 9cc848ad..ba9f6df7 100644
--- a/src/resources/music.cpp
+++ b/src/resources/music.cpp
@@ -23,8 +23,8 @@
#include "music.h"
-Music::Music(Mix_Chunk *music):
- music(music)
+Music::Music(const std::string &idPath, Mix_Chunk *music):
+ Resource(idPath), music(music)
{
channel = -1;
}
@@ -36,7 +36,7 @@ Music::~Music()
music = NULL;
}
-Music* Music::load(void* buffer, unsigned int bufferSize)
+Music* Music::load(void* buffer, unsigned int bufferSize, const std::string &idPath)
{
// Load the raw file data from the buffer in an RWops structure
SDL_RWops *rw = SDL_RWFromMem(buffer, bufferSize);
@@ -48,7 +48,7 @@ Music* Music::load(void* buffer, unsigned int bufferSize)
// Now free the SDL_RWops data
SDL_FreeRW(rw);
- return new Music(tmpMusic);
+ return new Music(idPath, tmpMusic);
}
bool Music::play(int loops)