#include <gnuradio/top_block.h>
#include <gnuradio/blocks/null_sink.h>
#include <osmosdr/source.h>
#include <unistd.h>
int main(int argc, char **argv)
{
double rate = 2400000.0;
gr::top_block_sptr tb = gr::make_top_block("test");
osmosdr::source::sptr osmo_source = osmosdr::source::make( "numchan=1" );
osmo_source->set_sample_rate(rate);
gr::blocks::null_sink::sptr sink = gr::blocks::null_sink::make(sizeof(gr_complex));
tb->connect(osmo_source, 0, sink, 0);
tb->start();
usleep(1000000);
tb->stop();
tb->wait();
return 0;
}
Unfortunately I do not have any other hardware than two different RTL
devices (one with E4000 tuner and one with R820T).
I attached the most simple program to reproduce that error, it just
connects the OsmoSDR source with a null sink, starts the flowgraph,
waits a second and then stops it and exit.
Working fine on Linux and Windows, but not on OS X (10.9), program never
returns. Same problem with all stuff (boost/libusb...) self build or
installed using ports.
Is someone able to find the bug?
Thanks
Stefan
Am 23.09.2014 09:06, schrieb Sylvain Munaut:
>> Ah; OK. Running osmocom_fft using a HackRF Jawbreaker and everything works OK; I can do "stop", "run", and close without issues. Maybe this issue is specific to some RTL device(s) rather than OSX? - MLD
>
> Well, it definitely works with rtl on linux, but it wouldn't suprise
> me if the issue was specific to the combination OSX+rtl since the
> 'stop' path is highly dependent of the hw driver and its interactions
> with libusb.
>
> Cheers,
>
> Sylvain
>
No comments:
Post a Comment