The tool may be started with either '-o <file-path>' to record or with
'-i <file-path>', where file-path is an existing .WAV file, to
playback audio. Audio output devices may be listed with the '-O'
option and selected by index number using the '-P <device-index>'
option. No format conversions are done for playback by the tool so the
output device must support the format of the input .WAV file. The
playback duration is the duration of the input .WAV file.
The tool '-s <start-second-in-minute>' option is now optional, without
it recording or playback starts immediately. So to playback a .WAV
file:
$ record_time_signal -i wwv.wav
To play back the same file stating at second 55 in the minute:
$ record_time_signal -i wwv.wav -s 55
Use the '-h' option for more help.
The tool record_time_signal is designed to measure the performance of
QAudioInput. The intended use is to record a short period of live
audio from an on-air time signal of known good quaility, the basic
required parameters are an audio input device, an output file name
(.WAV), a start second in a minute, and a duration in seconds. So for
example to record the time signal ticks and fast data at the top of
the minute:
$ record_time_signal -o wwv.wav -s 55 -d 15
will record 15s of audio at 48000Hz sample rate, stereo, from the
default audio input device, starting at second 55. This will use a
separate timer to stop the recording which is likely to leave the
output file a little short due to buffer latency. The buffer size can
be adjusted using the '-b <buffered-frames>' option.
The tool also supoorts a different mechanism to time the recording
which uses the audio progress via a notify signal. This should ensure
at least the requested duration is recorded The shorter the notify
interval the closer teh final size shoould be to the requested
duration. Use the '-d <interval-ms>' option to adjust the notify
interval.
$ record_time_signal -o wwv.wav -s 55 -d 15 -n 100
Non-default audio devices can be selected, use the '-I' option to list
the available input devices with an index number that can be used to
select the device using the 'R <device-number>' option.
Other options are available, use '-h' for details.