Chris@4: README for PortAudio Loopback Test Chris@4: Chris@4: Copyright (c) 1999-2010 Phil Burk and Ross Bencina Chris@4: See complete license at end of file. Chris@4: Chris@4: This folder contains code for a single executable that does a standalone test of PortAudio. Chris@4: It does not require a human to listen to the result. Instead it listens to itself using Chris@4: a loopback cable connected between the audio output and the audio input. Special pop detectors Chris@4: and phase analysers can detect errors in the audio stream. Chris@4: Chris@4: This test can be run from a script as part of a nightly build and test. Chris@4: Chris@4: --- How To Run Test --- Chris@4: Chris@4: Connect stereo cables from one or more output audio devices to audio input devices. Chris@4: The test will scan all the ports and find the cables. Chris@4: Chris@4: Adjust the volume levels of the hardware so you get a decent signal that will not clip. Chris@4: Chris@4: Run the test from the command line with the following options: Chris@4: Chris@4: -i# Input device ID. Will scan for loopback if not specified. Chris@4: -o# Output device ID. Will scan for loopback if not specified. Chris@4: -r# Sample Rate in Hz. Will use multiple common rates if not specified. Chris@4: -s# Size of callback buffer in frames, framesPerBuffer. Chris@4: -w Save bad recordings in a WAV file. Chris@4: -dDir Path for Directory for WAV files. Default is current directory. Chris@4: -m Just test the DSP Math code and not the audio devices. Chris@4: Chris@4: If the -w option is set then any tests that fail will save the recording of the broken Chris@4: channel in a WAV file. The files will be numbered and shown in the report. Chris@4: Chris@4: --- ToDo --- Chris@4: Chris@4: * Add check for harmonic and enharmonic distortion. Chris@4: * Measure min/max peak values. Chris@4: * Detect DC bias. Chris@4: * Test against matrix of devices/APIs and settings. Chris@4: * Detect mono vs stereo loopback. Chris@4: * More command line options Chris@4: --quick Chris@4: --latency Chris@4: --duration Chris@4: * Automated build and test script with cron job. Chris@4: * Test on Windows. Chris@4: Chris@4: Chris@4: /* Chris@4: * PortAudio Portable Real-Time Audio Library Chris@4: * Latest Version at: http://www.portaudio.com Chris@4: * Chris@4: * Copyright (c) 1999-2008 Phil Burk and Ross Bencina Chris@4: * Chris@4: * Permission is hereby granted, free of charge, to any person obtaining Chris@4: * a copy of this software and associated documentation files Chris@4: * (the "Software"), to deal in the Software without restriction, Chris@4: * including without limitation the rights to use, copy, modify, merge, Chris@4: * publish, distribute, sublicense, and/or sell copies of the Software, Chris@4: * and to permit persons to whom the Software is furnished to do so, Chris@4: * subject to the following conditions: Chris@4: * Chris@4: * The above copyright notice and this permission notice shall be Chris@4: * included in all copies or substantial portions of the Software. Chris@4: * Chris@4: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, Chris@4: * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF Chris@4: * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. Chris@4: * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR Chris@4: * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF Chris@4: * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION Chris@4: * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Chris@4: */ Chris@4: Chris@4: /* Chris@4: * The text above constitutes the entire PortAudio license; however, Chris@4: * the PortAudio community also makes the following non-binding requests: Chris@4: * Chris@4: * Any person wishing to distribute modifications to the Software is Chris@4: * requested to send the modifications to the original developer so that Chris@4: * they can be incorporated into the canonical version. It is also Chris@4: * requested that these non-binding requests be included along with the Chris@4: * license above. Chris@4: */