In general, sample rate does not change during a run. Not that it couldn't, but it is unusual. Similarly, data type does not change after the recording starts. That said, there's no technical reason why a change in sample rate couldn't be recorded in metadata.
On Wed, May 19, 2021 at 4:23 PM Paul Otto <[email protected]> wrote: > 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. > > Thanks, Paul >
