Dear Gnuradio,

        I wrote a program that uses a WAV source block. I found that my program 
ran as expected on my CENTOS and UBUNTU machines (producing the same output for 
a given input), but I noticed something unusual on my Gentoo machine. If I run 
the decoder against the same input WAV file, I get different output every time! 
My program is an APT decoder, so the resulting output is an image. The images 
look similar, but they have different intensities. (some are darker, some 
lighter)

        I eventually determined, that the randomness was added somewhere in the 
WAV Source block. Has anyone seen this?

This little program shows where the problem may be. The input is a WAV file. 
The float stream is converted to chars, and then dumped to a file. This should 
be completely reproducible, but it doesn't seem to be in the case of my Gentoo 
machine.

-----------------
class top_block(gr.top_block):

        def __init__(self):
                gr.top_block.__init__(self, "WAV TEST")

                inputFileName = str(sys.argv[1])
                outputFileName = str(sys.argv[2])

                self.gr_wavfile_source_0 = gr.wavfile_source(inputFileName, 
False)
                self.gr_float_to_uchar_0 = gr.float_to_uchar()
                self.gr_file_sink_0 = gr.file_sink(gr.sizeof_char*1, 
outputFileName)
                self.gr_file_sink_0.set_unbuffered(False)

                self.connect((self.gr_wavfile_source_0,0), 
(self.gr_float_to_uchar_0, 0))
                self.connect((self.gr_float_to_uchar_0, 0), 
(self.gr_file_sink_0, 0))


if __name__ == '__main__':

        tb = top_block()
        tb.run(True)
-----------------
I used the same WAV file input 4 times, and got 4 different outputs.

This is the same problem-computer that gives me the make test errors, so that 
may be related.

                   Sincerely,
          Tommy James Tracy II
                  PhD Student
High Performance Low Power Lab 
           University of Virginia

_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to