Page 1 of 1

callbacks

Posted: Tue Aug 09, 2016 9:56 pm
by rtm
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

Re: callbacks

Posted: Wed Aug 10, 2016 9:56 am
by rtm
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.

Re: callbacks

Posted: Wed Aug 17, 2016 6:01 pm
by espam
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

Re: callbacks

Posted: Thu Aug 18, 2016 5:40 pm
by sdrplay
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