Details
-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
6.2.2
-
None
-
-
e95f7256fb534c3dd03b3091dd9835cd2f33d327
Description
There is a problem with Qt6's QSoundEffect (6.2.2 is what I used) which seems to be absent in Qt5 (5.15.1 is what I checked) and which causes application to shut down if in the Windows 10 system there is no audio output active (indicated e.g. by the speaker icon in the taskbar being crossed out).
In such a setting calling the setSource() on QSoundEffect instance causes the app to be shut down.
The problem can be even reproduced using the official Qt example 'audiodecoder' but as the code there is somewhat involved I attach the simple single-file demo of the problem (the compete .pro settings present in the header of the file).
Execution of the demo requires presence of 'some.wav' file in the runtime directory.
There also seems to be a simple workaround to detect the problematic situation without introducing new dependencies - if 'QSoundEffect::supportedMimeTypes().size()' reports 0 the 'setSource' should not be called (that is used in the demo to add a warning text to the button).
As I mentioned, in Qt5, when no output is connected the effect just seems to 'do nothing'.
Please consult the code for any further details.
Attachments
Issue Links
- is covered by
-
QTBUG-97838 Recording broken on Apple Silicon / M1
- Closed