PortAudio / portaudio

PortAudio is a cross-platform, open-source C language library for real-time audio input and output.
Other
1.52k stars 306 forks source link

paqa_latency fails for ZoomAudioDevice #742

Open philburk opened 2 years ago

philburk commented 2 years ago

Latency test may be too strict. The documentation says the implementation may not provide the requested latency.

To Reproduce

  1. Install Zoom on Mac
  2. ./configure && make clean && make
  3. bin/paqa_latency

Expected behavior All PASS

Actual behavior ZoomAudioDevice input latency did not go above 0.016.

------------------------ paqaCheckMultipleSuggested - INPUT
 lowLatency  = 0.01
 highLatency = 0.1
 numChannels = 2
 sampleRate  = 48000
   suggestedLatency[0] = 0.0100
          finalLatency = 0.0100
   suggestedLatency[1] = 0.0200
          finalLatency = 0.0160
   suggestedLatency[2] = 0.0300
          finalLatency = 0.0160
   suggestedLatency[3] = 0.0400
          finalLatency = 0.0160
   suggestedLatency[4] = 0.0500
          finalLatency = 0.0160
   suggestedLatency[5] = 0.0600
          finalLatency = 0.0160
   suggestedLatency[6] = 0.0700
          finalLatency = 0.0160
   suggestedLatency[7] = 0.0800
          finalLatency = 0.0160
   suggestedLatency[8] = 0.0900
          finalLatency = 0.0160
   suggestedLatency[9] = 0.1000
          finalLatency = 0.0160
./qa/paqa_latency.c:296 - ERROR - final latency should be close to suggested latency, expected 0.100000, got 0.016000, tol=0.010000
INPUT CHECK FAILED !!! #6: 'ZoomAudioDevice'
ERROR - test failed.

Desktop (please complete the following information):

Additional context

philburk commented 2 years ago

This looks more like a test problem than a bug in PortAudio.

philburk commented 6 days ago

I ran this again today and got zero latency for all devices including ZoomAudioDevice:

------------------------ paqaCheckMultipleSuggested - OUTPUT
 lowLatency  = 0.0333333
 highLatency = 0.0426667
 numChannels = 2
 sampleRate  = 48000
   suggestedLatency[0] = 0.0333
          finalLatency = 0.0000
./qa/paqa_latency.c:296 - ERROR - final latency should be close to suggested latency, expected 0.033333, got 0.000000, tol=0.003333
OUTPUT CHECK FAILED !!! #7: 'ZoomAudioDevice'