discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] File Sink Size


From: Marcus D. Leech
Subject: Re: [Discuss-gnuradio] File Sink Size
Date: Tue, 03 Apr 2012 08:53:54 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 04/03/2012 08:48 AM, Jonathan Fox wrote:
Thats is weird because with me, the file sink will not save anything
above 1024 in real format. Granted, I never tried anything below that.

-Jon

There's nothing in the file sink that cares one little bit about how big your files are. It just uses the stdio library to write raw samples to whatever file you've specified. But because it uses stdio, it also uses, by default, buffering. The default stdio buffer size varies from Linux version of Linux version. So, if you're running along, and then suddenly interrupt your app unceremoniously, some number of samples will be left in the stdio buffer unwritten.

If you use the "unbuffered" option on the file-sink, you can get it to flush the stdio buffers on every write. This is inefficient,
  and I only recommend it for lower sample rates.

But that's just the stdio buffering. Internal to Gnu Radio, there are also buffers that hold your "samples in flight", and that's of
  an unpredictable size.


On 4/3/12, frankist<address@hidden>  wrote:
Hi,

I am using gnuradio companion and I noticed that the block "file sink" isn't
written if the number of complex samples stored in it is less or equal to
512. For a bigger number of samples the file has data inside but otherwise
it is empty.

Is it supposed to be this way? Is there any way to create shorter files?
--
View this message in context:
http://old.nabble.com/File-Sink-Size-tp33545017p33545017.html
Sent from the GnuRadio mailing list archive at Nabble.com.


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio




--
Marcus Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org





reply via email to

[Prev in Thread] Current Thread [Next in Thread]