| 1570 | std::vector<DWORD> pid; |
| 1571 | if (Process::find(args[0].toWString(), &pid)) return Process::path(pid.front()); |
| 1572 | return {}; |
| 1573 | } |
| 1574 | }; |
| 1575 | |
| 1576 | /* |
| 1577 | int sample time |
| 1578 | int mode: false=avg, true=max |
| 1579 | |
| 1580 | num return |
| 1581 | */ |
| 1582 | struct QiFunc_volume : public QiFunc |
| 1583 | { |
| 1584 | QiFunc_volume() : QiFunc(0, 2) {} |
| 1585 | QiVar exec(const std::vector<QiVar>& args, QiScriptInterpreter*) const override |
| 1586 | { |
| 1587 | AudioDevice ad; |
| 1588 | if (ad) |
| 1589 | { |
| 1590 | AudioDeviceInfo i = ad.getOutputDefault(); |
| 1591 | if (i.ok) |
| 1592 | { |
| 1593 | QiVar::int_t time = args.size() > 0 ? args[0].toInteger() : 100; |
nothing calls this directly
no test coverage detected