c++ - Isavailable is not a member of QSound -
i want compile old qt project qt 5.2.1 , have many trouble, 1 of qsound problem:
if(!qsound::isavailable()) { ui.grpsounds->setenabled(false); ui.grpsounds->settitle(tr("sounds (not available)")); }
error: 'isavailable' not member of 'qsound'
will me? newbie qt. thank you.
if want notify user whether or not sounds can played best bet qaudiodeviceinfo. can query available input or output devices using static method
qlist<qaudiodeviceinfo> qaudiodeviceinfo::availabledevices(qaudio::mode mode)
for instance can replace qsound::isavailable()
by
!qaudiodeviceinfo::availabledevices(qaudio::audiooutput).isempty()
edit:
qsound
part of gui module, part of multimedia module (which make more sense). need take @ changes in multimedia modules qt4 qt5 more info. may want @ qsoundeffect
, seems have richer api
Comments
Post a Comment