[Portaudio] The 16 bit truncation

Riot rain.backnet at gmail.com
Sun Dec 6 13:01:01 EST 2015


I have a 32bit Win XP development machine in daily use (for us, backwards
compatibility is very important) so if there's anything you'd like tested,
feel free to send it over.

Regards,
Riot


On 5 December 2015 at 02:19, Bernt Ronningsbakk <bernt.ronningsbakk at lyse.net
> wrote:

> Hi Ross,
>
> I did these changes in direct sound and the queryformat function in win
> mme.
>
>
> I am not able to evaluate these changes on win xp. I haven't seen one of
> those in years. Windows Vista was launched in 2006. That is nearly 10 years
> ago.  If xp compatibility is an acceptance criteria, perhaps the best
> solution is to test for windows version. AFAIK Vista or later can handle 24
> int and 32 float regardless of the sound card.
>
> Kind regards,
>
> Bernt
>
>
> Message: 2
> Date: Fri, 4 Dec 2015 19:56:13 +1100
> From: Ross Bencina <rossb-lists at audiomulch.com>
> To: portaudio at lists.columbia.edu
> Subject: Re: [Portaudio] The 16 bit truncation
> Message-ID: <5661552D.3050308 at audiomulch.com>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
> Hi Bernt,
>
> On 4/12/2015 12:54 PM, Bernt Ronningsbakk wrote:
> > The 16 bit truncation is a substantial weakness in PA.
>
> I presume you're talking about PA/DirectSound. I'm not aware of that
> limitation in any other host API.
>
>
> > In the copy that I'm working on right now, I have removed all code that
> > changes the word format to 16 bit. And it seems to work without issues on
> my
> > PC. I haven't checked wdmks though, since it has other issues.
> >
> > Here is one of the changes I've done in dsound:
> >
> >          /* IMPLEMENT ME - establish which  host formats are available */
> >          //Bernt
> >          //PaSampleFormat nativeInputFormats = paInt16;
> >          PaSampleFormat nativeInputFormats =
> > inputParameters->sampleFormat;//Bernt
> >          /* PaSampleFormat nativeFormats = paUInt8 | paInt16 | paInt24 |
> > paInt32 | paFloat32; */
> >
> >          hostInputSampleFormat =
> >              PaUtil_SelectClosestAvailableFormat( nativeInputFormats,
> > inputParameters->sampleFormat );// Bernt
> >
> > A handful of these was all it took. I did text a search on 16 and simply
> > disabled all functionality that changed a stream to 16 bit. Several
> places
> > have  "implement me" regarding checking the sound card capability and
> > choosing the nearest format. I don't think that is needed.
> >
> > Unless there's a very good reason for keeping the 16 bit truncation I
> > suggest that we remove it.
>
> The "very good reason" is that there is no fallback path if >16-bit fails.
>
> If you can provide good evidence that Windows (XP and later) will always
> accept >16-bit then I agree that we should just go ahead with your
> proposed changes. But otherwise, I think 16-bit truncation is a better
> option than failing.
>
> The correct fix, as has been discussed here in the past, and in the
> tickets, is to retry with 16 bit if a higher bit-depth fails. I'd be
> very happy to accept a patch that does this retry.
>
>
> > A second best alternative would be to use paInt24 as default. It is good
> > enough for basically all purposes, and those who don't have a sound card
> who
> > supports this probably doesn't care if their win machine does a
> downsizing
> > that is a bit less than sota.
>
> I'm not sure what you are proposing with the above paragraph.
>
> Thanks,
>
> Ross.
>
>
>
>
>
> ------------------------------
>
> _______________________________________________
> Portaudio mailing list
> Portaudio at lists.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/portaudio
>
> End of Portaudio Digest, Vol 6, Issue 4
> ***************************************
>
> _______________________________________________
> Portaudio mailing list
> Portaudio at lists.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/portaudio
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.columbia.edu/pipermail/portaudio/attachments/20151206/a9cd2ab6/attachment.html>


More information about the Portaudio mailing list