Hi, 

You can play sounds using QSoundEffect, which replaces QSound. If low-latency 
is not important, you can always use QMediaPlayer.
QSoundEffect currently supports PCM audio only, more specifically, the WAV 
format.

QAudioFormat now always expects samples in the host endianness, so you will 
need to convert the samples if they are in a 
different byte order than that of the host platform. 

QAudioFormat supports PCM audio formats only, so there's no need to 
set the codec. You can still specify the channel count, sample rate, and the 
sample format (it supports 8bit unsigned, 16 and 32bit 
signed Int, as well as floating point formats).

For an overview of Multimedia in Qt6, have a look at this blog post from Lars:
https://www.qt.io/blog/qt-multimedia-in-qt-6


Best regards,
Doris



On 7.7.21, 9:26 PM, "Interest on behalf of David M. Cotter" 
<interest-boun...@qt-project.org on behalf of d...@kjams.com> wrote:

    requires mac/windows solution (no need for ios/android/linux)

    how do i "just play a sound" ? 
    seems QSound is gone?

    how does one specify endian format of a PCM stream?
    format.setByteOrder() is gone?

    how does one specify that the stream is in fact PCM?
    format.setCodec() is gone?


    _______________________________________________
    Interest mailing list
    Interest@qt-project.org
    https://lists.qt-project.org/listinfo/interest

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to