Comments (8)
Also on ARM R8
chip@chip:~/nrsc5/build$ nrsc5 88500000 0
15:47:36 INFO main.c:178: [0] Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Exact sample rate is: 1488375.071248 Hz
15:47:38 INFO main.c:65: Gain: 0.0 dB, CNR: 15.036225 dB
...
15:47:42 INFO main.c:65: Gain: 19.7 dB, CNR: 11.571646 dB
15:47:42 DEBUG main.c:69: Best gain: 14
15:47:46 DEBUG sync.c:244: First block @ 30
15:47:47 INFO sync.c:222: Synchronized!
15:47:49 WARN input.c:239: input buffer overflow!
Segmentation fault
from nrsc5.
Fixed with
cmake -DUSE_THREADS=NO
from nrsc5.
If the input buffer is overflowing, then that means it couldn't process the data fast enough. Or, as might be the first case, it could mean that processing got stuck trying to output the audio.
By disabling threads, it eliminates the use of these intermediate buffers, so it is now impossible to have this issue.
The solution depends on the root cause. If it is because libao is hanging due to issues processing the audio, then the ideal solution is to drop audio samples. If it is because the machine isn't fast enough to do all of the processing, then the solution is likely dropping radio samples but this will cause desynchronization.
from nrsc5.
Let me know if you are still having buffer overflow issues after this commit. It should now properly drop audio buffers if for some reason libao is hanging.
from nrsc5.
Thank you, build with threads gracefully handles overflow now.
Unfortunately ARM R8 platform is just not fast enough.
chip@chip:~/nrsc5/build$ nrsc5 -g 14 88500000 0
02:27:06 INFO main.c:178: [0] Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Exact sample rate is: 1488375.071248 Hz
02:27:11 DEBUG sync.c:244: First block @ 1
02:27:13 DEBUG sync.c:244: First block @ 0
02:27:14 ERROR input.c:240: input buffer overflow!
02:27:14 ERROR input.c:240: input buffer overflow!
02:27:14 ERROR input.c:240: input buffer overflow!
02:27:14 ERROR input.c:240: input buffer overflow!
02:27:14 ERROR input.c:240: input buffer overflow!
02:27:14 ERROR input.c:240: input buffer overflow!
02:27:14 ERROR input.c:240: input buffer overflow!
02:27:14 ERROR input.c:240: input buffer overflow!
02:27:14 ERROR input.c:240: input buffer overflow!
02:27:14 ERROR input.c:240: input buffer overflow!
02:27:15 ERROR input.c:240: input buffer overflow!
02:27:15 DEBUG sync.c:244: First block @ 0
02:27:15 ERROR input.c:240: input buffer overflow!
02:27:15 ERROR input.c:240: input buffer overflow!
02:27:15 INFO sync.c:222: Synchronized!
02:27:15 ERROR input.c:240: input buffer overflow!
from nrsc5.
I've found the source of my issue. It is related to using a bluetooth headset and nrsc5 being unable to output the sound to it. Essentially if the bluetooth starts dropping or is about to disonnect, nrsc5 produces the error and it segmentation faults.
from nrsc5.
I'm going to pull the new code and compile it now.
from nrsc5.
The issue is resolved. The program gracefully returns audio back to on board sound if it can't send it to bluetooth. Thanks.
from nrsc5.
Related Issues (20)
- How to record IQ data for nrsc5 (Linux) right? HOT 1
- Potential issue running under Fedora 35 HOT 12
- Virus in installation package HOT 1
- Allocating 8 zero-copy buffers - E4000 Tuner issues HOT 9
- Is there a way to dump compressed audio in a playable format? (without re-encoding) HOT 1
- wont launch HOT 4
- Fallback to Analog/rtl_fm if non-HD station HOT 1
- demuxing from hackrf HOT 4
- Logs to stderr, so can get WAV file output in standard output? HOT 2
- Successful Android Build HOT 8
- Move from FAAD2 to fdk-aac to fix #260 broken Parametric Stereo implementation on subchannels? HOT 5
- Long WAV files can cut off HOT 3
- Fedroa 36 constant Lost synchronization HOT 21
- [Windows] Compile Error
- 16-bit I/Q file input exists in Python CLI but not in main program? HOT 1
- No available formula or cask with the name "/tmp/nrsc5". HOT 25
- Five channels? HOT 68
- Re-enable Python tests on macOS
- Error No rule to make target 'faad2-prefix/lib/libfaad_hdc.a', HOT 1
- Feature Request: Dump only DWRO named image files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nrsc5.