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