MCPcopy Create free account
hub / github.com/NetHack/NetHack / qtsound_play_usersound

Method qtsound_play_usersound

win/Qt/qt_bind.cpp:1216–1226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1214QSoundEffect *effect = NULL;
1215
1216void 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_

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected