QTfrontend/pages.cpp
changeset 2194 1597710c6118
parent 2191 20c62f787a4d
child 2216 82e7da49c26a
--- a/QTfrontend/pages.cpp	Wed Jun 24 23:53:02 2009 +0000
+++ b/QTfrontend/pages.cpp	Thu Jun 25 10:49:05 2009 +0000
@@ -286,18 +286,16 @@
 
 void PageEditTeam::testSound()
 {
+	int sound;
 	QDir tmpdir;
 	tmpdir.cd(datadir->absolutePath());
 	tmpdir.cd("Sounds/voices");
 	tmpdir.cd(CBVoicepack->currentText());
 	QStringList list = tmpdir.entryList(QStringList() << "Illgetyou.ogg" << "Incoming.ogg" << "Stupid.ogg" << "Coward.ogg" << "Firstblood.ogg", QDir::Files);
 	if (list.size()) {
-	//	printf("%s\n", QString(tmpdir.absolutePath() + "/" + list[rand() % list.size()]).toLocal8Bit().constData());
-		int tmp =openal_loadfile(QString(tmpdir.absolutePath() + "/" + list[rand() % list.size()]).toLocal8Bit().constData());
-		openal_playsound(tmp);										   
+		sound = openal_loadfile(QString(tmpdir.absolutePath() + "/" + list[rand() % list.size()]).toLocal8Bit().constData());
+		openal_playsound(sound);										   
 	}
-		
-		//QSound::play(tmpdir.absolutePath() + "/" + list[rand() % list.size()]);
 }
 
 PageMultiplayer::PageMultiplayer(QWidget* parent) :