Code Monkey home page Code Monkey logo

Comments (2)

guruofquality avatar guruofquality commented on May 25, 2024 1

And I think because of how the library is, the call cannot be made during setSampleRate() because that would be an issue while streaming.

One solution might be to simply check the rate passed into setSampleRate() against the values returned by airspy_get_samplerates. I believe the airspy code basically replicates airspy_get_samplerates inside of airspy_set_samplerate anyway.

Another solution might be to move this whole chunk of code into the setSampleRate() and handle the error code there

if (airspy_is_streaming(dev))
{
        airspy_stop_rx(dev);
        r = airspy_set_samplerate(dev, sampleRate);
        airspy_start_rx(dev, &_rx_callback, (void *) this);
 }
else  r = airspy_set_samplerate(dev, sampleRate);
//throw if r is bad

If you have the hardware available, do you want to try out a fix and make a PR? I dont think this is a change that can be done blindly (ie it just compiles).

from soapyairspy.

mutability avatar mutability commented on May 25, 2024

I do have hardware, I'll have an experiment.

(From looking through the library/firmware, I think that maybe it's safe to call airspy_set_samplerate while streaming data; the firmware seems to have the right logic to stop/retune/restart; I'll try that too)

from soapyairspy.

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.