Git Product home page Git Product logo

nrsc5's People

Contributors

albert-s-briscoe avatar argilo avatar awesie avatar cjbarker avatar davide125 avatar farlies avatar icb- avatar japm48 avatar keysersoze1 avatar logiconcepts819 avatar mikerich88 avatar supersat avatar trs79 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nrsc5's Issues

Update README to show example of usage without piping to external player

In light of #92 I discovered that the README under example usage doesn't include an example of how to use it without piping the audio to a external player.

Probably would be helpful for new users if there was a example such as nrsc5 90.5 0 to indicate that it doesn't need to be piped to a external player.

Basic samp_rate & data encoding format for use w/GNU Radio

I've tried piping my own data into nrsc5 and I've also tried reading in your sample file. I could futz with it for another hour, but it would be useful if you told us what the sample rate and encoding was of the sample file in the /support directory.

My current guess (since I can't demod it normally):
samp_rate = 1488375
encoding = interleaved signed short (16 bit I, 16 bit Q)

When I use your tool the file is around 9 seconds long, which at 1448KHz sample rate would be about 4 bytes per sample.

What do I have wrong? Is there a header in the sample file?

Windows?

Can this be built for Windows?

Better version management in brew and also version identification

I have used homebrew for many years though I haven't used alternative --HEAD.

It appears that brew doesn't update existing nrsc5 installations. It kept saying that HEAD-320784d
was already installed. You must uninstall nsrc5, then reinstall it. Then it rebuilds it and reflects, HEAD-1bd3f79.

Separately, could you please add a --version option to nrsc5? That would permit users to quickly confirm that they are using the latest release.

Include path not properly set in CMake build definitions

The include path is not properly set in the CMake build definitions. This causes problems when headers are not in the compiler default location. When building, this results in the compiler being unable to find fftw3.h. This can be fixed by passing the include directory(ies) for the libraries to include_directories in CMake.

This is probably not a problem for the developers if their compiler include path covers the headers for all of the dependencies. I use MacOS with MacPorts, which places headers in /opt/local/include, outside of the compiler include path.

I have fixed this with these changes, however this assumes that fftw3.h is in the same location as the rest of the headers.
https://gist.github.com/docprofsky/3ab3e1e4e29ea534548595d9437fa3c7

Extracting IDv3 info from NRSC5 and passing to MPV

I see that NRSC can see INFO tags including Title and Artist.

I also see @argilo 's commits for ID3v2
320784d

Is it possible to extract title, artist and album art and pass it through a pipe to a player like MPV?

This would seem a cleaner approach than the more verbose logging mode (-l 2) in NRSC.

rtl_tcp support

So I thought it might be useful to have rtl_tcp support built in.

Analog to Digital migration behavior to match a physical HD radio?

Now, I'm thinking this may be far too much work with little benefit but I'll throw the idea out anyway.

Is it possible to start with Analog FM and than once the digital channel has been acquired than switch to digital?

Basically the goal of matching the behavior of how a physical HD radio works.

Thanks!

NRSC stops after about 45 minutes

I am finding that NRSC is ceasing to pipe audio to SOX PLAY/MPV after about 45-50min. The timer on SOX / MPV ceases to count upward.

Typical Mac Terminal output is as follows. I can create an ADTS dump file if necessary. My exact settings are per the shell script described in Issue 49.

Tuning to the radio station: 90.1 Mhz HD1
Playing: -
[file] Reading from stdin...
Found Rafael Micro R820T tuner
Exact sample rate is: 1488375.071248 Hz
 (+) Audio --aid=1 (pcm_s16le 2ch 44100Hz)
AO: [coreaudio] 48000Hz stereo 2ch float
Unexpected block type: 2, expected 6
Unexpected block type: 0, expected 6
Unexpected block type: 1, expected 6
Unexpected block type: 7, expected 6
Unexpected block type: 5, expected 6
Unexpected block type: 0, expected 6
Unexpected block type: 7, expected 6
Unexpected block type: 0, expected 6
Unexpected block type: 3, expected 6
Unexpected block type: 0, expected 6
Unexpected block type: 4, expected 6
Unexpected block type: 0, expected 6
Unexpected block type: 5, expected 6
Unexpected block type: 1, expected 6
Unexpected block type: 1, expected 6
Unexpected block type: 0, expected 6
Unexpected block type: 1, expected 6
Unexpected block type: 5, expected 6
Unexpected block type: 0, expected 6
Unexpected block type: 5, expected 6
Unexpected block type: 4, expected 6
Unexpected block type: 2, expected 6
^C 00:45:32 / 00:00:00

Make fails while building liquid-dsp_external

Compile attempted on Kali4. All dependencies installed and current.
Also, thank you for your work.

[ 51%] Performing build step for 'liquid-dsp_external'
In file included from src/dotprod/src/dotprod_cccf.mmx.c:49:0:
src/dotprod/src/dotprod_cccf.mmx.c: In function ‘dotprod_cccf_execute_mmx’:
/usr/lib/gcc/i686-linux-gnu/5/include/pmmintrin.h:50:1: error: inlining failed in call to always_inline ‘_mm_addsub_ps’: target specific option mismatch
 _mm_addsub_ps (__m128 __X, __m128 __Y)
 ^
src/dotprod/src/dotprod_cccf.mmx.c:255:11: error: called from here
         s = _mm_addsub_ps( ci, cq );
           ^
In file included from src/dotprod/src/dotprod_cccf.mmx.c:49:0:
/usr/lib/gcc/i686-linux-gnu/5/include/pmmintrin.h:50:1: error: inlining failed in call to always_inline ‘_mm_addsub_ps’: target specific option mismatch
 _mm_addsub_ps (__m128 __X, __m128 __Y)
 ^
src/dotprod/src/dotprod_cccf.mmx.c:255:11: error: called from here
         s = _mm_addsub_ps( ci, cq );
           ^
<builtin>: recipe for target 'src/dotprod/src/dotprod_cccf.mmx.o' failed
make[3]: *** [src/dotprod/src/dotprod_cccf.mmx.o] Error 1
CMakeFiles/liquid-dsp_external.dir/build.make:111: recipe for target 'liquid-dsp-prefix/src/liquid-dsp_external-stamp/liquid-dsp_external-build' failed
make[2]: *** [liquid-dsp-prefix/src/liquid-dsp_external-stamp/liquid-dsp_external-build] Error 2
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/liquid-dsp_external.dir/all' failed
make[1]: *** [CMakeFiles/liquid-dsp_external.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Switch program streams on the fly

So i'm curious if it's possible to switch between the different programs a station may have without having quit the program in again and going though the entire process again.

I think this also goes back to one of my earlier issues in which you said this needs a GUI.

Perhaps this is too much work or not possible.

What do you think?

How to tell if there's an HD signal?

I love that someone has finally done this, so first of all, congratulations on this fine work. I use RTL SDR with analog FM already on a daily basis so I'm really hoping to just drop in your program to replace the FM SDR program I use already. However, I am having a problem. The station I care about most is our local classical station. They are HD-enabled, but I am not getting the signal. The analog signal comes in fine. I have no other HD Radio to verify things with: one car we have is a 2009 and the other is a 2003(!!). I thought I remembered hearing they had a technical failure that affected HD but this has been months ago. I look at an FFT graph and see no "lobes". On other stations, I see them. Is there any way to get an idea of if a station has HD, and the problem is with me and my reception, or if there is no signal right now and I just have to wait until they come back on air?

Outputing the provided sample file or any capture to wav produces an unplayable file.

I unpacked the sample file and ran it through the software with the output to wav option. It produced a file 68 bytes in size that is unplayable. I also captured samples of a strong local signal. The local signal produced a 103MB sized file, but when I tried to output the sample to wav it produced a file 68 bytes in size that was also unplayable. This is happening on the recent ARM build that succeeded after removing the -msse2 flag.

AM NRSC-5

Would it be possible to add support for the AM Broadcast band? From what I understand the sidebands are much more narrow and use much higher order modulation.

Benchmarking speed of tuner auto gain control for RTL_FM v NRSC

Just wondering why the AGC tuning takes so much longer in NRSC v RTL_FM.

Tuning FM 90.1 with this RTL_FM consistently takes less than a second including the auto gain control, using a 2017 iMac.
rtl_fm -M wbfm -f 90.1M | play -r 32k -t raw -e s -b 16 -c 1 -V1 -
Tuning the same station with NRSC, the AGC testing alone (just separate from decoding digital feed) takes between 4-8 seconds. Total time from start to synchronization takes between 8-12 seconds.

Not sure if this is a true apples to apples comparison of the two AGCs. But thought it was valuable to document. Oddly, if I restart NRSC over and over again every 30 seconds, I get a different "best gain" result. Sometimes, 120 best gain, other times 200. Tested dB before determining best gain also varies considerably in hammer testing. Sometimes low 20s. other times 40+ dB.

Found Rafael Micro R820T tuner Exact sample rate is: 1488375.071248 Hz 14:48:37 INFO main.c:63: Gain: 0.0 dB, CNR: 5.792418 dB 14:48:37 INFO main.c:63: Gain: 0.9 dB, CNR: 8.088401 dB 14:48:37 INFO main.c:63: Gain: 1.4 dB, CNR: 8.523772 dB 14:48:38 INFO main.c:63: Gain: 2.7 dB, CNR: 9.771772 dB 14:48:38 INFO main.c:63: Gain: 3.7 dB, CNR: 10.299677 dB 14:48:38 INFO main.c:63: Gain: 7.7 dB, CNR: 10.275181 dB 14:48:38 INFO main.c:63: Gain: 8.7 dB, CNR: 10.556330 dB 14:48:38 INFO main.c:63: Gain: 12.5 dB, CNR: 10.545234 dB 14:48:38 INFO main.c:63: Gain: 14.4 dB, CNR: 10.643739 dB 14:48:39 INFO main.c:63: Gain: 15.7 dB, CNR: 10.469473 dB 14:48:39 INFO main.c:63: Gain: 16.6 dB, CNR: 8.750142 dB 14:48:39 INFO main.c:63: Gain: 19.7 dB, CNR: 9.875199 dB 14:48:39 INFO main.c:63: Gain: 20.7 dB, CNR: 10.480328 dB 14:48:39 INFO main.c:63: Gain: 22.9 dB, CNR: 9.716369 dB 14:48:39 INFO main.c:63: Gain: 25.4 dB, CNR: 10.508485 dB 14:48:40 INFO main.c:63: Gain: 28.0 dB, CNR: 8.977230 dB 14:48:40 INFO main.c:63: Gain: 29.7 dB, CNR: 9.847438 dB 14:48:40 INFO main.c:63: Gain: 32.8 dB, CNR: 8.676806 dB 14:48:40 INFO main.c:63: Gain: 33.8 dB, CNR: 7.808435 dB 14:48:40 INFO main.c:63: Gain: 36.4 dB, CNR: 8.110155 dB 14:48:40 INFO main.c:63: Gain: 37.2 dB, CNR: 7.723773 dB 14:48:41 INFO main.c:63: Gain: 38.6 dB, CNR: 7.766683 dB 14:48:41 INFO main.c:63: Gain: 40.2 dB, CNR: 7.373116 dB 14:48:41 DEBUG main.c:67: Best gain: 144 14:48:44 DEBUG sync.c:267: First block @ 15 14:48:45 DEBUG sync.c:267: First block @ 0 14:48:45 INFO sync.c:245: Synchronized! 14:48:45 DEBUG pids.c:114: Station Name: WRTI-FM 14:48:45 DEBUG pids.c:103: Country: US, FCC facility ID: 65190

Here's another example, using WHYY

14:52:44 INFO main.c:183: [0] Generic RTL2832U OEM Found Rafael Micro R820T tuner Exact sample rate is: 1488375.071248 Hz 14:52:44 INFO main.c:63: Gain: 0.0 dB, CNR: 8.627121 dB 14:52:45 INFO main.c:63: Gain: 0.9 dB, CNR: 10.663241 dB 14:52:45 INFO main.c:63: Gain: 1.4 dB, CNR: 10.967073 dB 14:52:45 INFO main.c:63: Gain: 2.7 dB, CNR: 12.141378 dB 14:52:45 INFO main.c:63: Gain: 3.7 dB, CNR: 12.428569 dB 14:52:45 INFO main.c:63: Gain: 7.7 dB, CNR: 12.798332 dB 14:52:45 INFO main.c:63: Gain: 8.7 dB, CNR: 12.459588 dB 14:52:46 INFO main.c:63: Gain: 12.5 dB, CNR: 12.804129 dB 14:52:46 INFO main.c:63: Gain: 14.4 dB, CNR: 11.821280 dB 14:52:46 INFO main.c:63: Gain: 15.7 dB, CNR: 12.096880 dB 14:52:46 INFO main.c:63: Gain: 16.6 dB, CNR: 11.716665 dB 14:52:46 INFO main.c:63: Gain: 19.7 dB, CNR: 10.693796 dB 14:52:46 INFO main.c:63: Gain: 20.7 dB, CNR: 11.575437 dB 14:52:47 INFO main.c:63: Gain: 22.9 dB, CNR: 11.434118 dB 14:52:47 INFO main.c:63: Gain: 25.4 dB, CNR: 10.581103 dB 14:52:47 INFO main.c:63: Gain: 28.0 dB, CNR: 10.282454 dB 14:52:47 INFO main.c:63: Gain: 29.7 dB, CNR: 10.110866 dB 14:52:47 INFO main.c:63: Gain: 32.8 dB, CNR: 9.353167 dB 14:52:47 DEBUG main.c:67: Best gain: 125 14:52:50 DEBUG sync.c:267: First block @ 27 14:52:51 INFO sync.c:245: Synchronized!

SIS messages?

I'm interested in trying to use the SIS Parameter Message and possibly station location from the SIS PDU Messages to establish a crude time / location for a distributed sensing project, but it looks like this information isn't decoded right now. It looks like I'd need to start with frame.c - maybe in frame_process but I'd appreciate any pointers in the interim.

Cheers!

Limit PIDS message output?

This is a feature suggestion and perhaps an enhancement. Right now the FCC Facility ID and Call sign scroll by quickly making it difficult to read the other information. I figure it's decoded in real time as soon as it comes in.

Looks like it's decoded multiple times every second.

Perhaps there is a way to limit the rate that it decided perhaps making it easier to read the other information such as the song artist and title?

Permit frequency shorthand of "M" (e.g. 90.9M instead of 90900000)

In rtl_fm, you can specify a frequency of 90.9M instead of writing out all the zeros like 90900000.

In nrsc5, if you specify a frequency of 90.9M, it will do auto gain control but not play anything.

I have tried a number of stations with the same result. Unless I am missing something...

Stack smashing detected

While decoding a stream I received this message on the latest ARM experimental branch code:

DEBUG frame.c:168: pdu_seq: 0, seq: 62, nop: 33
*** stack smashing detected ***: nrsc5 terminated
Aborted (core dumped)

Sound artifacts

(EDIT: can't upload, so link here: http://www-ext.ajb.ddns.us/public/waer2.hdc)

I have come across an HD2 stream which exhibits some strange decoding artifacts. The stream seems to be lower bit rate than most other HD2 streams (it is 20-24 Kbps). I have attached the HDC stream, so it is hopefully easier to see what is different in this stream than using a WAV or ADTS output. I have a copy of the samples (-w option) but for 30 seconds the file is 102 MB even with XZ compression. Here is the log from nrsc5:

andrew@cheetah:~/Source/nrsc5$ ./src/nrsc5 -w waer2.bin -o waer2.hdc -f hdc 88.3 1
15:49:20 INFO main.c:195: [0] Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Exact sample rate is: 1488375.071248 Hz
[R82XX] PLL not locked!
15:49:21 INFO main.c:65: Gain: 0.0 dB, CNR: 3.881641 dB
15:49:21 INFO main.c:65: Gain: 0.9 dB, CNR: 4.964504 dB
15:49:21 INFO main.c:65: Gain: 1.4 dB, CNR: 5.897870 dB
15:49:21 INFO main.c:65: Gain: 2.7 dB, CNR: 7.068104 dB
15:49:21 INFO main.c:65: Gain: 3.7 dB, CNR: 8.563585 dB
15:49:21 INFO main.c:65: Gain: 7.7 dB, CNR: 10.021370 dB
15:49:21 INFO main.c:65: Gain: 8.7 dB, CNR: 11.230439 dB
15:49:21 INFO main.c:65: Gain: 12.5 dB, CNR: 12.968244 dB
15:49:21 INFO main.c:65: Gain: 14.4 dB, CNR: 13.270781 dB
15:49:21 INFO main.c:65: Gain: 15.7 dB, CNR: 13.878690 dB
15:49:21 INFO main.c:65: Gain: 16.6 dB, CNR: 14.144740 dB
15:49:21 INFO main.c:65: Gain: 19.7 dB, CNR: 15.064043 dB
15:49:21 INFO main.c:65: Gain: 20.7 dB, CNR: 15.176182 dB
15:49:21 INFO main.c:65: Gain: 22.9 dB, CNR: 15.483320 dB
15:49:21 INFO main.c:65: Gain: 25.4 dB, CNR: 15.320906 dB
15:49:21 INFO main.c:65: Gain: 28.0 dB, CNR: 13.060275 dB
15:49:21 INFO main.c:65: Gain: 29.7 dB, CNR: 10.318936 dB
15:49:21 DEBUG main.c:69: Best gain: 229
15:49:24 INFO acquire.c:104: Timing offset: 285.687500, slope: 4.707031 (adjust)
15:49:25 INFO input.c:163: CFO: 6540.710449 Hz (74 ppm)
15:49:25 DEBUG sync.c:270: First block @ 27
15:49:26 DEBUG sync.c:270: First block @ 0
15:49:26 INFO sync.c:248: Synchronized!
15:49:26 DEBUG pids.c:136: Station Name: WAER
15:49:26 DEBUG pids.c:119: Country: US, FCC facility ID: 64354
15:49:26 DEBUG pids.c:270: Audio program 0: public, type 0, sound experience 0
15:49:26 DEBUG pids.c:270: Audio program 1: public, type 0, sound experience 0
15:49:27 DEBUG pids.c:270: Audio program 2: public, type 0, sound experience 0
15:49:27 DEBUG pids.c:196: Station location: 43.033691 -179.869019, 192m
15:49:27 DEBUG pids.c:398: Slogan: WAER
15:49:27 DEBUG pids.c:169: Long station name: WAER
15:49:28 INFO sync.c:324: MER: 11.789657 dB (lower), 12.490125 dB (upper)
15:49:28 INFO decode.c:77: BER: 0.000306, avg: 0.000306, min: 0.000306, max: 0.000306
15:49:28 DEBUG output.c:382: Title: Jazz on WAER
15:49:28 DEBUG frame.c:465: ignoring partial pdu
15:49:29 DEBUG pids.c:317: Pending leap second offset: 0, current leap second offset: 18
15:49:29 INFO sync.c:324: MER: 12.724352 dB (lower), 13.212567 dB (upper)
15:49:29 INFO decode.c:77: BER: 0.000249, avg: 0.000278, min: 0.000249, max: 0.000306
15:49:29 DEBUG output.c:382: Title: Jazz on WAER
15:49:29 DEBUG output.c:127: Audio bit rate: 21.3 kbps
15:49:31 DEBUG acquire.c:99: Timing offset: 383.312500, slope: 0.355469
15:49:31 DEBUG pids.c:322: ALFN of pending leap second adjustment: 0
15:49:31 DEBUG pids.c:328: Local time zone offset: -480 minutes, DST sched. 1, local DST? yes, regional DST? yes
15:49:31 INFO sync.c:324: MER: 12.539015 dB (lower), 13.263510 dB (upper)
15:49:31 INFO decode.c:77: BER: 0.000224, avg: 0.000260, min: 0.000224, max: 0.000306
15:49:31 DEBUG output.c:382: Title: Jazz on WAER
15:49:31 DEBUG output.c:127: Audio bit rate: 22.1 kbps
15:49:32 INFO sync.c:324: MER: 12.628249 dB (lower), 13.230733 dB (upper)
15:49:32 INFO decode.c:77: BER: 0.000252, avg: 0.000258, min: 0.000224, max: 0.000306
15:49:32 DEBUG output.c:382: Title: Jazz on WAER
15:49:32 DEBUG output.c:382: Title: Jazz on WAER
15:49:32 DEBUG output.c:127: Audio bit rate: 23.1 kbps
15:49:34 DEBUG acquire.c:99: Timing offset: 394.687500, slope: 0.332031
15:49:34 INFO sync.c:324: MER: 12.784842 dB (lower), 13.333170 dB (upper)
15:49:34 INFO decode.c:77: BER: 0.000241, avg: 0.000254, min: 0.000224, max: 0.000306
15:49:34 DEBUG output.c:382: Title: Jazz on WAER
15:49:34 DEBUG output.c:127: Audio bit rate: 21.9 kbps
15:49:35 INFO sync.c:324: MER: 12.858532 dB (lower), 13.515463 dB (upper)
15:49:35 INFO decode.c:77: BER: 0.000263, avg: 0.000256, min: 0.000224, max: 0.000306
15:49:35 INFO frame.c:331: Subchannel 0: mode=0, length=937
15:49:35 INFO frame.c:331: Subchannel 1: mode=0, length=0
15:49:35 INFO frame.c:331: Subchannel 2: mode=0, length=0
15:49:35 DEBUG output.c:499: missing port 0402
15:49:35 DEBUG output.c:499: missing port 0401
15:49:35 DEBUG output.c:382: Title: Jazz on WAER
15:49:35 DEBUG output.c:127: Audio bit rate: 21.5 kbps
15:49:36 DEBUG acquire.c:99: Timing offset: 406.000000, slope: 0.375000
15:49:37 INFO sync.c:324: MER: 12.590753 dB (lower), 13.070296 dB (upper)
15:49:37 INFO decode.c:77: BER: 0.000244, avg: 0.000254, min: 0.000224, max: 0.000306
15:49:37 DEBUG output.c:415: 40 01 00 5C
15:49:37 DEBUG output.c:429: Found WAER
15:49:37 DEBUG output.c:438: Port 401, type 3, size 265
15:49:37 DEBUG output.c:415: 40 02 00 49
15:49:37 DEBUG output.c:429: Found JAZZ88
15:49:37 DEBUG output.c:438: Port 402, type 3, size 265
15:49:37 DEBUG output.c:415: 40 03 00 25
15:49:37 DEBUG output.c:429: Found ALT88
15:49:37 DEBUG output.c:438: Port 403, type 3, size 265
15:49:37 DEBUG output.c:382: Title: Jazz on WAER
15:49:37 DEBUG output.c:382: Title: Jazz on WAER
15:49:37 DEBUG output.c:127: Audio bit rate: 22.2 kbps
15:49:38 INFO sync.c:324: MER: 12.698212 dB (lower), 13.239897 dB (upper)
15:49:38 INFO decode.c:77: BER: 0.000241, avg: 0.000252, min: 0.000224, max: 0.000306
15:49:38 DEBUG output.c:382: Title: Jazz on WAER
15:49:38 DEBUG output.c:127: Audio bit rate: 22.3 kbps
15:49:39 DEBUG acquire.c:99: Timing offset: 416.937500, slope: 0.316406
15:49:40 INFO sync.c:324: MER: 12.108592 dB (lower), 12.525137 dB (upper)
15:49:40 INFO decode.c:77: BER: 0.000252, avg: 0.000252, min: 0.000224, max: 0.000306
15:49:40 DEBUG output.c:522: 00000001 7EBA5CEE 1E653E9C
15:49:40 INFO output.c:546: File SLWAERHD020100HD2.jpg, size 12796
15:49:40 DEBUG output.c:382: Title: Jazz on WAER
15:49:40 DEBUG output.c:127: Audio bit rate: 22.7 kbps
15:49:41 INFO sync.c:324: MER: 12.348975 dB (lower), 12.998623 dB (upper)
15:49:41 INFO decode.c:77: BER: 0.000241, avg: 0.000251, min: 0.000224, max: 0.000306
15:49:41 DEBUG output.c:382: Title: Jazz on WAER
15:49:41 DEBUG output.c:382: Title: Jazz on WAER
15:49:41 DEBUG output.c:127: Audio bit rate: 21.7 kbps
15:49:42 DEBUG acquire.c:99: Timing offset: 427.375000, slope: 0.226562
15:49:43 INFO sync.c:324: MER: 12.702000 dB (lower), 13.052401 dB (upper)
15:49:43 INFO decode.c:77: BER: 0.000224, avg: 0.000249, min: 0.000224, max: 0.000306
15:49:43 INFO frame.c:266: psd crc mismatch
15:49:43 DEBUG output.c:127: Audio bit rate: 22.6 kbps
15:49:44 INFO sync.c:324: MER: 12.559231 dB (lower), 13.063866 dB (upper)
15:49:44 INFO decode.c:77: BER: 0.000192, avg: 0.000244, min: 0.000192, max: 0.000306
15:49:44 DEBUG output.c:382: Title: Jazz on WAER from Syracuse University
15:49:44 DEBUG output.c:127: Audio bit rate: 22.5 kbps
15:49:45 DEBUG acquire.c:99: Timing offset: 438.500000, slope: 0.281250
15:49:46 INFO sync.c:324: MER: 12.458931 dB (lower), 12.918115 dB (upper)
15:49:46 INFO decode.c:77: BER: 0.000263, avg: 0.000245, min: 0.000192, max: 0.000306
15:49:46 DEBUG output.c:382: Title: Jazz on WAER from Syracuse University
15:49:46 DEBUG output.c:127: Audio bit rate: 21.9 kbps
15:49:47 INFO sync.c:324: MER: 12.464525 dB (lower), 13.060993 dB (upper)
15:49:47 INFO decode.c:77: BER: 0.000170, avg: 0.000240, min: 0.000170, max: 0.000306
15:49:47 DEBUG output.c:382: Title: Jazz on WAER from Syracuse University
15:49:47 DEBUG output.c:127: Audio bit rate: 22.4 kbps
15:49:48 DEBUG acquire.c:99: Timing offset: 449.062500, slope: 0.246094
15:49:49 INFO sync.c:324: MER: 11.635267 dB (lower), 12.230624 dB (upper)
15:49:49 INFO decode.c:77: BER: 0.000293, avg: 0.000244, min: 0.000170, max: 0.000306
15:49:49 DEBUG output.c:382: Title: Jazz on WAER from Syracuse University
15:49:49 DEBUG output.c:127: Audio bit rate: 22.3 kbps
15:49:50 INFO sync.c:324: MER: 12.275430 dB (lower), 12.745238 dB (upper)
15:49:50 INFO decode.c:77: BER: 0.000249, avg: 0.000244, min: 0.000170, max: 0.000306
15:49:50 DEBUG output.c:382: Title: Jazz on WAER from Syracuse University
15:49:50 DEBUG output.c:127: Audio bit rate: 21.9 kbps
15:49:51 DEBUG acquire.c:99: Timing offset: 460.187500, slope: 0.425781
15:49:52 INFO sync.c:324: MER: 12.433390 dB (lower), 12.900963 dB (upper)
15:49:52 INFO decode.c:77: BER: 0.000175, avg: 0.000240, min: 0.000170, max: 0.000306
15:49:52 DEBUG output.c:382: Title: Jazz on WAER from Syracuse University
15:49:52 DEBUG output.c:127: Audio bit rate: 22.6 kbps
15:49:53 INFO sync.c:324: MER: 11.566653 dB (lower), 12.095470 dB (upper)
15:49:53 INFO decode.c:77: BER: 0.000290, avg: 0.000243, min: 0.000170, max: 0.000306
15:49:53 DEBUG output.c:382: Title: Jazz on WAER from Syracuse University
15:49:53 DEBUG output.c:127: Audio bit rate: 22.2 kbps
15:49:54 DEBUG acquire.c:99: Timing offset: 471.125000, slope: 0.304688
15:49:55 INFO sync.c:324: MER: 12.751174 dB (lower), 13.036755 dB (upper)
15:49:55 INFO decode.c:77: BER: 0.000230, avg: 0.000242, min: 0.000170, max: 0.000306
15:49:55 DEBUG output.c:382: Title: Jazz on WAER from Syracuse University
15:49:55 DEBUG output.c:127: Audio bit rate: 22.5 kbps
15:49:56 INFO sync.c:324: MER: 11.907716 dB (lower), 12.302773 dB (upper)
15:49:56 INFO decode.c:77: BER: 0.000233, avg: 0.000241, min: 0.000170, max: 0.000306
15:49:56 DEBUG output.c:382: Title: Jazz on WAER from Syracuse University
15:49:56 DEBUG output.c:127: Audio bit rate: 22.2 kbps
15:49:57 DEBUG acquire.c:99: Timing offset: 482.437500, slope: 0.285156
15:49:58 INFO sync.c:324: MER: 12.401589 dB (lower), 12.894782 dB (upper)
15:49:58 INFO decode.c:77: BER: 0.000249, avg: 0.000242, min: 0.000170, max: 0.000306
15:49:58 DEBUG output.c:382: Title: Jazz on WAER from Syracuse University
15:49:58 DEBUG output.c:127: Audio bit rate: 22.5 kbps
15:49:59 INFO sync.c:324: MER: 12.709877 dB (lower), 13.236389 dB (upper)
15:49:59 INFO decode.c:77: BER: 0.000219, avg: 0.000241, min: 0.000170, max: 0.000306
15:49:59 DEBUG output.c:382: Title: Jazz on WAER from Syracuse University
15:49:59 DEBUG output.c:127: Audio bit rate: 22.1 kbps
15:50:00 DEBUG acquire.c:99: Timing offset: 493.000000, slope: 0.312500
15:50:00 INFO sync.c:324: MER: 12.887310 dB (lower), 13.420171 dB (upper)
15:50:00 INFO decode.c:77: BER: 0.000282, avg: 0.000243, min: 0.000170, max: 0.000306
15:50:00 DEBUG output.c:382: Title: Jazz on WAER from Syracuse University
15:50:00 DEBUG output.c:127: Audio bit rate: 21.7 kbps
15:50:02 INFO sync.c:324: MER: 12.746115 dB (lower), 13.331119 dB (upper)
15:50:02 INFO decode.c:77: BER: 0.000189, avg: 0.000240, min: 0.000170, max: 0.000306
15:50:02 DEBUG output.c:522: 00000001 7EBA5CF1 1E653E9C
15:50:02 INFO output.c:546: File SLWAER 010100HD1.jpg, size 11072
15:50:02 DEBUG output.c:382: Title: Jazz on WAER from Syracuse University
15:50:02 DEBUG output.c:127: Audio bit rate: 22.4 kbps

Input buffer overflow

While using a bluetooth headset on ARM experimental branch I received this error:

03:00:59 WARN input.c:239: input buffer overflow!
Segmentation fault (core dumped)

It happens while using bluettooth audio. I can test the behavior on x86 as well if you would like.

A Scan feature?

Curious what people think of a scan feature that would scan the FMBC band for stations that have HD service.

Basically it would scan the FMBC band and output which frequencies that it found HD service for.

Unsure how much work it would be the implement but it could be useful for new users.

Cygwin x86 (32 bit) compilation fails

Compilation is failing because of some issue with CMPLXF. I have verified that complex.h exists in the Cygwin environment.

[ 50%] Building C object src/CMakeFiles/nrsc5.dir/acquire.c.o
In file included from /home/dan/git/nrsc5/src/acquire.c:20:0:
/home/dan/git/nrsc5/src/defines.h: In function ‘cq15_to_cf’:
/home/dan/git/nrsc5/src/defines.h:55:12: warning: implicit declaration of function ‘CMPLXF’ [-Wimplicit-function-declaration]
return CMPLXF((float)cq15.r / 32767.0f, (float)cq15.i / 32767.0f);
^
[ 52%] Building C object src/CMakeFiles/nrsc5.dir/decode.c.o
In file included from /home/dan/git/nrsc5/src/decode.h:4:0,
from /home/dan/git/nrsc5/src/decode.c:19:
/home/dan/git/nrsc5/src/defines.h: In function ‘cq15_to_cf’:
/home/dan/git/nrsc5/src/defines.h:55:12: warning: implicit declaration of function ‘CMPLXF’ [-Wimplicit-function-declaration]
return CMPLXF((float)cq15.r / 32767.0f, (float)cq15.i / 32767.0f);
^
[ 55%] Building C object src/CMakeFiles/nrsc5.dir/frame.c.o
In file included from /home/dan/git/nrsc5/src/frame.c:18:0:
/home/dan/git/nrsc5/src/defines.h: In function ‘cq15_to_cf’:
/home/dan/git/nrsc5/src/defines.h:55:12: warning: implicit declaration of function ‘CMPLXF’ [-Wimplicit-function-declaration]
return CMPLXF((float)cq15.r / 32767.0f, (float)cq15.i / 32767.0f);
^
[ 58%] Building C object src/CMakeFiles/nrsc5.dir/hdc_to_aac.c.o
[ 61%] Building C object src/CMakeFiles/nrsc5.dir/input.c.o
In file included from /home/dan/git/nrsc5/src/input.c:20:0:
/home/dan/git/nrsc5/src/defines.h: In function ‘cq15_to_cf’:
/home/dan/git/nrsc5/src/defines.h:55:12: warning: implicit declaration of function ‘CMPLXF’ [-Wimplicit-function-declaration]
return CMPLXF((float)cq15.r / 32767.0f, (float)cq15.i / 32767.0f);
^
[ 64%] Building C object src/CMakeFiles/nrsc5.dir/main.c.o
In file included from /home/dan/git/nrsc5/src/main.c:32:0:
/home/dan/git/nrsc5/src/defines.h: In function ‘cq15_to_cf’:
/home/dan/git/nrsc5/src/defines.h:55:12: warning: implicit declaration of function ‘CMPLXF’ [-Wimplicit-function-declaration]
return CMPLXF((float)cq15.r / 32767.0f, (float)cq15.i / 32767.0f);
^
[ 67%] Building C object src/CMakeFiles/nrsc5.dir/output.c.o
In file included from /home/dan/git/nrsc5/src/output.c:23:0:
/home/dan/git/nrsc5/src/defines.h: In function ‘cq15_to_cf’:
/home/dan/git/nrsc5/src/defines.h:55:12: warning: implicit declaration of function ‘CMPLXF’ [-Wimplicit-function-declaration]
return CMPLXF((float)cq15.r / 32767.0f, (float)cq15.i / 32767.0f);
^
[ 70%] Building C object src/CMakeFiles/nrsc5.dir/pids.c.o
In file included from /home/dan/git/nrsc5/src/pids.c:18:0:
/home/dan/git/nrsc5/src/defines.h: In function ‘cq15_to_cf’:
/home/dan/git/nrsc5/src/defines.h:55:12: warning: implicit declaration of function ‘CMPLXF’ [-Wimplicit-function-declaration]
return CMPLXF((float)cq15.r / 32767.0f, (float)cq15.i / 32767.0f);
^
[ 73%] Building C object src/CMakeFiles/nrsc5.dir/sync.c.o
In file included from /home/dan/git/nrsc5/src/sync.c:18:0:
/home/dan/git/nrsc5/src/defines.h: In function ‘cq15_to_cf’:
/home/dan/git/nrsc5/src/defines.h:55:12: warning: implicit declaration of function ‘CMPLXF’ [-Wimplicit-function-declaration]
return CMPLXF((float)cq15.r / 32767.0f, (float)cq15.i / 32767.0f);
^
[ 76%] Building C object src/CMakeFiles/nrsc5.dir/firdecim_q15.c.o
In file included from /home/dan/git/nrsc5/src/firdecim_q15.h:3:0,
from /home/dan/git/nrsc5/src/firdecim_q15.c:12:
/home/dan/git/nrsc5/src/defines.h: In function ‘cq15_to_cf’:
/home/dan/git/nrsc5/src/defines.h:55:12: warning: implicit declaration of function ‘CMPLXF’ [-Wimplicit-function-declaration]
return CMPLXF((float)cq15.r / 32767.0f, (float)cq15.i / 32767.0f);
^
[ 79%] Building C object src/CMakeFiles/nrsc5.dir/firdes_kaiser.c.o
[ 82%] Building C object src/CMakeFiles/nrsc5.dir/resamp_q15.c.o
In file included from /home/dan/git/nrsc5/src/resamp_q15.h:3:0,
from /home/dan/git/nrsc5/src/resamp_q15.c:12:
/home/dan/git/nrsc5/src/defines.h: In function ‘cq15_to_cf’:
/home/dan/git/nrsc5/src/defines.h:55:12: warning: implicit declaration of function ‘CMPLXF’ [-Wimplicit-function-declaration]
return CMPLXF((float)cq15.r / 32767.0f, (float)cq15.i / 32767.0f);
^
[ 85%] Building C object src/CMakeFiles/nrsc5.dir/math.c.o
In file included from /home/dan/git/nrsc5/src/math.c:1:0:
/home/dan/git/nrsc5/src/defines.h: In function ‘cq15_to_cf’:
/home/dan/git/nrsc5/src/defines.h:55:12: warning: implicit declaration of function ‘CMPLXF’ [-Wimplicit-function-declaration]
return CMPLXF((float)cq15.r / 32767.0f, (float)cq15.i / 32767.0f);
^
[ 88%] Building C object src/CMakeFiles/nrsc5.dir/conv_dec.c.o
In file included from /home/dan/git/nrsc5/src/conv_dec.c:30:0:
/home/dan/git/nrsc5/src/defines.h: In function ‘cq15_to_cf’:
/home/dan/git/nrsc5/src/defines.h:55:12: warning: implicit declaration of function ‘CMPLXF’ [-Wimplicit-function-declaration]
return CMPLXF((float)cq15.r / 32767.0f, (float)cq15.i / 32767.0f);
^
In file included from /home/dan/git/nrsc5/src/conv_dec.c:38:0:
/home/dan/git/nrsc5/src/conv_dec.c: At top level:
/home/dan/git/nrsc5/src/conv_gen.h:129:13: warning: ‘gen_metrics_k5_n2’ defined but not used [-Wunused-function]
static void gen_metrics_k5_n2(const int8_t *seq, const int16_t *out,
^
/home/dan/git/nrsc5/src/conv_gen.h:138:13: warning: ‘gen_metrics_k5_n3’ defined but not used [-Wunused-function]
static void gen_metrics_k5_n3(const int8_t *seq, const int16_t *out,
^
/home/dan/git/nrsc5/src/conv_gen.h:148:13: warning: ‘gen_metrics_k5_n4’ defined but not used [-Wunused-function]
static void gen_metrics_k5_n4(const int8_t *seq, const int16_t *out,
^
/home/dan/git/nrsc5/src/conv_gen.h:159:13: warning: ‘gen_metrics_k7_n2’ defined but not used [-Wunused-function]
static void gen_metrics_k7_n2(const int8_t *seq, const int16_t *out,
^
/home/dan/git/nrsc5/src/conv_gen.h:179:13: warning: ‘gen_metrics_k7_n4’ defined but not used [-Wunused-function]
static void gen_metrics_k7_n4(const int8_t *seq, const int16_t *out,
^
[ 91%] Building C object src/CMakeFiles/nrsc5.dir/reed-solomon.c.o
[ 94%] Building C object src/CMakeFiles/nrsc5.dir/galois.c.o
[ 97%] Building C object src/CMakeFiles/nrsc5.dir/log.c.o
[100%] Linking C executable nrsc5.exe
CMakeFiles/nrsc5.dir/input.c.o:input.c:(.text+0x49e): undefined reference to CMPLXF' CMakeFiles/nrsc5.dir/sync.c.o:sync.c:(.text+0xb6): undefined reference to CMPLXF'
CMakeFiles/nrsc5.dir/sync.c.o:sync.c:(.text+0x7ef): undefined reference to CMPLXF' CMakeFiles/nrsc5.dir/sync.c.o:sync.c:(.text+0x84e): undefined reference to CMPLXF'
CMakeFiles/nrsc5.dir/resamp_q15.c.o:resamp_q15.c:(.text+0x62b): undefined reference to CMPLXF' CMakeFiles/nrsc5.dir/resamp_q15.c.o:resamp_q15.c:(.text+0xd1d): more undefined references to CMPLXF' follow
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/nrsc5.dir/build.make:516: src/nrsc5.exe] Error 1
make[1]: *** [CMakeFiles/Makefile2:161: src/CMakeFiles/nrsc5.dir/all] Error 2
make: *** [Makefile:128: all] Error 2

demodulator for gqrx

Is there any interest in making this a demodulator for the popular Linux qgrx SDR system?

error for object 0x7f8d4280a600: incorrect checksum for freed object - object was probably modified after being freed.

Using this morning's master on Mac High Sierra...

Tuning to the radio station: 90.9 Mhz HD1
10:39:28 INFO main.c:189: [0] Generic RTL2832U OEM
Playing: -
[file] Reading from stdin...
Found Rafael Micro R820T tuner
Exact sample rate is: 1488375.071248 Hz
10:39:29 INFO main.c:56: Gain: 0.0 dB, Power: -42.830997 dBFS
10:39:29 INFO main.c:56: Gain: 0.9 dB, Power: -40.005108 dBFS
10:39:29 INFO main.c:56: Gain: 1.4 dB, Power: -38.784588 dBFS
10:39:29 INFO main.c:56: Gain: 2.7 dB, Power: -35.047985 dBFS
10:39:29 INFO main.c:56: Gain: 3.7 dB, Power: -33.255219 dBFS
10:39:29 INFO main.c:56: Gain: 7.7 dB, Power: -30.284607 dBFS
10:39:29 INFO main.c:56: Gain: 8.7 dB, Power: -28.886299 dBFS
10:39:29 INFO main.c:56: Gain: 12.5 dB, Power: -27.129055 dBFS
10:39:29 INFO main.c:56: Gain: 14.4 dB, Power: -25.824263 dBFS
10:39:29 INFO main.c:56: Gain: 15.7 dB, Power: -24.120682 dBFS
10:39:29 INFO main.c:56: Gain: 16.6 dB, Power: -22.714890 dBFS
10:39:29 INFO main.c:56: Gain: 19.7 dB, Power: -19.854498 dBFS
10:39:29 INFO main.c:56: Gain: 20.7 dB, Power: -18.455906 dBFS
10:39:29 INFO main.c:56: Gain: 22.9 dB, Power: -15.732992 dBFS
10:39:29 INFO main.c:56: Gain: 25.4 dB, Power: -14.250073 dBFS
10:39:29 INFO main.c:56: Gain: 28.0 dB, Power: -11.687900 dBFS
10:39:29 INFO main.c:56: Gain: 29.7 dB, Power: -11.212385 dBFS
10:39:29 INFO main.c:56: Gain: 32.8 dB, Power: -10.266764 dBFS
10:39:30 INFO main.c:56: Gain: 33.8 dB, Power: -10.013288 dBFS
10:39:30 INFO main.c:56: Gain: 36.4 dB, Power: -9.602272 dBFS
10:39:39 INFO sync.c:248: Synchronized!
10:39:40 INFO sync.c:324: MER: -6.600716 dB (lower), -13.836862 dB (upper)
10:39:40 INFO decode.c:77: BER: 0.181901, avg: 0.181901, min: 0.181901, max: 0.181901
nrsc5(69910,0x7000020ba000) malloc: *** error for object 0x7f8d4280a600: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
[ffmpeg/demuxer] wav: Cannot check for SPDIF
(+) Audio --aid=1 (pcm_s16le 2ch 44100Hz)

Exiting... (Errors when loading file)

Compiling on Cygwin

Has anyone succeeded in compiling on Cygwin 64 bit? I can compile with a number of warnings but the linker fails on some unresolved symbols, the first of which is R_X86_64_PC32.

Experimental branch ARM

I am happy to report that the experimental branch compiled with no issues on ARM with the -DUSE_NEON=ON option enabled. It does use significantly less CPU usage, however I am still not able to decode on the ARM machine. It automatically sets the gain but once that is finished all I get is repeating Timing offset: [offset value], slope: [slope value]. I am using the same sdr, station, and antenna placement my x86 computer is using that is able to decode with the experimental branch code compiled.

Lots of CRC mismatches

Hello, I'm a long time software developer but brand new to SDR and just learning. I have been messing with nrsc5 for about a week now and keep having trouble getting it going. I have a NooElec NESDR Mini 2 w/the default antenna and am building and running on Ubuntu 16.04. I've chosen one of the stronger stations in the Houston area and keep getting CRC mismatches which end up exiting the program. I'm running in a VMware VM but have also tried it on bare metal. I've loaded a fresh Ubuntu 16.04 image with nothing but the dependencies and this software and still get the same issue. I notice all of the extra data is found (even the png image!) but it seems when it gets to the audio decode something gets messed up. As a newbie I'm not sure if my SNR is high enough but this channel was the highest I saw in my area, which I'd expect to be good as it's a huge city. Any guidance would be appreciated or if others aren't using Ubuntu then maybe I found something. Please let me know if there's something I can do to provide more data to debug with. Here's a sample run:

22:33:10:chuck@chux-xenial-base:build:master✔  ►  src/nrsc5 -o - -f adts 99.1 0 | mplayer -
22:33:15 INFO  main.c:195: [0] Generic RTL2832U OEM
MPlayer 1.2.1 (Debian), built with gcc-5.3.1 (C) 2000-2016 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing -.
Reading from stdin...
libavformat version 56.40.101 (external)
Found Rafael Micro R820T tuner
Exact sample rate is: 1488375.071248 Hz
[R82XX] PLL not locked!
22:33:16 INFO  main.c:65: Gain: 0.0 dB, CNR: 0.126053 dB
22:33:16 INFO  main.c:65: Gain: 0.9 dB, CNR: 0.102925 dB
22:33:16 INFO  main.c:65: Gain: 1.4 dB, CNR: 0.128405 dB
22:33:16 INFO  main.c:65: Gain: 2.7 dB, CNR: 0.640147 dB
22:33:16 INFO  main.c:65: Gain: 3.7 dB, CNR: 0.671004 dB
22:33:16 INFO  main.c:65: Gain: 7.7 dB, CNR: 1.523039 dB
22:33:17 INFO  main.c:65: Gain: 8.7 dB, CNR: 1.547986 dB
22:33:17 INFO  main.c:65: Gain: 12.5 dB, CNR: 2.083460 dB
22:33:17 INFO  main.c:65: Gain: 14.4 dB, CNR: 2.498631 dB
22:33:17 INFO  main.c:65: Gain: 15.7 dB, CNR: 2.579844 dB
22:33:17 INFO  main.c:65: Gain: 16.6 dB, CNR: 2.973796 dB
22:33:17 INFO  main.c:65: Gain: 19.7 dB, CNR: 4.781415 dB
22:33:17 INFO  main.c:65: Gain: 20.7 dB, CNR: 5.514703 dB
22:33:17 INFO  main.c:65: Gain: 22.9 dB, CNR: 6.850557 dB
22:33:17 INFO  main.c:65: Gain: 25.4 dB, CNR: 6.483753 dB
22:33:17 INFO  main.c:65: Gain: 28.0 dB, CNR: 7.485606 dB
22:33:17 INFO  main.c:65: Gain: 29.7 dB, CNR: 7.307911 dB
22:33:17 INFO  main.c:65: Gain: 32.8 dB, CNR: 8.017851 dB
22:33:17 INFO  main.c:65: Gain: 33.8 dB, CNR: 8.378475 dB
22:33:17 INFO  main.c:65: Gain: 36.4 dB, CNR: 7.912903 dB
22:33:17 INFO  main.c:65: Gain: 37.2 dB, CNR: 8.228477 dB
22:33:17 INFO  main.c:65: Gain: 38.6 dB, CNR: 8.047071 dB
22:33:18 INFO  main.c:65: Gain: 40.2 dB, CNR: 7.731998 dB
22:33:18 INFO  main.c:65: Gain: 42.1 dB, CNR: 8.289161 dB
22:33:18 INFO  main.c:65: Gain: 43.4 dB, CNR: 7.929200 dB
22:33:18 INFO  main.c:65: Gain: 43.9 dB, CNR: 7.954932 dB
22:33:18 INFO  main.c:65: Gain: 44.5 dB, CNR: 7.988502 dB
22:33:18 INFO  main.c:65: Gain: 48.0 dB, CNR: 8.573486 dB
22:33:18 INFO  main.c:65: Gain: 49.6 dB, CNR: 7.985606 dB
22:33:18 DEBUG main.c:69: Best gain: 480
22:33:21 INFO  acquire.c:104: Timing offset: 431.875000, slope: 3.507812 (adjust)
22:33:22 INFO  input.c:163: CFO: 5450.591797 Hz (55 ppm)
22:33:22 DEBUG sync.c:270: First block @ 17
22:33:23 DEBUG sync.c:270: First block @ 0
22:33:24 INFO  sync.c:248: Synchronized!
22:33:24 DEBUG pids.c:270: Audio program 2: public, type 18, sound experience 0
22:33:24 DEBUG pids.c:292: Data service: public, type 65, MIME type 5b6
22:33:24 DEBUG pids.c:136: Station Name: KODA-FM
22:33:24 DEBUG pids.c:119: Country: US, FCC facility ID: 35337
22:33:25 DEBUG pids.c:292: Data service: public, type 66, MIME type 2d7
22:33:25 DEBUG pids.c:292: Data service: public, type 66, MIME type e96
22:33:25 DEBUG pids.c:398: Slogan: SUNNY 99.1
22:33:25 DEBUG pids.c:238: Message (priority 0):  
22:33:25 INFO  sync.c:324: MER: -7.903810 dB (lower), -7.124453 dB (upper)
22:33:25 DEBUG pids.c:270: Audio program 0: public, type 8, sound experience 0
22:33:25 DEBUG pids.c:270: Audio program 1: public, type 3, sound experience 0
22:33:25 INFO  decode.c:77: BER: 0.155210, avg: 0.155210, min: 0.155210, max: 0.155210
22:33:26 DEBUG pids.c:292: Data service: public, type 259, MIME type eb2
22:33:26 DEBUG pids.c:292: Data service: public, type 259, MIME type 469
22:33:26 DEBUG pids.c:196: Station location: 99.214600 -244.031372, 128m
22:33:27 INFO  sync.c:324: MER: -3.523866 dB (lower), -0.957806 dB (upper)
22:33:27 INFO  decode.c:77: BER: 0.055798, avg: 0.105504, min: 0.055798, max: 0.155210
22:33:27 DEBUG acquire.c:99: Timing offset: 504.375000, slope: 0.164062
22:33:28 INFO  sync.c:324: MER: -7.338721 dB (lower), 6.083565 dB (upper)
22:33:28 INFO  decode.c:77: BER: 0.036304, avg: 0.082438, min: 0.036304, max: 0.155210
22:33:28 DEBUG frame.c:465: ignoring partial pdu
22:33:28 WARN  frame.c:450: crc mismatch!
22:33:28 WARN  frame.c:450: crc mismatch!
22:33:28 WARN  frame.c:450: crc mismatch!
22:33:28 WARN  frame.c:450: crc mismatch!
22:33:28 WARN  frame.c:450: crc mismatch!
22:33:28 WARN  frame.c:450: crc mismatch!
22:33:28 WARN  frame.c:450: crc mismatch!
22:33:29 DEBUG pids.c:342: Exciter manuf. "GG", core version 4.4.7.0-0, manuf. version 1.9.0.1-0
22:33:30 INFO  sync.c:324: MER: -3.993487 dB (lower), 6.208668 dB (upper)
22:33:30 INFO  decode.c:77: BER: 0.033209, avg: 0.070131, min: 0.033209, max: 0.155210
22:33:30 DEBUG output.c:382: Title: SUNNY
22:33:30 DEBUG output.c:388: Artist: HOUSTONS BEST VARIETY OF THE 80S, 90S, AND TODAY
22:33:30 WARN  frame.c:450: crc mismatch!
22:33:30 WARN  frame.c:450: crc mismatch!
Cannot seek backward in linear streams!
Seek failed
22:33:30 DEBUG acquire.c:99: Timing offset: 510.000000, slope: 0.375000
22:33:31 INFO  sync.c:324: MER: -6.048347 dB (lower), 6.179825 dB (upper)
22:33:31 INFO  decode.c:77: BER: 0.033975, avg: 0.062900, min: 0.033209, max: 0.155210
22:33:31 INFO  frame.c:331: Subchannel 0: mode=0, length=2090
22:33:31 INFO  frame.c:331: Subchannel 1: mode=0, length=1336
22:33:31 INFO  frame.c:331: Subchannel 2: mode=0, length=0
22:33:31 DEBUG output.c:499: missing port 0880
22:33:31 INFO  frame.c:266: psd crc mismatch
22:33:31 DEBUG output.c:499: missing port 0880
22:33:31 INFO  frame.c:266: psd crc mismatch
22:33:31 DEBUG output.c:499: missing port 0401
22:33:31 DEBUG output.c:415: 40 01 00 10
22:33:31 DEBUG output.c:429: Found SUNNY 99.1
22:33:31 DEBUG output.c:438: Port 800, type 3, size 265
22:33:31 DEBUG output.c:438: Port 801, type 3, size 265
22:33:31 DEBUG output.c:415: 40 02 00 17
22:33:31 DEBUG output.c:429: Found SportsTalk 790 on 99.1 HD2
22:33:31 DEBUG output.c:438: Port 802, type 3, size 265
22:33:31 DEBUG output.c:438: Port 803, type 3, size 265
22:33:31 DEBUG output.c:415: 40 03 00 17
22:33:31 DEBUG output.c:429: Found HD3
22:33:31 DEBUG output.c:438: Port 804, type 3, size 265
22:33:31 DEBUG output.c:438: Port 805, type 3, size 265
22:33:31 DEBUG output.c:415: 41 0A 00 03
22:33:31 DEBUG output.c:429: Found HD TMC
22:33:31 DEBUG output.c:438: Port 401, type 1, size 65
22:33:31 DEBUG output.c:415: 41 0B 00 29
22:33:31 DEBUG output.c:429: Found TTN TPEG
22:33:31 DEBUG output.c:438: Port 880, type 0, size 259
22:33:31 DEBUG output.c:438: Port 881, type 0, size 259
22:33:31 DEBUG output.c:438: Port 882, type 0, size 259
22:33:31 DEBUG output.c:415: 41 16 00 19
22:33:31 DEBUG output.c:429: Found TTN STM
22:33:31 DEBUG output.c:438: Port 810, type 3, size 66
22:33:31 DEBUG output.c:438: Port 820, type 3, size 66
22:33:31 DEBUG output.c:382: Title: SUNNY
22:33:31 DEBUG output.c:388: Artist: HOUSTONS BEST VARIETY OF THE 80S, 90S, AND TODAY
22:33:31 WARN  frame.c:450: crc mismatch!
22:33:31 DEBUG output.c:127: Audio bit rate: 46.2 kbps
22:33:31 WARN  frame.c:450: crc mismatch!
22:33:33 INFO  sync.c:324: MER: -7.128866 dB (lower), 5.429683 dB (upper)
22:33:33 INFO  decode.c:77: BER: 0.040822, avg: 0.059220, min: 0.033209, max: 0.155210
22:33:33 INFO  frame.c:266: psd crc mismatch
22:33:33 INFO  frame.c:266: psd crc mismatch
22:33:33 INFO  frame.c:266: psd crc mismatch
22:33:33 INFO  frame.c:266: psd crc mismatch
22:33:34 INFO  sync.c:324: MER: -3.811772 dB (lower), 0.779629 dB (upper)
22:33:34 INFO  decode.c:77: BER: 0.071333, avg: 0.060950, min: 0.033209, max: 0.155210
22:33:34 INFO  frame.c:266: psd crc mismatch
22:33:34 INFO  frame.c:266: psd crc mismatch
22:33:34 INFO  frame.c:266: psd crc mismatch
22:33:34 INFO  frame.c:266: psd crc mismatch
22:33:34 INFO  frame.c:266: psd crc mismatch
22:33:34 INFO  frame.c:266: psd crc mismatch
22:33:34 INFO  frame.c:266: psd crc mismatch
22:33:35 DEBUG pids.c:357: Importer manuf. "  ", core version 4.4.7.0-0, manuf. version 0.0.0.0-0
22:33:36 INFO  sync.c:324: MER: -4.262441 dB (lower), 5.292646 dB (upper)
22:33:36 INFO  decode.c:77: BER: 0.044658, avg: 0.058914, min: 0.033209, max: 0.155210
22:33:36 INFO  frame.c:266: psd crc mismatch
22:33:36 INFO  frame.c:266: psd crc mismatch
22:33:36 INFO  frame.c:266: psd crc mismatch
22:33:36 DEBUG output.c:522: 00000001 7E1AA8F8 4F328CA0
22:33:36 INFO  output.c:546: File TMT_02rjaj_1_3_20171021_0324_0128.png, size 3576
22:33:36 INFO  frame.c:266: psd crc mismatch
22:33:36 INFO  frame.c:266: psd crc mismatch
nrsc5: /home/chuck/nrsc5/src/bitreader.h:26: br_read1bit: Assertion `br->buf != br->end' failed.
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed
Cannot seek backward in linear streams!
Seek failed


Exiting... (End of file)```

ARM performance

I added a couple of patches to the experimental branch to hopefully improve CPU usage on ARM. It may degrade receiver performance however.

@mrbubble62 In #15 you mentioned your ARM R8 platform was not fast enough, could you test with a new build using these options: cmake -DUSE_THREADS=ON -DUSE_NEON=ON -DUSE_FAST_MATH=ON ..

On a Raspberry Pi 3, using only 1 CPU core, the average CPU usage is 60~70%.

Auto Gain may not work for some stations.

So I noticed that the NPR station for my area the auto-gain feature does not work. It will increase it to max gain and then fail to acquire the channel.

If I set the gain manually to say 20.7 dB it works fine.

I think this may be caused by the NPR station not having very high FM deviation levels often.

Here is a screenshot of the FFT.
sdr console_2017-09-30_15-04-10

Experimental branch terminal output not redirecting to file

While attempting to redirect the output using "nrsc5 91100000 1 2>&1 >> hdlog.log" no output is written to the file. Redirecting the output using this method prior to running the experimental branch worked. This is on the working x86 machine.

ADTS decoding frequently throws errors in MPV

I was testing whether it was better to pipe ADTS v WAV to MPV. If I understand correctly, the ADTS stream would be an (essentially) unmodified copy of the AAC audio feed from the station. WAV output requires NRSC to decode those packets to PCM.

In theory, ADTS would be better because all audio processing would be done within MPV and less data is piped between the programs. But, if I run NRSC5 long enough, I frequently see ADTS decoding errors like what follows. So, WAV output seems to be more stable (or at least whatever errors there are in the ADTS stream are accommodated by NRSC in when it transcodes to WAV before piping to MPV).

Eventually, the program halts. I don't know whether this is related to Issue 51 or a separate issue specific to ADTS decoding.

The exact code that I am using is:
nrsc5 -o - -q -f adts $FREQUENCY $BAND | mpv - --audio-samplerate=48000 -af lavfi='extrastereo'

Tuning to the radio station: 88.5 Mhz HD1
Playing: -
[file] Reading from stdin...
Found Rafael Micro R820T tuner
Exact sample rate is: 1488375.071248 Hz
 (+) Audio --aid=1 (aac 2ch 44100Hz)
AO: [coreaudio] 48000Hz stereo 2ch float
A: 00:48:01 / 00:00:00
[ffmpeg/audio] aac: Number of bands (48) exceeds limit (45).
Error decoding audio.
A: 01:35:56 / 00:00:00
[ffmpeg/audio] aac: Reserved SBR extensions is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[ffmpeg/audio] aac: If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. ([email protected])
[ffmpeg/audio] aac: Expected to read 14 SBR bytes actually read 47.
[ffmpeg/audio] aac: Multiple frames in a packet.
[ffmpeg/audio] aac: Reserved bit set.
[ffmpeg/audio] aac: Number of bands (19) exceeds limit (15).
Error decoding audio.
A: 02:23:50 / 00:00:00

Parse data from AAS PDUs

I wrote some code, that I'll commit in a bit, to parse the fixed data portion of the L2 PDUs. The result is a bunch of packets that I'm not quite sure what to do with.

unknown PSD port 411, seq 114b, length 269
08 01 57 99 0C 00 00 00 53 7B 26 93 EC EC 34 F2 FF 00 1B 22 FA 13 FA AB 94 37 F3 35 CD EE 93 A3 F2 87 CF EF 9D FB 24 13 BF 37 60 1C 09 7B 80 3F DA 39 7B CB BF DA BD CF DA 73 CD 5F F8 58 7E 6E C3 AF A2 B7 55 C5 E4 AC 4F 07 C1 70 D9 4B 7E 91 9A 7F E5 2F 9F 4E CF F4 E7 1D D2 AF 8F F8 1E BE AA B7 FA 90 9E F8 D3 C4 FE D2 C7 5A 23 2A 10 04 01 00 40 10 04 01 00 40 10 04 01 00 40 10 1A 6D
unknown PSD port 404, seq 2957, length 652
C9 3F 95 48 A7 2E 85 34 5B 24 63 09 E4 9E 75 AF 2A 24 10 A9 EC AC 59 DE 68 ED 37 5A 09 64 3E D6 60 B9 92 72 AD 0A DA 95 99 63 6E 55 27 A3 9D 80 5B 82 2C 54 2C 8C C7 4A 4E F2 66 B2 2A 15 25 F0 57 88 1A 54 37 B6 44 10 1B 6F 6C 56 4D 54 2C 8A 44 29 96 34 93 64 74 90 9C EB E5 68 54 8E A2 48 EE 8A 45 B3 5B 36 22 48 3E 39 19 4F 20 55 91 E4 15 CB CA 6C 71 3C 90 D1 5D 6F D5 DE EF 23 7C B4
unknown PSD port 402, seq 298d, length 818
40 F2 EF 46 99 3A 65 FC 98 E6 21 FE DE 13 32 7F 97 77 12 BC 4B F0 CD 3A 5F 7C 08 CD 2E A7 0D 87 69 83 B9 70 17 F7 C9 57 CD A4 F1 6F 82 77 CA 07 60 44 09 94 42 25 90 53 2A FD 32 D4 4A FD 7B A8 04 72 CA B3 CE 14 E2 1D 54 2B 72 CA 57 DF 65 C4 D7 2E 09 A1 DF FD 15 3A 00 4E B5 5E 8D CF 83 FD 4E 07 D4 3D 13 D0 E3 19 E7 88 5A 76 08 43 34 B3 3F 18 51 17 4A C3 F0 50 46 20 B4 FA 23 E8 AE 93
unknown PSD port 401, seq 2364, length 933
52 02 00 A0 40 00 0D 14 EF 00 00 00 04 80 B9 D0 A6 95 47 FA 40 00 0D 14 EF 00 00 00 04 80 B9 CF 4E 95 48 26 40 00 0D B1 0D 11 70 00 04 80 B9 D5 86 95 3F 50 40 E5 0D B0 00 00 00 00 05 40 B9 D7 0A 95 38 72 40 E5 0D B0 FC 11 B0 00 04 80 B9 D0 22 95 35 D4 40 E5 0D 14 F9 11 20 00 00 E8 B9 D7 12 95 37 86 40 00 0D 10 00 51 70 00 04 80 B9 D2 BA 95 32 A5 44 DB 0C E4 F9 51 70 00 01 A8 B9 D0
unknown PSD port 20, seq 9a2f, length 407
40 01 00 62 69 05 00 4D 50 53 66 0C 00 00 07 00 00 00 00 5A 6C C6 4D 67 0D 01 07 04 09 01 03 00 00 36 75 4B BE 60 09 53 65 6C 66 28 00 00 00 67 0D 02 11 04 09 01 03 00 00 36 25 C7 D9 60 09 53 65 6C 66 32 00 00 00 40 02 00 02 69 06 00 53 50 53 31 66 0C 00 01 00 00 00 00 00 5A 6C C6 4D 40 03 00 03 69 06 00 53 50 53 32 66 0C 00 02 00 00 00 00 00 5A 6C C6 4D 41 06 00 3B 69 12 00 4E 61
unknown PSD port 411, seq 114c, length 269
08 01 57 99 0D 00 00 00 13 70 97 83 9C 13 4A 2B E9 D0 E1 F8 8A 9F EA 1D 1D DC B7 37 D8 5E FD 2D A7 BD 86 F4 BB 7C E4 CA F0 8B BD C5 8E 80 71 8E D2 39 6F 9F E4 D4 E1 E0 43 F0 87 C8 7D 4A E2 E7 A7 7A 2B 64 53 97 62 EB 65 15 AF 42 C4 E5 B6 4D 47 DE 97 54 7C 66 E1 4C 20 15 CE C8 FF 00 27 DF D9 FC 11 EE C5 39 FA C5 BB 7B 28 0E B6 81 F7 92 FB 16 77 2D FD 1C 5D CB 5B 1E 95 E1 CC CD 56 6D

Add ability to select sound output device

When using nrsc5 on a system with more than one sound output device (e.g.: headphones plugged into an external USB DAC) there is no easy way to select the desired output device.

I spoke to @argilo briefly about this and it seems like output_init_live() might be the best place in nrsc5 to add these hooks, perhaps with a command-line option of -x or -a or something.

According to https://xiph.org/ao/doc/drivers.html, one may pass to the alsa driver hw:0 for the first soundcard and hw:1 for the second and so on.

Unknown HDC block type: 0

While trying to decode program 2 of a local station I receive the following error

avg: 1092.500000, slope: -0.093750, freqerr: 66.531509
first block @ 7
synchronized!
avg: 1090.375000, slope: 0.031250, freqerr: 67.772034
BER: 0.013012, avg: 0.013012, min: 0.013012, max: 0.013012
pdu_seq: 0, seq: 61, nop: 33
ignoring partial pdu
Unknown HDC block type: 0
Segmentation fault (core dumped)

It is a low bandwidth talk sub channel if that is of any help.

Compiling for ARM

I was very excited to hear about your work and decided to try compile the program. I got through most of the compile until I ran into this error gcc: error: unrecognized command line option '-msse2' and realized it's looking for an x86 based instruction set. I'm going to compile it on an old x86 laptop, but I was wondering if there is a possible work around or plans for an ARM compatible build?

ADTS SBR+PS does not play back on devices that should support it

I cannot get an SBR+PS stream from nrsc5 to play on an Android device. According to Google's documentation, HE-AACv2 has always been supported in Android. The raw .aac won't play (whereas SBR-only streams from an HD1 channel will play), and any method of remuxing will not change this.

I have tried using mkvmerge to create an .mka file. The situation is the same: HE-AACv1 will play, v2 will not. I have also recently tried using MP4Box from gpac (http://gpac.sourceforge.net/), which has fairly extensive support for MPEG-4 Systems files (i.e. .mp4). It has explicit support for importing ADTS AAC with SBR+PS, and placing these as a track in an mp4 file.

Apparently, in MP4, you can signal SBR/SBR+PS in a backward compatible way, and in a non-compatible way. Neither works.

To confirm that the device is not to blame, I can play an HE-AACv2 Icecast/Shoutcast stream without any problems.

Is it possible that the hdc_to_aac.c file needs to be updated or fixed to handle PS? I have two SBR+PS files that exhibit this issue, from two different stations. I can provide these files on request.

Show bitrate of stream

So this is another idea for a feature I just had an idea about.

Not to clog the output with more information but it may be nice for it to show the bitrate of the stream your currently listening to.

I figure this wouldn't be too difficult to implement.

Pop / click suppression

I have noticed that when a signal is low, there may be audible pops / clicks / or 1 second "whistles" in the feed from NRSC to MPV.

This seems to coincide with these log notices:
WARN frame.c:511: crc mismatch!

Is there a way that we could suppress the pops with either

  1. worst case, silence or
  2. preferably, an interpolation of the missing data (analog wave)

I have unsuccessfully searched for FFMPEG / MPV filters similar to Audacity's pop/click removal to solve this in real time on the audio stream.

But it really would be better to have this functionality in NRSC because it can be correlated with the CRC mismatches.

Frequency offset(s) for live and sampled file playback?

It looks like your sample output IQ baseband at 1.4MHz sample rate. Further, it seems like you're saving the full IQ baseband. It would be pretty slick if you could tune the receiver to an offset frequency of the baseband local oscillator freq when either playing back a sample from an IQ sample file or live from an RTL-SDR. Some RTLs have a big DC spike at the LO center freq which can contribute to poor SNR. One further benefit is that it would allow you to tune to a different FM station on playback if the second station's full channel is in the IQ baseband sample window (ie within 1.4Mhz / 2.0 of the LO frequency)

I confess that I haven't dug through much of your code, so if you're doing this already, then kudos are due.

Nice work by the way!

Make fails while Building C object sync.c.o

While compiling on x86_64 with Ubuntu 14.04 with up to date packages the following errors occur with make
[ 88%] Building C object src/CMakeFiles/nrsc5.dir/sync.c.o
/user/nrsc5/src/sync.c: In function ‘dump_ref’:
/user/nrsc5/src/sync.c:25:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 1; i < 32; i++)
^
/user/nrsc5/src/sync.c:25:5: note: use option -std=c99 or -std=gnu99 to compile your code
/user/nrsc5/src/sync.c: In function ‘calc_phase’:
/user/nrsc5/src/sync.c:36:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int r = 0; r < N; r++)
^
/user/nrsc5/src/sync.c:41:14: error: redefinition of ‘r’
for (int r = 1; r < N; r++)
^
/user/nrsc5/src/sync.c:36:14: note: previous definition of ‘r’ was here
for (int r = 0; r < N; r++)
^
/user/nrsc5/src/sync.c:41:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int r = 1; r < N; r++)
^
/user/nrsc5/src/sync.c: In function ‘adjust_ref’:
/user/nrsc5/src/sync.c:62:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int n = 0; n < N; n++)
^
/user/nrsc5/src/sync.c: In function ‘find_first_block’:
/user/nrsc5/src/sync.c:76:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int n = 0; n < N; n++)
^
/user/nrsc5/src/sync.c:83:14: error: redefinition of ‘n’
for (int n = 0; n < N; n++)
^
/user/nrsc5/src/sync.c:76:14: note: previous definition of ‘n’ was here
for (int n = 0; n < N; n++)
^
/user/nrsc5/src/sync.c:83:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int n = 0; n < N; n++)
^
/user/nrsc5/src/sync.c: In function ‘calc_smag’:
/user/nrsc5/src/sync.c:105:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int n = 0; n < N; n++)
^
/user/nrsc5/src/sync.c: In function ‘adjust_data’:
/user/nrsc5/src/sync.c:116:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int n = 0; n < N; n++)
^
/user/nrsc5/src/sync.c:122:9: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int k = 1; k < 19; k++)
^
/user/nrsc5/src/sync.c: In function ‘sync_process’:
/user/nrsc5/src/sync.c:175:9: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int n = 0; n < N; n++)
^
make[2]: *** [src/CMakeFiles/nrsc5.dir/sync.c.o] Error 1
make[1]: *** [src/CMakeFiles/nrsc5.dir/all] Error 2
make: *** [all] Error 2

Failed to submit transfer 31! error

I haven't had issues with other rtlsdr programs. rtl_fm, gqrx, and sdrtrunk all work.
Does anyone have any ideas on how to get nrsc5 past this error?
I'm running on a Linux box (Fedora).

Exact sample rate is: 1488375.071248 Hz
Failed to submit transfer 31!
rtlsdr error: -5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.