Hi Chris,
I'll try to keep that in mind as it wasn't something I was really checking for in my code. However, just to experiment, I played a couple of files to get exact numbers on block sizes and such. It's not really possible for me to post code that would make any sense but I'm still basically following the ni.com/streaming API. I've just added AM and FM modulation to the incoming data from files. Anyways, here are some numbers for you that might make more sense of things.
My block size for writing samples to the Arb is initially 16384 samples. I needed to add upsampling for very low IQ rate files so I have an upsample factor that varies based on the sample rate of the file. For my test file the upsample factor was 5. So I am always writing to the arb with (16384)*(5)=81920 samples/block. I set the number of blocks to be 5 so that the buffer size when I use the niFGEN Allocate Waveform VI I set the buffer size to (81920)*(5)=409600 samples. I'm writing to the arb using Complex Double data type for a total of 16 bytes in each IQ pair. So, after doing a manual math check It seems like I am writing to the arb as you've detailed. The only time I would expect to see that error is at the end of a file when the number of samples remaining does not equal the block size that I set. But I'm seeing the error long before the end of the file and only when I use AM-SSB. Playing the file out with no modulation, FM, and AM-DSB all work fine. What baffles me the most is that I'm always writing 81920 IQ samples to the arb regardless of modulation type.
(Just for more background information)...Using the same file I prime the arb with 409600 samples before I even start generating RF. Then, after initiated, the code checks to make sure that there is greater than 81920 samples of space available in memory before writing another block.
Let me know if you have any other thoughts,
Thank You,
Tim Sileo
Tim Sileo
RF Applications Engineer
National Instruments
You don’t stop running because you get old. You get old because you stop running. -Jack Kirk, From
"Born to Run" by Christopher McDougall.