summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-04-11 19:47:17 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-04-11 19:47:17 +0000
commit160e544a794dfc35e37d3790d606b76c0acb8b0e (patch)
treef4b7e07482271bf638b053b6f1afaf2aeec1ee5d /src/main.cpp
parentceaae48958dd674e5aac67606de183bb6b0ac36e (diff)
downloadmana-client-160e544a794dfc35e37d3790d606b76c0acb8b0e.tar.gz
mana-client-160e544a794dfc35e37d3790d606b76c0acb8b0e.tar.bz2
mana-client-160e544a794dfc35e37d3790d606b76c0acb8b0e.tar.xz
mana-client-160e544a794dfc35e37d3790d606b76c0acb8b0e.zip
Improving sound engine (now it loads samples through resource manager)
and support music fading (still somthing to fix)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 8a32f043..b6a3b4fa 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -291,11 +291,10 @@ void init_engine()
// initialize sound-engine and start playing intro-theme /-kth5
try {
- if (config.getValue("sound", 0) == 1) {
- SDL_InitSubSystem(SDL_INIT_AUDIO);
- sound.init(32, 20);
+ if (config.getValue("sound", 0) == 1) {
+ sound.init();
}
- sound.setVolume(64);
+ //sound.setVolume(64);
}
catch (const char *err) {
state = ERROR;
@@ -351,7 +350,7 @@ int main(int argc, char *argv[])
switch (state) {
case LOGIN:
logger.log("State: LOGIN");
- sound.startBgm("data/music/Ivano(de)Jeanette.ogg");
+ sound.playMusic("data/music/Ivano(de)Jeanette.ogg");
/*bgm = resman->getMusic("music/Ivano(de)Jeanette.ogg");
bgm->play(-1);*/
login();
@@ -365,7 +364,7 @@ int main(int argc, char *argv[])
charSelect();
break;
case GAME:
- sound.stopBgm();
+ sound.fadeOutMusic(3000);
//bgm->stop();
logger.log("State: GAME");
try {