summaryrefslogtreecommitdiff
path: root/src/resources/music.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-24 22:59:25 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-24 22:59:25 +0300
commit53535919d3cf62f97bc9fee28ee31e4f577d2700 (patch)
tree98b8bc6b8da941b5d2c72c598756374623ad850a /src/resources/music.h
parentb4e47fb41a19ca09c02bcd009b28cb7c3caa2256 (diff)
downloadmanaverse-53535919d3cf62f97bc9fee28ee31e4f577d2700.tar.gz
manaverse-53535919d3cf62f97bc9fee28ee31e4f577d2700.tar.bz2
manaverse-53535919d3cf62f97bc9fee28ee31e4f577d2700.tar.xz
manaverse-53535919d3cf62f97bc9fee28ee31e4f577d2700.zip
Based on commit b856e8b47ab2dfd393e3c2720c5647eb66393931
Author: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> Date: Tue Jan 24 19:14:24 2012 +0100 Stream music files directly from the archives Use Mix_LoadMUS_RW to stream music files directly from PhysFS. I kept around ResourceManager:copyFile for now, since it may have other uses.
Diffstat (limited to 'src/resources/music.h')
-rw-r--r--src/resources/music.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/resources/music.h b/src/resources/music.h
index 6df63b2ac..88cc752bc 100644
--- a/src/resources/music.h
+++ b/src/resources/music.h
@@ -51,27 +51,22 @@ class Music : public Resource
/**
* 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