Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Possible to play FLAC audio files in QSoundEffect ?



  • I know i can play WAV files in it and it works fine, but is there a way to play FLAC files in it for smaller ressource file size ?
    I'd be happy if there's a way, no matter what it is, but if it's not possible it's not that bad :)

    Thanks


  • Moderators

    @WiseCode said in Possible to play FLAC audio files in QSoundEffect ?:

    I know i can play WAV files in it and it works fine, but is there a way to play FLAC files in it for smaller ressource file size ?
    I'd be happy if there's a way, no matter what it is, but if it's not possible it's not that bad :)

    Hi,

    The documentation (http://doc.qt.io/qt-5/qsoundeffect.html ) says, "This class allows you to play uncompressed audio files (typically WAV files)". FLAC is compressed, so QSoundEffect can't understand it.

    The documentation does suggest an alternative class for playing other formats: http://doc.qt.io/qt-5/qmediaplayer.html -- Give QMediaPlayer a try!



  • Hi,

    Thanks for your answer,

    the fact is that i need to play 18 wave files simultaneously with 18 audio players that need to be synchronized,
    with QMediaPlayer they are not synchronized even with the LowLatency flag, on top of that it doesn't accept FLAC files either

    So i'll stick to QSoundEffect and WAV for now

    Thank you, i'm marking the topic as solved :)


Log in to reply