callbacks

Add useful snippets of code or links to entire SDR projects.
Post Reply
rtm
Posts: 2
Joined: Tue Aug 09, 2016 9:46 pm

callbacks

Post by rtm » Tue Aug 09, 2016 9:56 pm

I'm using the 1.95 API library on a Mac.

I'm seeing an odd situation in which the callbacks seem to be called
out of order; the firstSampleNum will jump ahead by about a million
since the last call, and then jump back by the same amount on
the next call. I'm trying to figure out what I'm doing wrong.

Will there be a problem if my callback function sometimes waits
before returning, for example if it has to wait for a lock? What if it
has to wait for a long time, perhaps many seconds?

Could the callback be called in parallel from multiple threads? Or is
it guaranteed to be only called once at any given time?

Is there a working example of callback code somewhere that
I could look at?

Thanks,
Robert
Last edited by rtm on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

rtm
Posts: 2
Joined: Tue Aug 09, 2016 9:46 pm

Re: callbacks

Post by rtm » Wed Aug 10, 2016 9:56 am

Here's output from the API library:

Error: USB buffer overflow
Gap=0x7e0000 e=0xd7e8a952 a=0xd866a952
(firstSampleNum jumps ahead by 1032192 here)
Gap=0xff820000 e=0xd88df452 a=0xd80ff452
(firstSampleNum jumps backwards by 1032192 here)
Gap=0x7e0000 e=0xd8100952 a=0xd88e0952
(firstSampleNum jumps ahead by 1032192 here)
Gap=0xff820000 e=0xd88e74f2 a=0xd81074f2
(firstSampleNum jumps backwards by 1032192 here)

It would be great to see an example of a callback function that
correctly handles gaps in the sample stream.
Last edited by rtm on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

espam
Posts: 3
Joined: Sat Jan 30, 2016 3:12 pm

Re: callbacks

Post by espam » Wed Aug 17, 2016 6:01 pm

well to be honest i downt know why we dont get a few lines of code..... i am waiting for it since the new API was released without any success. they just told me to look in the API example - well thats nothing regarding the example in the API.

Hopefully the day will come that they will disclose that secret..... i dont know

also a comment from the support team would be nice otherwise i as a simple customer have the feeling that they do not care about me...

regards
Last edited by espam on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

sdrplay
Posts: 978
Joined: Wed Jan 07, 2015 7:58 am

Re: callbacks

Post by sdrplay » Thu Aug 18, 2016 5:40 pm

Hi,

I'm not sure what code are you looking for? Frank Krippendorf uses the latest API 1.95 so I would recommend you take a look at what he's done...

https://github.com/krippendorf/SDRPlayPorts

Best regards,

SDRplay Support
Last edited by sdrplay on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

Post Reply