1

I'm experimenting with SDR on MacOS High Sierra. Trying both CubeSDR and GQRX and experiencing similar issues with both. The applications seem to work, but the audio is choppy and chipmunk-like. Obviously a problem with buffering and sample-rate conversion. Both apps use SoapySDR.

I'm currently using a HackRF device, but will test with a stock RTL-SDR device and try and isolate the problem further.

If anyone has any ideas as to how to resolve this, I would be grateful.

update: the chipmunking has been solved by rolling back the HackRF firmware to API version 1.02 from API version 1.03. Audio is still choppy after a few seconds though. suspecting a hackrf library issue.

Mark
  • 111
  • 4
  • What audio rate do you set in your software? Try 44.1 kHz or 48 kHz. Also, make sure you set a SDR sampling rate the SDR device actually supports – your problem would also be symptomatic for e.g. setting 48 kHz audio rate and 4.8 MHz SDR rate, making the software think "great, so I just need to resample by a factor of 1/100", now if your hardware actually supports say 3 MHz, it silently "adjusts" your request for 4.8 MHz to 3 MHz, and you decimate that by 100, you end up with audio frequencies that are plain wrong, and a audio sample stream that is but 30,000 samples per second, where your – Marcus Müller Oct 05 '19 at 12:21
  • sound card tries to consume 48,000 per second – choppy audio with strangely high- or low-sounding sound is the result. in short: **check that all parts of your system actually do run at the rate you specify** – Marcus Müller Oct 05 '19 at 12:24
  • Audio S/R is permanently on 48kHz. Supported SDR Sampling rates are provided in the SDR software configuration dialogue drop-down menu. – Mark Oct 05 '19 at 14:03
  • And changing these rates doesn't help? Your update really indicates that setting a specific sampling rate simply went wrong and you got a different rate. – Marcus Müller Oct 05 '19 at 14:04
  • No, it doesn't. – Mark Oct 06 '19 at 00:35

1 Answers1

1

Check the sample rate configuration in the software you are using. Older Apple products used a hardware sample rate of 44.1 ksps, whereas newer Apple products all seem to use a hardware audio sample rate of 48k (or a multiple thereof).

hotpaw2
  • 13,116
  • 6
  • 40
  • 72
  • Do you have any evidence to support this? – Mark Oct 06 '19 at 00:37
  • aside from two expert suggesting it's audio sampling rates? – Marcus Müller Oct 06 '19 at 09:08
  • You're an electrical engineer. I'm a professional recording engineer. I do know a bit about how digital audio hardware works. So again, what is your evidence that "apple products all seem to use a hardware sample rate of 48k" That aside, if you have any useful suggestions as to why things are getting choppy that would be much appreciated. – Mark Oct 07 '19 at 11:32
  • @Mark it's just that I support a lot of people using GNU Radio (which I'm the head maintainer of), and that I do paid support for Ettus (which produce SDR devices), and that's just the number one reason and a sound explanation for what happens: The audio sampling rate your software "produces" is too low (on average) which leads to the exact two phenomena (which, as an recording engineer you'll certainly understand): 1. the audio buffers run empty, so that you get "chunky" audio output, 2. due to the "increased playback speed", the audio is frequency-scaled, ie. sounds higher than it should. – Marcus Müller Oct 08 '19 at 11:55
  • @Mark so I have experience and a mathematical explanation for the exact phenomenon you see, plus hotpaw2 contributes his Apple experience. – Marcus Müller Oct 08 '19 at 11:56
  • I'm all ears. Would love to hear what you have to contribute. – Mark Oct 08 '19 at 13:18