RSPDuo, using dual tuners with API 3.06 in C++

SDRPlay Independent Community Forum Forums SDRPlay Devices RSPDuo, using dual tuners with API 3.06 in C++

Tagged: 

  • This topic has 1 reply, 1 voice, and was last updated by .
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #916
    lexsed
    Participant

    I am trying to get the RSPDuo to receive two phase-coherent channels in C++ and the example code provided in the pdf:
    https://www.sdrplay.com/docs/SDRplay_API_Specification_v3.06.pdf

    The pdf seems to suggest that to run a dual-tuner mode as follows: “sample_app.exe A ms”
    would initialize the tuner A as master and the data will arrive alternatively in StreamACallback and StreamBCallback.

    I only observe the StreamACallback to ever be called(by uncommenting the //if(reset) in the callbacks to print on any of the calls)

    If I use the application similarly to SDRuno, and run it “sample_app.exe A ms” and then “sample_app.exe B ms” each of the apps initialize the respective tuners and stream data to their respective StreamACallback functions.

    I am wondering if perhaps, to create such stream I would have to:
    Initialize the device twice in the same program — first the master, then the slave.

    but that leaves two questions:
    how do I ensure that the streams are exactly sample-synchronous?
    what is the purpose of StreamBCallback, if only the other one is called ?

    Thanks for any advice,
    -Alex

    PS: using API 3.06 on Windows 10

    output of “sample_app.exe A ms”
    Dev0: SerNo=1905077432 hwVer=3 tuner=0x03 rspDuoMode=0x07
    chosenDevice = 0
    Dev0: selected rspDuoMode=0x04 tuner=0x01 rspDuoSampleFreq=2000000.0
    sdrplay_api_EventCb: sdrplay_api_GainChange, tuner=sdrplay_api_Tuner_A gRdB=40 lnaGRdB=26 systemGain=46.11
    sdrplay_api_StreamACallback: numSamples=252

    #917
    lexsed
    Participant

    I have figured it out — apparently I missed the correct “chosenDevice->rspDuoMode” value for dual tuner initialization is sdrplay_api_RspDuoMode_Dual_Tuner.

    Therefore now I am able to see the callbacks being called sequentially:
    sdrplay_api_StreamACallback: numSamples=1008
    sdrplay_api_StreamBCallback: numSamples=1008
    sdrplay_api_StreamACallback: numSamples=1008
    sdrplay_api_StreamBCallback: numSamples=1008
    sdrplay_api_StreamACallback: numSamples=1008
    sdrplay_api_StreamBCallback: numSamples=1008

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.