Commit Graph

7 Commits

Author SHA1 Message Date
Bill Somerville fdd69583ab
Use C++ classic locale for uses outside of Qt 2021-03-28 23:29:57 +01:00
Bill Somerville 9c22b5c3ed
Qt v5.15 compatibility 2020-06-13 16:04:41 +01:00
Bill Somerville 350391d66e AAdded audio o/p category to playback options 2019-05-11 16:43:48 +01:00
Bill Somerville c393740b0a Fix an off by error 2019-05-11 01:57:56 +01:00
Bill Somerville 8d6c7649e0 Repaired a defect in the calculation of delay before starting audio streams 2019-05-10 20:31:16 +01:00
Bill Somerville 62f9b32758 Added playback to record_time_signal tool
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.
2019-05-10 19:38:04 +01:00
Bill Somerville 3a3af42cc6 Tool to exercise QAudioInput
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.
2019-05-10 17:27:52 +01:00