Question about File Meta Sink block sample rate values
From:
Paul Otto
Subject:
Question about File Meta Sink block sample rate values
Date:
Wed, 19 May 2021 16:20:45 -0400
Hi, I am updating the documentation Wiki page for the File Meta Sink (https://wiki.gnuradio.org/index.php/File_Meta_Sink). When testing the functionality of the block I noticed that when I changed the sample rate with the QT GUI range object that the sample rate is not being changed in the meta data when the output file is viewed with gr_read_file_metadata. When I reviewed the source code for the File Meta Sink block (https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/file_meta_sink_impl.cc) it appears the sample rate (rx_rate) is only set in the constructor file_meta_sink_impl::file_meta_sink_impl. Is it expected behavior that the sample rate will not change in the meta data file even if it is changed by the user? If so is there any reference I can point to about that?
My test was generating a periodic waveform with the signal source block, and adding it to the "Tags Strobe" output block. I saved the combined output with the File Meta sink without detached headers. When running the flow graph I manually changed the sample rate with the QT GUI Range. I then reviewed the output file with the gr_read_file_metadata script. It showed the headers being generated when the strobe tags were emitted, however the sample rates of all headers were fixed to the starting sample rate even though I had changed the sample rate multiple times while the file was being saved.