summaryrefslogtreecommitdiff
path: root/src/resources/music.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-02-05 15:00:58 +0300
committerAndrei Karas <akaras@inbox.ru>2012-02-05 15:00:58 +0300
commit9a3a196dbf633a699c26d0227802a42f025c8bfd (patch)
treedfbdb2ff1e2c54d75a2bf6411d3f70df22518c28 /src/resources/music.h
parentfc17ff22d9df50df9c5d1cf3dc0de358001271ed (diff)
parentece36a40d4e9a838cde01075d7681b8fc517b19f (diff)
downloadplus-9a3a196dbf633a699c26d0227802a42f025c8bfd.tar.gz
plus-9a3a196dbf633a699c26d0227802a42f025c8bfd.tar.bz2
plus-9a3a196dbf633a699c26d0227802a42f025c8bfd.tar.xz
plus-9a3a196dbf633a699c26d0227802a42f025c8bfd.zip
Merge branch 'master' into stripped
Conflicts: src/guichan/gui.cpp src/guichan/include/guichan/sdl/sdlpixel.hpp
Diffstat (limited to 'src/resources/music.h')
-rw-r--r--src/resources/music.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/resources/music.h b/src/resources/music.h
index 428c02572..88cc752bc 100644
--- a/src/resources/music.h
+++ b/src/resources/music.h
@@ -41,38 +41,32 @@ class Music : public Resource
/**
* Loads a music from a buffer in memory.
*
- * @param buffer The memory buffer containing the music data.
- * @param bufferSize The size of the memory buffer in bytes.
+ * @param rw The SDL_RWops to load the music data from.
*
* @return <code>NULL</code> if the an error occurred, a valid pointer
* otherwise.
*/
- static Resource *load(void *buffer, unsigned bufferSize);
+ static Resource *load(SDL_RWops *rw);
/**
* Plays the music.
*
- * @param loops Number of times to repeat the playback.
+ * @param loops Number of times to repeat the playback (-1 means
+ * forever).
+ * @param fadeIn Duration in milliseconds to fade in the music.
*
* @return <code>true</code> if the playback started properly
* <code>false</code> otherwise.
*/
- virtual bool play(int loops);
-
- /**
- * Stops the music.
- */
- virtual void stop();
+ bool play(int loops = -1, int fadeIn = 0);
protected:
/**
* Constructor.
*/
- Music(Mix_Chunk *music);
+ Music(Mix_Music *music);
- //Mix_Music *music;
- Mix_Chunk *mChunk;
- int mChannel;
+ Mix_Music *mMusic;
};
#endif