pothosware / SoapyRTLSDR

SoapySDR RTL-SDR Support Module
https://github.com/pothosware/SoapyRTLSDR/wiki
MIT License
124 stars 29 forks source link

Direct buffer access calls for RX #11

Closed guruofquality closed 8 years ago

guruofquality commented 8 years ago

Ditto for the HackRF, more details here: https://github.com/pothosware/SoapyHackRF/issues/9

cjcliffe commented 8 years ago

Updates look good, thanks! I'll see what I can do to implement the same in SoapySDRPlay.

guruofquality commented 8 years ago

For the hackrf, I will probably end up making used of the Stream* pointer to house some stream related data structures. In this case it avoids some code duplication rather than specifying fifo counters, buffers, threads, etc twice for both RX and TX.

Not sure about doing this for RTL as well since it only is a single channel device. Maybe just for correctness or to stand as an example. Anyway, just bringing it up since you are considering re-factoring SoapySDRPlay.

struct SoapyRTLStream
{
  //threads
  //buffers
  //fifo counts
  //async handler
  //overflow indicator
};

Stream *setupStream(...)
{
    auto data = new SoapyRTLStream();
    //stream setup
    return (Stream *)data;
}

void closeStream(Stream * stream)
{
    auto data = (SoapyRTLStream*)stream;
    delete data;
}
guruofquality commented 8 years ago

Also done a while ago. Closing old issue.