ralphy wrote: 
> Triode,
> 
> I did some more testing today and it turns out the IsFormatSupported
> call returns paNoError for 384000 with some of the windows apis, so that
> appears to be a similiar issue to your osx comments in the code.
> 
> The paUnanticipatedHostError is coming from the actual openstream.
> 
> Perhaps the most acurate way to determine the max sample rate is to just
> use Pa_OpenStream in the check for supported rates instead of
> Pa_IsFormatSupported since your testing with a call to openstream
> afterwards anyway.
> 
> EDIT: Confirmed works with this change.  I get a max rate of 192000 for
> the device.
> > 
Code:
--------------------
  >   > --- output.c    (revision 280)
  > +++ output.c    (working copy)
  > @@ -475,7 +475,10 @@
  > // check supported sample rates
  > // Note this does not appear to work on OSX - it always returns paNoError...
  > for (i = 0; rates[i]; ++i) {
  > -               if (Pa_IsFormatSupported(NULL, &outputParameters, 
(double)rates[i]) == paNoError) {
  > +               err = Pa_OpenStream(&pa.stream, NULL, &outputParameters, 
(double)rates[i],
  > +                       paFramesPerBufferUnspecified, paNoFlag, 
pa_callback, NULL);
  > +               if ( err == paNoError) {
  > +                       Pa_CloseStream(pa.stream);
  > *max_rate = rates[i];
  > break;
  > }
--------------------
> > 

Committed to master.


------------------------------------------------------------------------
Triode's Profile: http://forums.slimdevices.com/member.php?userid=17
View this thread: http://forums.slimdevices.com/showthread.php?t=97766

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to