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