QTfrontend/pages.cpp
changeset 2194 1597710c6118
parent 2191 20c62f787a4d
child 2216 82e7da49c26a
equal deleted inserted replaced
2193:4d5d78aa7ca4 2194:1597710c6118
   284 	FortPreview->setPixmap(pix);
   284 	FortPreview->setPixmap(pix);
   285 }
   285 }
   286 
   286 
   287 void PageEditTeam::testSound()
   287 void PageEditTeam::testSound()
   288 {
   288 {
       
   289 	int sound;
   289 	QDir tmpdir;
   290 	QDir tmpdir;
   290 	tmpdir.cd(datadir->absolutePath());
   291 	tmpdir.cd(datadir->absolutePath());
   291 	tmpdir.cd("Sounds/voices");
   292 	tmpdir.cd("Sounds/voices");
   292 	tmpdir.cd(CBVoicepack->currentText());
   293 	tmpdir.cd(CBVoicepack->currentText());
   293 	QStringList list = tmpdir.entryList(QStringList() << "Illgetyou.ogg" << "Incoming.ogg" << "Stupid.ogg" << "Coward.ogg" << "Firstblood.ogg", QDir::Files);
   294 	QStringList list = tmpdir.entryList(QStringList() << "Illgetyou.ogg" << "Incoming.ogg" << "Stupid.ogg" << "Coward.ogg" << "Firstblood.ogg", QDir::Files);
   294 	if (list.size()) {
   295 	if (list.size()) {
   295 	//	printf("%s\n", QString(tmpdir.absolutePath() + "/" + list[rand() % list.size()]).toLocal8Bit().constData());
   296 		sound = openal_loadfile(QString(tmpdir.absolutePath() + "/" + list[rand() % list.size()]).toLocal8Bit().constData());
   296 		int tmp =openal_loadfile(QString(tmpdir.absolutePath() + "/" + list[rand() % list.size()]).toLocal8Bit().constData());
   297 		openal_playsound(sound);										   
   297 		openal_playsound(tmp);										   
       
   298 	}
   298 	}
   299 		
       
   300 		//QSound::play(tmpdir.absolutePath() + "/" + list[rand() % list.size()]);
       
   301 }
   299 }
   302 
   300 
   303 PageMultiplayer::PageMultiplayer(QWidget* parent) :
   301 PageMultiplayer::PageMultiplayer(QWidget* parent) :
   304   AbstractPage(parent)
   302   AbstractPage(parent)
   305 {
   303 {