diff options
Diffstat (limited to 'src/resources/music.h')
-rw-r--r-- | src/resources/music.h | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/resources/music.h b/src/resources/music.h index a4b5b4973..88cc752bc 100644 --- a/src/resources/music.h +++ b/src/resources/music.h @@ -2,7 +2,7 @@ * The ManaPlus Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011 The ManaPlus Developers + * Copyright (C) 2011-2012 The ManaPlus Developers * * This file is part of The ManaPlus Client. * @@ -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 |