QTfrontend/chatwidget.cpp
changeset 2779 e1ae0019d43f
parent 2777 95a1a69d491c
child 2845 19db164dd20d
--- a/QTfrontend/chatwidget.cpp	Tue Feb 09 14:21:25 2010 +0000
+++ b/QTfrontend/chatwidget.cpp	Tue Feb 09 14:24:25 2010 +0000
@@ -41,9 +41,12 @@
        QDir tmpdir;
 
        tmpdir.cd(datadir->absolutePath());
-       tmpdir.cd("Sounds/");
+       tmpdir.cd("Sounds/voices");
        sdli->SDLMusicInit();
-       sound = Mix_LoadWAV(QString(tmpdir.absolutePath() + "/switchhog.ogg").toLocal8Bit().constData());
+       sound[0] = Mix_LoadWAV(QString(tmpdir.absolutePath() + "/Classic/Hello.ogg").toLocal8Bit().constData());
+       sound[1] = Mix_LoadWAV(QString(tmpdir.absolutePath() + "/Default/Hello.ogg").toLocal8Bit().constData());
+       sound[2] = Mix_LoadWAV(QString(tmpdir.absolutePath() + "/Mobster/Hello.ogg").toLocal8Bit().constData());
+       sound[3] = Mix_LoadWAV(QString(tmpdir.absolutePath() + "/Russian/Hello.ogg").toLocal8Bit().constData());
     }
 
 	mainLayout.setSpacing(1);
@@ -133,7 +136,7 @@
 	chatNicks->addItem(item);
 
     if(notifyNick && notify && gameSettings->value("audio/frontendsound", true).toBool()) {
-       Mix_PlayChannel(-1, sound, 0);
+       Mix_PlayChannel(-1, sound[rand()%4], 0);
     }
 }