Alternative for QMediaPlayer on embedded system.
-
Hi,
I'm using QMediaPlayer to play short notifications. As I have 4 different wav files - I created 4 QMediaPlayer with those files loaded/buffered on startup.
Problem is that sometimes when one notification already plays and second starts - I have 2-3 delay. As I understand QMediaPlayer executed internally gstreamer pipeline and plays it. Which maybe heavy and triggers this delays.
Moving playing this second wav file to QProcess and aplay resolved this problem. But it's ugly solution.
I tried QSound, QSoundEffect and QAudioOutput - but all of them rely on PulseAudio which isn't on my system (I've got only ALSA).
What other ways can I use to play those notifications reliable and fast? -
Hi,
Are you using Qt 5 ? If so, I remember there's an ALSA backend, you should check for it.
-
Hi,
Are you using Qt 5 ? If so, I remember there's an ALSA backend, you should check for it.
@SGaist Yes, 5.14
How to activate this ALSA backend WITHOUT Qt recompilation?
I foundqtmultimedia/src/plugins/alsa/qalsaaudiooutput.cpp, but when I use ALSA keyword in index search - it returns nothing.PS: I found that
QT_QPA_EGLFS_KMS_CONFIGpointing to file with[Device0] output_name=ALSAset as enviromental variable of my application should be enough to change default device from PulseAudio to Alsa. But ... no success.
Veryfing if-lasoundadded to LIBS will help. -
One thing you can do is move all other plugins in a different folder.