Giter Site home page Giter Site logo

Input buffer overflow about nrsc5 HOT 8 CLOSED

theori-io avatar theori-io commented on June 27, 2024
Input buffer overflow

from nrsc5.

Comments (8)

mrbubble62 avatar mrbubble62 commented on June 27, 2024

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.

mrbubble62 avatar mrbubble62 commented on June 27, 2024

Fixed with
cmake -DUSE_THREADS=NO

from nrsc5.

awesie avatar awesie commented on June 27, 2024

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.

awesie avatar awesie commented on June 27, 2024

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.

mrbubble62 avatar mrbubble62 commented on June 27, 2024

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.

BrodieBruce901 avatar BrodieBruce901 commented on June 27, 2024

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.

BrodieBruce901 avatar BrodieBruce901 commented on June 27, 2024

I'm going to pull the new code and compile it now.

from nrsc5.

BrodieBruce901 avatar BrodieBruce901 commented on June 27, 2024

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)

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.