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