As Wikipedia says, resampling
is the process of changing the sampling rate of a discrete signal to obtain a new discrete representation of the underlying continuous signal.
When continuous signal is provided, it is desirable to represent it in computer memory. As it is known, computers operate on discrete numbers, precisely on bit words. Sampling is a process of reduction continuous signal to a discrete signal that is representable as bit words.
The continuous signal S(t) is being measured every T seconds, which is called the sampling interval. Now, it is possible to represent the signal as series of points in time, i, starting from some specific point T0, associated with the measured value, Si. Expression is called sampling frequency or sampling rate; the average number of samples obtained in one second.
DAB system works in four modes; each mode differs from other; see Table 1 below.
|Frame duration||96 ms||24 ms||24 ms||48 ms|
|Elementary period T||488.3 ns (1/2048000 s)|
|Frame duration as multiple of T||196608 T||98304 T||49152 T||49152 T|
Normally, DAB uses 2.048 MHz sampling rate with a period T of 0.48828µs. Fetching data from the air is easy – tuner sampling frequency can be adjusted to fit the DAB one. When fetching data from previously recorded file – computationally complex software processing is a must.
In general, the problem is to correctly compute signal values at arbitrary times from a set of discrete time samples of the signal amplitude. In order to change sampling frequency (resample), signal has to be interpolated between the samples.
Performance of libsamplerate has been measured at Arch Linux Advanced Linux Sound Architecture talk. 8 second 1-22050 Hz sine sweep; 32-bit signed integer PCM with 44.1 kHz sample rate and 48kHz output sample rate has given results shown in Table 2.
SRC_ZERO_ORDER_HOLD was omitted, because it adapts sampling frequency by simply copying the closest sample into the required place.
The quality parameter (interpolation method) is useful for controlling the quality/complexity tradeoff. In sdrdab
SRC_SINC_FASTEST is used, which is a reasonable compromise between precision and speed. This results in ~4-8% CPU utilization in regard to overall sdrdab computing power consumption.