08-02-2013 09:30 PM
Attached
08-02-2013 09:45 PM
I tried to do this same exact VI, but using myDAQ as sound input and using my speakers to output. But after about 10 seconds running it says: "Attempted to read samples that are no longer available." I am assuming that this is because the VI is not processing fast enough?
I am trying to use this with human voice so the rate is at 20kHz and sample to read is at 20kHz too. So it updates every second.
08-06-2013 09:20 PM
Hi, can anyone help me?!
08-06-2013 10:04 PM
Oh Sorry. I have forgot this thread (Lot of Work to do)
That error means your data readings are not fast enough. The Main Reason is unpredictable without seeing the actual code
Try Increase the Data Samples to Read.
Can u attach your VI?
08-06-2013 10:16 PM
Yeah, I attached my VI.
I actually just created the same VI that you had but I used myDAQ as an audio input and my computer speakers as output.
08-09-2013 02:12 PM
Any solutions?
Please help me.
08-12-2013
07:18 PM
- last edited on
10-02-2024
08:08 PM
by
Content Cleaner
Hi Gear,
After looking at your VI for a bit, it seems that what is happening is that there's too much happening inside the while loop so data is being overwritten before it can be read.
Here is a KB that deals with the particular error code you are receiving and it also goes over some ways to resolve it.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019KTeSAM&l=en-US
08-12-2013 09:01 PM
So, to fix this problem should I write to a file and read from the file? So it doesn't overwrite? Is that I proper way to fix this problem?
This is the only way that I think I can fix this after reading this KB that you sent me.
08-13-2013
06:37 PM
- last edited on
10-02-2024
08:09 PM
by
Content Cleaner
You could do a write to a file and then read from a file. Or you could implement a producer/consumer loop. The producer loop would acquire your data and put them into a queue while the consumer loop would play back your file.
This paper will describe this architecture in more detail:
Also you could go to File > New.. > From Template > Frameworks > Design patterns > Producer/Consumer Design Pattern (Data) for a VI template that you can work with.
Hopefully these help!