how are additional samples added to the audiostreamer playrec output queue?
If I use the audiostreamer ‘play’ function, I can add additional samples to the output queue by calling ‘play’ when NumberPlayerSamples gets low. But this doesn’t work the same way for the ‘playrec’ function. If I call ‘playrec’ while there are samples in the output queue, it will not add to the output queue, but instead it replaces the output queue with the new samples. Thus, whatever was in the output queue previously was lost.
Is there some reason that it has to be that way? I attached some test code that sends multiple ASIO buffers of pink noise to the output queue and then it starts copying samples from the input to the output. I would expect that the latency from the input to the output would increase if I added more samples up front. Instead I see that it only outputs one buffer of pink noise and then starts copying the samples.
So, bug or intentional? (I vote bug)If I use the audiostreamer ‘play’ function, I can add additional samples to the output queue by calling ‘play’ when NumberPlayerSamples gets low. But this doesn’t work the same way for the ‘playrec’ function. If I call ‘playrec’ while there are samples in the output queue, it will not add to the output queue, but instead it replaces the output queue with the new samples. Thus, whatever was in the output queue previously was lost.
Is there some reason that it has to be that way? I attached some test code that sends multiple ASIO buffers of pink noise to the output queue and then it starts copying samples from the input to the output. I would expect that the latency from the input to the output would increase if I added more samples up front. Instead I see that it only outputs one buffer of pink noise and then starts copying the samples.
So, bug or intentional? (I vote bug) If I use the audiostreamer ‘play’ function, I can add additional samples to the output queue by calling ‘play’ when NumberPlayerSamples gets low. But this doesn’t work the same way for the ‘playrec’ function. If I call ‘playrec’ while there are samples in the output queue, it will not add to the output queue, but instead it replaces the output queue with the new samples. Thus, whatever was in the output queue previously was lost.
Is there some reason that it has to be that way? I attached some test code that sends multiple ASIO buffers of pink noise to the output queue and then it starts copying samples from the input to the output. I would expect that the latency from the input to the output would increase if I added more samples up front. Instead I see that it only outputs one buffer of pink noise and then starts copying the samples.
So, bug or intentional? (I vote bug) audiostreamer, playrec MATLAB Answers — New Questions









