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