cannam@124
|
1 README for PortAudio Loopback Test
|
cannam@124
|
2
|
cannam@124
|
3 Copyright (c) 1999-2010 Phil Burk and Ross Bencina
|
cannam@124
|
4 See complete license at end of file.
|
cannam@124
|
5
|
cannam@124
|
6 This folder contains code for a single executable that does a standalone test of PortAudio.
|
cannam@124
|
7 It does not require a human to listen to the result. Instead it listens to itself using
|
cannam@124
|
8 a loopback cable connected between the audio output and the audio input. Special pop detectors
|
cannam@124
|
9 and phase analysers can detect errors in the audio stream.
|
cannam@124
|
10
|
cannam@124
|
11 This test can be run from a script as part of a nightly build and test.
|
cannam@124
|
12
|
cannam@124
|
13 --- How to Build the Loopback Test ---
|
cannam@124
|
14
|
cannam@124
|
15 The loopback test is not normally built by the makefile.
|
cannam@124
|
16 To build the loopback test, enter:
|
cannam@124
|
17
|
cannam@124
|
18 ./configure && make loopback
|
cannam@124
|
19
|
cannam@124
|
20 This will build the "bin/paloopback" executable.
|
cannam@124
|
21
|
cannam@124
|
22 --- How To Run Test ---
|
cannam@124
|
23
|
cannam@124
|
24 Connect stereo cables from one or more output audio devices to audio input devices.
|
cannam@124
|
25 The test will scan all the ports and find the cables.
|
cannam@124
|
26
|
cannam@124
|
27 Adjust the volume levels of the hardware so you get a decent signal that will not clip.
|
cannam@124
|
28
|
cannam@124
|
29 Run the test from the command line with the following options:
|
cannam@124
|
30
|
cannam@124
|
31 -i# Input device ID. Will scan for loopback if not specified.
|
cannam@124
|
32 -o# Output device ID. Will scan for loopback if not specified.
|
cannam@124
|
33 -r# Sample Rate in Hz. Will use multiple common rates if not specified.
|
cannam@124
|
34 -s# Size of callback buffer in frames, framesPerBuffer.
|
cannam@124
|
35 -w Save bad recordings in a WAV file.
|
cannam@124
|
36 -dDir Path for Directory for WAV files. Default is current directory.
|
cannam@124
|
37 -m Just test the DSP Math code and not the audio devices.
|
cannam@124
|
38
|
cannam@124
|
39 If the -w option is set then any tests that fail will save the recording of the broken
|
cannam@124
|
40 channel in a WAV file. The files will be numbered and shown in the report.
|
cannam@124
|
41
|
cannam@124
|
42 --- ToDo ---
|
cannam@124
|
43
|
cannam@124
|
44 * Add check for harmonic and enharmonic distortion.
|
cannam@124
|
45 * Measure min/max peak values.
|
cannam@124
|
46 * Detect DC bias.
|
cannam@124
|
47 * Test against matrix of devices/APIs and settings.
|
cannam@124
|
48 * Detect mono vs stereo loopback.
|
cannam@124
|
49 * More command line options
|
cannam@124
|
50 --quick
|
cannam@124
|
51 --latency
|
cannam@124
|
52 --duration
|
cannam@124
|
53 * Automated build and test script with cron job.
|
cannam@124
|
54 * Test on Windows.
|
cannam@124
|
55
|
cannam@124
|
56
|
cannam@124
|
57 /*
|
cannam@124
|
58 * PortAudio Portable Real-Time Audio Library
|
cannam@124
|
59 * Latest Version at: http://www.portaudio.com
|
cannam@124
|
60 *
|
cannam@124
|
61 * Copyright (c) 1999-2008 Phil Burk and Ross Bencina
|
cannam@124
|
62 *
|
cannam@124
|
63 * Permission is hereby granted, free of charge, to any person obtaining
|
cannam@124
|
64 * a copy of this software and associated documentation files
|
cannam@124
|
65 * (the "Software"), to deal in the Software without restriction,
|
cannam@124
|
66 * including without limitation the rights to use, copy, modify, merge,
|
cannam@124
|
67 * publish, distribute, sublicense, and/or sell copies of the Software,
|
cannam@124
|
68 * and to permit persons to whom the Software is furnished to do so,
|
cannam@124
|
69 * subject to the following conditions:
|
cannam@124
|
70 *
|
cannam@124
|
71 * The above copyright notice and this permission notice shall be
|
cannam@124
|
72 * included in all copies or substantial portions of the Software.
|
cannam@124
|
73 *
|
cannam@124
|
74 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
cannam@124
|
75 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
cannam@124
|
76 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
cannam@124
|
77 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
cannam@124
|
78 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
cannam@124
|
79 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
cannam@124
|
80 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
cannam@124
|
81 */
|
cannam@124
|
82
|
cannam@124
|
83 /*
|
cannam@124
|
84 * The text above constitutes the entire PortAudio license; however,
|
cannam@124
|
85 * the PortAudio community also makes the following non-binding requests:
|
cannam@124
|
86 *
|
cannam@124
|
87 * Any person wishing to distribute modifications to the Software is
|
cannam@124
|
88 * requested to send the modifications to the original developer so that
|
cannam@124
|
89 * they can be incorporated into the canonical version. It is also
|
cannam@124
|
90 * requested that these non-binding requests be included along with the
|
cannam@124
|
91 * license above.
|
cannam@124
|
92 */
|