Re: [Interest] Qt6 porting guidance: QSound? QAudioFormat: endian, codec?

2021-08-13 Thread David M. Cotter
when you say "consider" do you mean "be" ?

> On Aug 13, 2021, at 6:26 AM, Doris Verria  wrote:
> 
> Hello Dave, 
> 
> At the moment, there is no support for changing the format of QAudioBuffer. 
> This will be a task for after 6.2.
> We will consider adding support for decoding into a requested format to 
> QAudioDecoder in time for 6.2.
> 
> Best,
> Doris
> 
> On 12.8.21, 4:32 PM, "David M. Cotter"  wrote:
> 
>more specifically, can i create an empty QAudioBuffer in the required 
> format, and assign to it the QAudioBuffer that came from QAudioDecoder, and 
> expect it to conform to my specified format?
> 
>thanks
> 
>-dave
> 
>> On Aug 9, 2021, at 12:09 PM, David M. Cotter  wrote:
>> 
>>> As mentioned, in Qt6 Beta2 there's no way to set a specific format to 
>>> decode in (other than that of the encoded file).
>> yes, i got that.
>> 
>> my audio pipeline expects a very specific format, and can't handle other 
>> formats.  the source mp3s come from a random assortment from the user, which 
>> i have no control over.
>> 
>> what i'm asking is if there is a way, in Qt6, AFTER we have PCM data in 
>> whatever random format, to conform it to another, specific format?
>> 
>> is there a QAudioFormatConverter or something?
>> 
>> if not, honestly, QAudioDecoder is useless.
>> 
>> -dave
> 
> 

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


Re: [Interest] Qt6 porting guidance: QSound? QAudioFormat: endian, codec?

2021-08-13 Thread Doris Verria
Hello Dave, 

At the moment, there is no support for changing the format of QAudioBuffer. 
This will be a task for after 6.2.
We will consider adding support for decoding into a requested format to 
QAudioDecoder in time for 6.2.

Best,
Doris

On 12.8.21, 4:32 PM, "David M. Cotter"  wrote:

more specifically, can i create an empty QAudioBuffer in the required 
format, and assign to it the QAudioBuffer that came from QAudioDecoder, and 
expect it to conform to my specified format?

thanks

-dave

> On Aug 9, 2021, at 12:09 PM, David M. Cotter  wrote:
> 
>> As mentioned, in Qt6 Beta2 there's no way to set a specific format to 
decode in (other than that of the encoded file).
> yes, i got that.
> 
> my audio pipeline expects a very specific format, and can't handle other 
formats.  the source mp3s come from a random assortment from the user, which i 
have no control over.
> 
> what i'm asking is if there is a way, in Qt6, AFTER we have PCM data in 
whatever random format, to conform it to another, specific format?
> 
> is there a QAudioFormatConverter or something?
> 
> if not, honestly, QAudioDecoder is useless.
> 
> -dave


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


Re: [Interest] Qt6 porting guidance: QSound? QAudioFormat: endian, codec?

2021-08-12 Thread David M. Cotter
more specifically, can i create an empty QAudioBuffer in the required format, 
and assign to it the QAudioBuffer that came from QAudioDecoder, and expect it 
to conform to my specified format?

thanks

-dave

> On Aug 9, 2021, at 12:09 PM, David M. Cotter  wrote:
> 
>> As mentioned, in Qt6 Beta2 there's no way to set a specific format to decode 
>> in (other than that of the encoded file).
> yes, i got that.
> 
> my audio pipeline expects a very specific format, and can't handle other 
> formats.  the source mp3s come from a random assortment from the user, which 
> i have no control over.
> 
> what i'm asking is if there is a way, in Qt6, AFTER we have PCM data in 
> whatever random format, to conform it to another, specific format?
> 
> is there a QAudioFormatConverter or something?
> 
> if not, honestly, QAudioDecoder is useless.
> 
> -dave

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


Re: [Interest] Qt6 porting guidance: QSound? QAudioFormat: endian, codec?

2021-08-09 Thread David M. Cotter
> As mentioned, in Qt6 Beta2 there's no way to set a specific format to decode 
> in (other than that of the encoded file).
yes, i got that.

my audio pipeline expects a very specific format, and can't handle other 
formats.  the source mp3s come from a random assortment from the user, which i 
have no control over.

what i'm asking is if there is a way, in Qt6, AFTER we have PCM data in 
whatever random format, to conform it to another, specific format?

is there a QAudioFormatConverter or something?

if not, honestly, QAudioDecoder is useless.

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


Re: [Interest] Qt6 porting guidance: QSound? QAudioFormat: endian, codec?

2021-08-09 Thread Doris Verria
Hi,

Sorry if I was unclear.
I mean that the decoded audio will have the same sample rate, sample format, 
and channel count as that of the original media. Not codec. QAudioDecoder will 
always output uncompressed PCM data.

If you have an mp3 file of format 32k, 16bit signed int, stereo, QAudioDecoder 
will output PCM data of 32k, 16bit signed int, stereo from it.
If the sample size (bit depth) is not known, often the case for some compressed 
formats like mp3 and aac, the sample format of the decoded audio will default 
to 16bit signed int.

As mentioned, in Qt6 Beta2 there's no way to set a specific format to decode in 
(other than that of the encoded file).

Best,
Doris

On 9.8.21, 4:58 PM, "David M. Cotter"  wrote:

> QAudioDecoder now decodes to the native format used in the encoded file
do you mean if the native format is mp3, that i'm going to get mp3 data? if 
so, how is that considered "decoding" ?

> That is, it will output in the same channel count, sample rate, sample 
format (the bits per sample information is sometimes irrelevant for compressed 
formats and therefore will be 0 or not known.
i don't get it. i thought the point was to get PCM / raw uncompressed data?

does Qt6 Beta2 have some facility for "conforming" the output of 
QAudioDecoder to, say, 44.1k, 16bit signed int, Stereo?

-dave

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


Re: [Interest] Qt6 porting guidance: QSound? QAudioFormat: endian, codec?

2021-08-09 Thread David M. Cotter
> QAudioDecoder now decodes to the native format used in the encoded file
do you mean if the native format is mp3, that i'm going to get mp3 data? if so, 
how is that considered "decoding" ?

> That is, it will output in the same channel count, sample rate, sample format 
> (the bits per sample information is sometimes irrelevant for compressed 
> formats and therefore will be 0 or not known.
i don't get it. i thought the point was to get PCM / raw uncompressed data?

does Qt6 Beta2 have some facility for "conforming" the output of QAudioDecoder 
to, say, 44.1k, 16bit signed int, Stereo?

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


Re: [Interest] Qt6 porting guidance: QSound? QAudioFormat: endian, codec?

2021-08-09 Thread Doris Verria
Hello João,

Please go ahead and create a bug report about it.
Thanks.

Best,
Doris

From: joao morgado 
Date: Monday, 9 August 2021, 2:44 PM
To: Qt Interest , Doris Verria 
Subject: Re: [Interest] Qt6 porting guidance: QSound? QAudioFormat: endian, 
codec?

Hi Doris

I've been testing SoundEffects in Qt6.2 beta2 and it's still quite buggy, a 
simple example code like the one in the docs
SoundEffect QML Type | Qt Multimedia 
6.2.0<https://doc-snapshots.qt.io/qt6-dev/qml-qtmultimedia-soundeffect.html>

- in windows crashes the program (if I remove the line where the wav file is 
set in source, the program does not crash, but of course nothing is played)
- in linux mint I only get sound one time, at the first press event
- in MacOS works good

Shall I make a  bug report, or do you Qt guys already know this ?

Thanks
João




Em segunda-feira, 9 de agosto de 2021 11:38:51 GMT+1, Doris Verria 
 escreveu:


Hello,

Currently, it is not possible to request a specific format for QAudioDecoder. 
We plan to support this after 6.2.

QAudioDecoder now decodes to the native format used in the encoded file. That 
is, it will output in the same channel count,
sample rate, sample format (the bits per sample information is sometimes 
irrelevant for compressed formats and therefore
will be 0 or not known. In that case, the output format will default to 16bit 
signed int) as the original file.

QAudioBuffer, returned by QAudioDecoder::read(), will have the correct output 
format set and can be retrieved through
QAudioBuffer::format().

Best,
Doris

On 8.8.21, 3:46 AM, "David M. Cotter" mailto:d...@kjams.com>> 
wrote:

You can still specify the channel count, sample rate, and the sample format

where and how does one do this for QAudioDecoder?

or does QAudioDecoder only always output one specific format? what is the 
format? 44100 hz, 16bit signed int, stereo? or what?

i see no documentation that explains this, nor is there anything in the 
header indicating it is possible to request a specific format

-dave


___
Interest mailing list
Interest@qt-project.org<mailto: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


Re: [Interest] Qt6 porting guidance: QSound? QAudioFormat: endian, codec?

2021-08-09 Thread joao morgado via Interest
 Hi Doris
I've been testing SoundEffects in Qt6.2 beta2 and it's still quite buggy, a 
simple example code like the one in the docsSoundEffect QML Type | Qt 
Multimedia 6.2.0

- in windows crashes the program (if I remove the line where the wav file is 
set in source, the program does not crash, but of course nothing is played)- in 
linux mint I only get sound one time, at the first press event- in MacOS works 
good
Shall I make a  bug report, or do you Qt guys already know this ?
ThanksJoão



Em segunda-feira, 9 de agosto de 2021 11:38:51 GMT+1, Doris Verria 
 escreveu:  
 
 Hello,

Currently, it is not possible to request a specific format for QAudioDecoder. 
We plan to support this after 6.2.

QAudioDecoder now decodes to the native format used in the encoded file. That 
is, it will output in the same channel count, 
sample rate, sample format (the bits per sample information is sometimes 
irrelevant for compressed formats and therefore 
will be 0 or not known. In that case, the output format will default to 16bit 
signed int) as the original file.

QAudioBuffer, returned by QAudioDecoder::read(), will have the correct output 
format set and can be retrieved through 
QAudioBuffer::format().

Best, 
Doris

On 8.8.21, 3:46 AM, "David M. Cotter"  wrote:

    You can still specify the channel count, sample rate, and the sample format

    where and how does one do this for QAudioDecoder?

    or does QAudioDecoder only always output one specific format? what is the 
format? 44100 hz, 16bit signed int, stereo? or what?

    i see no documentation that explains this, nor is there anything in the 
header indicating it is possible to request a specific format

    -dave


___
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


Re: [Interest] Qt6 porting guidance: QSound? QAudioFormat: endian, codec?

2021-08-09 Thread Doris Verria
Hello,

Currently, it is not possible to request a specific format for QAudioDecoder. 
We plan to support this after 6.2.

QAudioDecoder now decodes to the native format used in the encoded file. That 
is, it will output in the same channel count, 
sample rate, sample format (the bits per sample information is sometimes 
irrelevant for compressed formats and therefore 
will be 0 or not known. In that case, the output format will default to 16bit 
signed int) as the original file.

QAudioBuffer, returned by QAudioDecoder::read(), will have the correct output 
format set and can be retrieved through 
QAudioBuffer::format().

Best, 
Doris

On 8.8.21, 3:46 AM, "David M. Cotter"  wrote:

You can still specify the channel count, sample rate, and the sample format

where and how does one do this for QAudioDecoder?

or does QAudioDecoder only always output one specific format? what is the 
format? 44100 hz, 16bit signed int, stereo? or what?

i see no documentation that explains this, nor is there anything in the 
header indicating it is possible to request a specific format

-dave


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


Re: [Interest] Qt6 porting guidance: QSound? QAudioFormat: endian, codec?

2021-08-07 Thread David M. Cotter
You can still specify the channel count, sample rate, and the sample format

where and how does one do this for QAudioDecoder?

or does QAudioDecoder only always output one specific format? what is the 
format? 44100 hz, 16bit signed int, stereo? or what?

i see no documentation that explains this, nor is there anything in the header 
indicating it is possible to request a specific format

-dave

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


Re: [Interest] Qt6 porting guidance: QSound? QAudioFormat: endian, codec?

2021-07-07 Thread David M. Cotter
i take it also that "unsignedInt" is also no longer supported?
that it's always signed?

> On Jul 7, 2021, at 1:17 PM, Doris Verria  wrote:
> 
> 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" 
>  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


Re: [Interest] Qt6 porting guidance: QSound? QAudioFormat: endian, codec?

2021-07-07 Thread Doris Verria
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" 
 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