| 1214 | QSoundEffect *effect = NULL; |
| 1215 | |
| 1216 | void NetHackQtBind::qtsound_play_usersound(char *filename, int32_t volume, int32_t idx UNUSED) |
| 1217 | { |
| 1218 | if (!effect) |
| 1219 | effect = new QSoundEffect(nethack_qt_::NetHackQtBind::mainWidget()); |
| 1220 | if (effect) { |
| 1221 | effect->setLoopCount(1); |
| 1222 | effect->setVolume((1.00f * volume) / 100.0f); |
| 1223 | effect->setSource(QUrl::fromLocalFile(filename)); |
| 1224 | effect->play(); |
| 1225 | } |
| 1226 | } |
| 1227 | #endif |
| 1228 | |
| 1229 | } // namespace nethack_qt_ |
nothing calls this directly
no outgoing calls
no test coverage detected