dmitryelj / SoapyICR8600

Icom ICR8600 SoapySDR driver
MIT License
4 stars 3 forks source link

Found a Bug in Streaming.cpp #9

Open righthalfplane opened 3 years ago

righthalfplane commented 3 years ago

I found a bug in Streaming.cpp. Fixing the bug dramatically improves the performance.

The statements - if (c1 != 0x00 && c2 != 0x80 && c3 != 0x00 && c4 != 0x80) { Should be - if ((c1 != 0x00) || (c2 != 0x80) || (c3 != 0x00) || (c4 != 0x80)) {

The spectrums now look good and the audio is much better.

righthalfplane commented 2 years ago

@robojay I found the last problem that was causing trouble. Fixing the statements above cleaned up the spectrums. The read routine was returning more values than were requested - that was overflowing the data buffer and crashing the program. Taking care of those two problems - it now works pretty good.

robojay commented 2 years ago

Very cool - thanks for digging into this! I'll see if I can try it out on my radio over the next couple of days. It's been a while since I've used Soapy...

dmitryelj commented 2 years ago

@righthalfplane I am not using IC8600 now, make a pull request, and I will add your changes to the code.

righthalfplane commented 2 years ago

I have been running it quite a lot and some additional strangeness has show up - sometimes when you change sample rates a dip in the response occurs, but if you select the sample rate a second time - the dip goes away. That is what happens with SdrGlut - I am not sure what happens with other programs.

I fixed the buffer overflow problem in SdrGlut - it should really be fixed in SoapyICR8600.

righthalfplane commented 2 years ago

@robojay @dmitryelj - I put in the pull request

dmitryelj commented 2 years ago

Request merged, thanks