callbacks
callbacks
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
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
Reason: No reason
Re: callbacks
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.
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
Reason: No reason
Re: callbacks
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
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
Reason: No reason
Re: callbacks
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
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
Reason: No reason